diff options
author | Tim Rozet <trozet@redhat.com> | 2017-11-27 15:22:25 -0500 |
---|---|---|
committer | Tim Rozet <trozet@redhat.com> | 2018-04-04 16:03:49 -0400 |
commit | 382fa452e0c9a8189911f615416e1b24badaf5e4 (patch) | |
tree | 41973e70a7b054b4a2297bb45918430c0614c9ee /apex/deploy.py | |
parent | b047099b609eac330486f23913e8046d0f22c1ab (diff) |
Adds the ability to fetch logs from deployment
Usage:
opnfv-pyutil --fetch-logs
python3 utils.py --fetch-logs --lib-dir ../lib
Eventually all utils.sh functions will be migrated here.
Note there is no support here for containers. Will be
added later.
Change-Id: I223b8592ad09e0370e287ee2801072db31f9aa12
Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'apex/deploy.py')
-rw-r--r-- | apex/deploy.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/apex/deploy.py b/apex/deploy.py index 7bc5568f..4facadef 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -39,7 +39,6 @@ from apex.overcloud import config as oc_cfg from apex.overcloud import deploy as oc_deploy APEX_TEMP_DIR = tempfile.mkdtemp(prefix='apex_tmp') -ANSIBLE_PATH = 'ansible/playbooks' SDN_IMAGE = 'overcloud-full-opendaylight.qcow2' @@ -309,7 +308,7 @@ def main(): 'virsh_enabled_networks': net_settings.enabled_network_list } utils.run_ansible(ansible_args, - os.path.join(args.lib_dir, ANSIBLE_PATH, + os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'deploy_dependencies.yml')) uc_external = False if 'external' in net_settings.enabled_network_list: @@ -397,7 +396,7 @@ def main(): args.deploy_dir, APEX_TEMP_DIR) # Install Undercloud undercloud.configure(net_settings, deploy_settings, - os.path.join(args.lib_dir, ANSIBLE_PATH, + os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'configure_undercloud.yml'), APEX_TEMP_DIR, virtual_oc=args.virtual) @@ -433,7 +432,7 @@ def main(): os.path.basename(opnfv_env), net_data=net_data) # Prepare undercloud with containers - docker_playbook = os.path.join(args.lib_dir, ANSIBLE_PATH, + docker_playbook = os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'prepare_overcloud_containers.yml') if ds_opts['containers']: ceph_version = constants.CEPH_VERSION_MAP[ds_opts['os_version']] @@ -466,7 +465,7 @@ def main(): os.remove(os.path.join(APEX_TEMP_DIR, 'overcloud-full.qcow2')) raise - deploy_playbook = os.path.join(args.lib_dir, ANSIBLE_PATH, + deploy_playbook = os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'deploy_overcloud.yml') virt_env = 'virtual-environment.yaml' bm_env = 'baremetal-environment.yaml' @@ -542,7 +541,7 @@ def main(): else: deploy_vars['overcloudrc_files'] = ['overcloudrc'] - post_undercloud = os.path.join(args.lib_dir, ANSIBLE_PATH, + post_undercloud = os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'post_deploy_undercloud.yml') logging.info("Executing post deploy configuration undercloud playbook") try: @@ -561,7 +560,7 @@ def main(): deploy_vars['sriov'] = ds_opts.get('sriov') # TODO(trozet): pull all logs and store in tmp dir in overcloud # playbook - post_overcloud = os.path.join(args.lib_dir, ANSIBLE_PATH, + post_overcloud = os.path.join(args.lib_dir, constants.ANSIBLE_PATH, 'post_deploy_overcloud.yml') # Run per overcloud node for node, ip in deploy_vars['overcloud_nodes'].items(): |