Beispiel #1
0
    logger.info("using CLUSTER_NET %s" % clusternet)

    G_sysmgr = sysmgr.SystemManager()

    G_networkmgr = network.NetworkMgr(clusternet, etcdclient, mode, ipaddr)
    G_networkmgr.printpools()

    # start NodeMgr and NodeMgr will wait for all nodes to start ...
    G_nodemgr = nodemgr.NodeMgr(G_networkmgr,
                                etcdclient,
                                addr=ipaddr,
                                mode=mode)
    logger.info("nodemgr started")
    distributedgw = env.getenv("DISTRIBUTED_GATEWAY")
    G_vclustermgr = vclustermgr.VclusterMgr(G_nodemgr, G_networkmgr,
                                            etcdclient, ipaddr, mode,
                                            distributedgw)
    logger.info("vclustermgr started")
    G_imagemgr = imagemgr.ImageMgr()
    logger.info("imagemgr started")

    logger.info("startting to listen on: ")
    masterip = env.getenv('MASTER_IP')
    logger.info("using MASTER_IP %s", masterip)

    masterport = env.getenv('MASTER_PORT')
    logger.info("using MASTER_PORT %d", int(masterport))

    G_historymgr = monitor.History_Manager()
    master_collector = monitor.Master_Collector(G_nodemgr,
                                                ipaddr + ":" + str(masterport))
Beispiel #2
0
            etcdclient.deldir("_lock")
        if etcdclient.isdir("machines/runnodes")[0]:
            etcdclient.deldir("machines/runnodes")
        etcdclient.createdir("machines/runnodes")

    G_usermgr = userManager.userManager('root')
    clusternet = env.getenv("CLUSTER_NET")
    logger.info("using CLUSTER_NET %s" % clusternet)

    G_networkmgr = network.NetworkMgr(clusternet, etcdclient, mode)
    G_networkmgr.printpools()

    # start NodeMgr and NodeMgr will wait for all nodes to start ...
    G_nodemgr = nodemgr.NodeMgr(G_networkmgr, etcdclient, addr = ipaddr, mode=mode)
    logger.info("nodemgr started")
    G_vclustermgr = vclustermgr.VclusterMgr(G_nodemgr, G_networkmgr, etcdclient, ipaddr, mode)
    logger.info("vclustermgr started")
    G_imagemgr = imagemgr.ImageMgr()
    logger.info("imagemgr started")
    Guest_control = guest_control.Guest(G_vclustermgr,G_nodemgr)
    logger.info("guest control started")
    threading.Thread(target=Guest_control.work, args=()).start()

    logger.info("startting to listen on: ")
    masterip = env.getenv('MASTER_IP')
    logger.info("using MASTER_IP %s", masterip)

    masterport = env.getenv('MASTER_PORT')
    logger.info("using MASTER_PORT %d", int(masterport))

#   server = http.server.HTTPServer((masterip, masterport), DockletHttpHandler)