Ejemplo n.º 1
0
    default=os.getcwd() + '/cluster_manager',
    help='the path to cluster_manager repository (precompiled)',
    dest='bin_cluster_manager')

# Prepare config
args = parser.parse_args()
config = common.parse_json_config_file(args.config_path)
output = {
    'cluster_manager_nodes': [],
    'op_worker_nodes': [],
}
uid = args.uid

# Start DNS
if args.dns == 'auto':
    [dns_server], dns_output = dns.maybe_start('auto', uid)
    common.merge(output, dns_output)
else:
    dns_server = args.dns

# Start cms
cm_output = cluster_manager.up(args.image, args.bin_cluster_manager,
                               dns_server, uid, args.config_path, args.logdir)
common.merge(output, cm_output)

# Start workers
worker_output = provider_worker.up(args.image, args.bin_op_worker, dns_server,
                                   uid, args.config_path, args.logdir)
common.merge(output, worker_output)

if dns_server != 'none':
Ejemplo n.º 2
0
    dest='domains_name')

# Prepare config
args = parser.parse_args()
dockers_config.ensure_image(args, 'image', 'worker')

config = common.parse_json_config_file(args.config_path)
output = {
    'cluster_manager_nodes': [],
    'cluster_worker_nodes': [],
}
uid = args.uid

# Start DNS
if args.dns == 'auto':
    [dns_server], dns_output = dns.maybe_start('auto', uid)
    common.merge(output, dns_output)
else:
    dns_server = args.dns

# Start cms
cm_output = cluster_manager.up(args.image, args.bin_cluster_manager,
                               dns_server, uid, args.config_path, args.logdir,
                               args.domains_name)
common.merge(output, cm_output)

# Start workers
worker_output = cluster_worker.up(args.image, args.bin_op_worker, dns_server,
                                  uid, args.config_path, args.logdir)
common.merge(output, worker_output)
Ejemplo n.º 3
0
    "-bcm",
    "--bin-cm",
    action="store",
    default=os.getcwd() + "/cluster_manager",
    help="the path to cluster_manager repository (precompiled)",
    dest="bin_cluster_manager",
)

# Prepare config
args = parser.parse_args()
config = common.parse_json_file(args.config_path)
output = {"cluster_manager_nodes": [], "cluster_worker_nodes": []}
uid = common.generate_uid()

# Start DNS
[dns_server], dns_output = dns.maybe_start("auto", uid)
common.merge(output, dns_output)

# Start cms
cm_output = cluster_manager.up(args.image, args.bin_cluster_manager, dns_server, uid, args.config_path, args.logdir)
common.merge(output, cm_output)

# Start workers
worker_output = cluster_worker.up(args.image, args.bin_op_worker, dns_server, uid, args.config_path, args.logdir)
common.merge(output, worker_output)

# Make sure domain are added to the dns server
dns.maybe_restart_with_configuration("auto", uid, output)

# Print results
print(json.dumps(output))