Exemplo n.º 1
0
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)

if dns_server != 'none':
    # Make sure domain are added to the dns server
    dns.maybe_restart_with_configuration('auto', uid, output)

# Print results
print(json.dumps(output))
Exemplo n.º 2
0
#!/usr/bin/env python
"""Author: Michal Zmuda
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'

A script to brings up a set of cluster nodes. They can form separate
clusters.
Run the script with -h flag to learn about script's running options.
"""

from __future__ import print_function
import json
from environment import common, cluster_worker

parser = common.standard_arg_parser('Bring up bare cluster-worker nodes.')
parser.add_argument('-l',
                    '--logdir',
                    action='store',
                    default=None,
                    help='path to a directory where the logs will be stored',
                    dest='logdir')

args = parser.parse_args()
output = cluster_worker.up(args.image, args.bin, args.dns, args.uid,
                           args.config_path, args.logdir)

print(json.dumps(output))
Exemplo n.º 3
0
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)

if dns_server != 'none':
    # Make sure domain are added to the dns server
    dns.maybe_restart_with_configuration('auto', uid, output)

# Print results
print(json.dumps(output))
Exemplo n.º 4
0
#!/usr/bin/env python

"""Author: Michal Zmuda
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'

A script to brings up a set of cluster nodes. They can form separate
clusters.
Run the script with -h flag to learn about script's running options.
"""

from __future__ import print_function
import json
from environment import common, cluster_worker

parser = common.standard_arg_parser('Bring up bare cluster-worker nodes.')
parser.add_argument(
    '-l', '--logdir',
    action='store',
    default=None,
    help='path to a directory where the logs will be stored',
    dest='logdir')

args = parser.parse_args()
output = cluster_worker.up(args.image, args.bin, args.dns, args.uid, args.config_path, args.logdir)

print(json.dumps(output))