diff options
author | Tim Rozet <trozet@redhat.com> | 2018-01-29 17:16:15 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-01-29 17:16:15 +0000 |
commit | 7e365bcfc02900ca1a7da341f47aabcf3123c99f (patch) | |
tree | ef9ef6d79e21494ad35571df385b6bdd675ca9b7 | |
parent | 2f43d91a340fa002ea1f03931f5209a616a11a37 (diff) | |
parent | 6856c63376f87004377f94f534389da02dc9be16 (diff) |
Merge "Make introspection optional"
-rw-r--r-- | apex/deploy.py | 7 | ||||
-rw-r--r-- | config/deploy/deploy_settings.yaml | 3 | ||||
-rw-r--r-- | lib/ansible/playbooks/deploy_overcloud.yml | 8 |
3 files changed, 13 insertions, 5 deletions
diff --git a/apex/deploy.py b/apex/deploy.py index 5485d150..d2f1c936 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -248,7 +248,11 @@ def main(): os_version=os_version) net_env_target = os.path.join(APEX_TEMP_DIR, constants.NET_ENV_FILE) utils.dump_yaml(dict(net_env), net_env_target) + + # get global deploy params ha_enabled = deploy_settings['global_params']['ha_enabled'] + introspect = deploy_settings['global_params'].get('introspect', True) + if args.virtual: if args.virt_compute_ram is None: compute_ram = args.virt_default_ram @@ -434,6 +438,9 @@ def main(): deploy_vars['virtual'] = args.virtual deploy_vars['debug'] = args.debug deploy_vars['aarch64'] = platform.machine() == 'aarch64' + deploy_vars['introspect'] = not (args.virtual or + deploy_vars['aarch64'] or + not introspect) deploy_vars['dns_server_args'] = '' deploy_vars['apex_temp_dir'] = APEX_TEMP_DIR deploy_vars['apex_env_file'] = os.path.basename(opnfv_env) diff --git a/config/deploy/deploy_settings.yaml b/config/deploy/deploy_settings.yaml index 47bf0834..a5e9e960 100644 --- a/config/deploy/deploy_settings.yaml +++ b/config/deploy/deploy_settings.yaml @@ -7,6 +7,9 @@ # If ha_enabled is false, there will only be one controller. global_params: ha_enabled: true + # introspect defaults to True, if set false the introspection process will + # be skipped at deploy time. + introspect: true deploy_options: # Which SDN controller to use. Valid options are 'opendaylight', 'onos', diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml index b2d9234a..aa3d8067 100644 --- a/lib/ansible/playbooks/deploy_overcloud.yml +++ b/lib/ansible/playbooks/deploy_overcloud.yml @@ -57,15 +57,13 @@ become_user: stack - name: Import inventory (baremetal) shell: "{{ stackrc }} && openstack overcloud node import instackenv.json" - when: not virtual + when: introspect - name: Introspect inventory (baremetal) shell: "{{ stackrc }} && openstack overcloud node introspect --all-manageable --provide" - when: - - not virtual - - not aarch64 + when: introspect - name: Import inventory (virtual) shell: "{{ stackrc }} && openstack overcloud node import --provide instackenv.json" - when: virtual + when: not introspect - name: Set flavors shell: '{{ stackrc }} && openstack flavor set --property "cpu_arch"="{{ ansible_architecture }}" {{ item }}' with_items: |