def setup_class(cls):
     cls.result = appmock.up(image='onedata/builder',
                             bindir=appmock_dir,
                             dns_server='none',
                             uid=common.generate_uid(),
                             config_path=os.path.join(
                                 test_utils.test_file('env.json')))
 def setup_class(cls):
     logdir = make_logdir(ENV_UP_LOGDIR, get_file_name(__file__))
     cls.result = appmock.up(image='onedata/builder',
                             bindir=APPMOCK_DIR,
                             dns_server='none',
                             uid=common.generate_uid(),
                             config_path=os.path.join(config_file('env.json')),
                             logdir=logdir)
Пример #3
0
def _appmock_client(request):
    test_dir = os.path.dirname(os.path.realpath(request.module.__file__))

    result = appmock.up(image='onedata/builder', bindir=appmock_dir,
                        dns_server='none', uid=common.generate_uid(),
                        config_path=os.path.join(test_dir, 'env.json'))

    [container] = result['docker_ids']
    appmock_ip = docker.inspect(container)['NetworkSettings']['IPAddress']. \
        encode('ascii')

    def fin():
        docker.remove([container], force=True, volumes=True)

    request.addfinalizer(fin)
    return AppmockClient(appmock_ip)
Пример #4
0
def _appmock_client(request):
    test_dir = os.path.dirname(os.path.realpath(request.module.__file__))

    result = appmock.up(image='onedata/builder',
                        bindir=appmock_dir,
                        dns_server='none',
                        uid=common.generate_uid(),
                        config_path=os.path.join(test_dir, 'env.json'))

    [container] = result['docker_ids']
    appmock_ip = docker.inspect(container)['NetworkSettings']['IPAddress']. \
        encode('ascii')

    def fin():
        docker.remove([container], force=True, volumes=True)

    request.addfinalizer(fin)
    return AppmockClient(appmock_ip)
Пример #5
0
#!/usr/bin/env python
# coding=utf-8

"""Authors: Łukasz Opioła, Konrad Zemek
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'

A script that brings up a set of appmock instances.
Run the script with -h flag to learn about script's running options.
"""

from __future__ import print_function
import json

from environment import appmock, common


parser = common.standard_arg_parser('Bring up appmock 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()
config = appmock.up(args.image, args.bin, args.dns,
                    args.uid, args.config_path, args.logdir)
print(json.dumps(config))
Пример #6
0
#!/usr/bin/env python
# coding=utf-8
"""Authors: Łukasz Opioła, Konrad Zemek
Copyright (C) 2015 ACK CYFRONET AGH
This software is released under the MIT license cited in 'LICENSE.txt'

A script that brings up a set of appmock instances.
Run the script with -h flag to learn about script's running options.
"""

from __future__ import print_function
import json

from environment import appmock, common

parser = common.standard_arg_parser('Bring up appmock 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()
config = appmock.up(args.image, args.bin, args.dns, args.uid, args.config_path,
                    args.logdir)
print(json.dumps(config))
Пример #7
0
    'docker_ids': [],
    'gr_nodes': [],
    'gr_db_nodes': [],
    'op_ccm_nodes': [],
    'op_worker_nodes': [],
    'appmock_nodes': [],
    'client_nodes': []
}

# Start DNS
[dns], dns_output = common.set_up_dns('auto', uid)
common.merge(output, dns_output)

# Start appmock instances
if 'appmock' in config:
    am_output = appmock.up(args.image, args.bin_am, dns, uid, args.config_path)
    common.merge(output, am_output)

# Start globalregistry instances
if 'globalregistry' in config:
    gr_output = globalregistry.up(args.image, args.bin_gr, args.logdir, dns,
                                  uid, args.config_path)
    common.merge(output, gr_output)

# Start oneprovider_node instances
if 'oneprovider_node' in config:
    op_output = provider.up(args.image, args.bin_op, args.logdir, dns, uid,
                            args.config_path)
    common.merge(output, op_output)

# Start oneclient instances