diff --git a/roles/extras-common/defaults/main.yml b/roles/extras-common/defaults/main.yml index c1b6ab09c..c68aa0a7a 100644 --- a/roles/extras-common/defaults/main.yml +++ b/roles/extras-common/defaults/main.yml @@ -1,2 +1,3 @@ overcloud_ipv6: false +containerized_overcloud: false diff --git a/roles/overcloud-deploy/defaults/main.yml b/roles/overcloud-deploy/defaults/main.yml index dfeb0fdb1..72c9a0b21 100644 --- a/roles/overcloud-deploy/defaults/main.yml +++ b/roles/overcloud-deploy/defaults/main.yml @@ -22,6 +22,8 @@ external_network_gateway: "{{ floating_ip_cidr|nthhost(1) }}" # Minutes to wait before giving up on the deploy. deploy_timeout: 90 + +# Deployment variations extra_args: "" ssl_overcloud: false libvirt_args: "--libvirt-type qemu" @@ -57,14 +59,15 @@ set_overcloud_workers: true network_args: "" pacemaker_args: "" workers_args: "" - ssl_args: "" validation_args: "--validation-warnings-fatal" +container_args: "" deploy_args: >- {{ libvirt_args }} {{ flavor_args }} {{ timeout_args }} + {{ container_args }} {{ network_args }} {{ pacemaker_args }} {{ workers_args }} diff --git a/roles/overcloud-deploy/tasks/pre-deploy.yml b/roles/overcloud-deploy/tasks/pre-deploy.yml index 262971bf6..775e814ae 100644 --- a/roles/overcloud-deploy/tasks/pre-deploy.yml +++ b/roles/overcloud-deploy/tasks/pre-deploy.yml @@ -1,23 +1,30 @@ +# Note.. the order of heat templates and args is very important. The last environment that sets a variable takes precedent. + - name: set network_args fact set_fact: network_args: >- - -e {{overcloud_templates_path}}/environments/network-isolation.yaml - -e {{overcloud_templates_path}}/environments/net-single-nic-with-vlans.yaml - -e $HOME/network-environment.yaml - when: network_isolation|bool and not overcloud_ipv6|bool + -e {{ overcloud_templates_path }}/environments/network-isolation.yaml + -e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml + -e {{ working_dir }}/network-environment.yaml + when: + - network_isolation|bool + - not overcloud_ipv6|bool + - not containerized_overcloud|bool - name: set network_args fact for IPv6 set_fact: network_args: >- - -e {{overcloud_templates_path}}/environments/network-isolation-v6.yaml - -e {{overcloud_templates_path}}/environments/net-multiple-nics-v6.yaml - -e $HOME/network-environment.yaml - when: network_isolation|bool and overcloud_ipv6|bool + -e {{ overcloud_templates_path }}/environments/network-isolation-v6.yaml + -e {{ overcloud_templates_path }}/environments/net-multiple-nics-v6.yaml + -e {{ working_dir }}/network-environment.yaml + when: + - network_isolation|bool + - overcloud_ipv6|bool - name: enable pacemaker set_fact: pacemaker_args: >- - -e {{overcloud_templates_path}}/environments/puppet-pacemaker.yaml + -e {{ overcloud_templates_path }}/environments/puppet-pacemaker.yaml when: enable_pacemaker|bool - name: extract the number of controllers to be deployed @@ -26,17 +33,21 @@ - name: set ssl_args fact for master/newton set_fact: ssl_args: >- - -e $HOME/enable-tls.yaml - -e {{overcloud_templates_path}}/environments/tls-endpoints-public-ip.yaml - -e $HOME/inject-trust-anchor.yaml - when: ssl_overcloud|bool and release in ['newton', 'master'] + -e {{ working_dir }}/enable-tls.yaml + -e {{ overcloud_templates_path }}/environments/tls-endpoints-public-ip.yaml + -e {{ working_dir }}/inject-trust-anchor.yaml + when: + - ssl_overcloud|bool + - release in ['newton', 'master'] - name: set ssl_args fact for mitaka/liberty set_fact: ssl_args: >- - -e $HOME/enable-tls.yaml - -e $HOME/inject-trust-anchor.yaml - when: ssl_overcloud|bool and release in ['mitaka', 'liberty'] + -e {{ working_dir }}/enable-tls.yaml + -e {{ working_dir }}/inject-trust-anchor.yaml + when: + - ssl_overcloud|bool + - release in ['mitaka', 'liberty'] - name: set validation_args fact for mitaka/liberty set_fact: @@ -47,15 +58,41 @@ set_fact: pacemaker_args: >- {{ pacemaker_args }} - -e $HOME/neutronl3ha.yaml - when: enable_pacemaker|bool and number_of_controllers|int < 3 + -e {{ working_dir }}/neutronl3ha.yaml + when: + - enable_pacemaker|bool + - number_of_controllers|int < 3 - name: set workers_args fact set_fact: workers_args: >- - -e {{overcloud_templates_path}}/environments/low-memory-usage.yaml + -e {{ overcloud_templates_path }}/environments/low-memory-usage.yaml when: release not in ['mitaka', 'liberty'] - name: Use KVM for Red Hat distro set_fact: libvirt_args="--libvirt-type kvm" when: ansible_distribution == 'RedHat' + +- name: set container_args fact + set_fact: + container_args: >- + -e {{ overcloud_templates_path }}/environments/docker.yaml + -e {{ overcloud_templates_path }}/environments/docker-network.yaml + -e {{ working_dir }}/containers-default-parameters.yaml + when: + - containerized_overcloud|bool + - not network_isolation|bool + +- name: set network_args fact for containers + set_fact: + network_args: >- + -e {{ overcloud_templates_path }}/environments/docker.yaml + -e {{ overcloud_templates_path }}/environments/docker-network.yaml + -e {{ overcloud_templates_path }}/environments/docker-network-isolation.yaml + -e {{ overcloud_templates_path }}/environments/network-isolation.yaml + -e {{ overcloud_templates_path }}/environments/net-single-nic-with-vlans.yaml + -e {{ working_dir }}/network-environment.yaml + -e {{ working_dir }}/containers-default-parameters.yaml + when: + - network_isolation|bool + - containerized_overcloud|bool