summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ansible/playbooks/configure_undercloud.yml6
-rw-r--r--lib/ansible/playbooks/deploy_overcloud.yml24
-rw-r--r--lib/ansible/playbooks/patch_containers.yml6
-rw-r--r--lib/ansible/playbooks/post_deploy_overcloud.yml6
-rw-r--r--lib/ansible/playbooks/prepare_overcloud_containers.yml2
5 files changed, 29 insertions, 15 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml
index 80f3e67e..493cd1a1 100644
--- a/lib/ansible/playbooks/configure_undercloud.yml
+++ b/lib/ansible/playbooks/configure_undercloud.yml
@@ -78,7 +78,7 @@
become: yes
with_items: "{{ nova_config }}"
- name: restart nova services
- shell: "docker restart {{ item }}"
+ shell: "{{ container_client }} restart {{ item }}"
with_items:
- nova_conductor
- nova_compute
@@ -90,7 +90,7 @@
become: yes
with_items: "{{ neutron_config }}"
- name: restart neutron services
- shell: "docker restart {{ item }}"
+ shell: "{{ container_client }} restart {{ item }}"
with_items:
- neutron_api
- neutron_dhcp
@@ -100,7 +100,7 @@
become: yes
with_items: "{{ ironic_config }}"
- name: restart ironic services
- shell: "docker restart {{ item }}"
+ shell: "{{ container_client }} restart {{ item }}"
with_items:
- ironic_api
- ironic_conductor
diff --git a/lib/ansible/playbooks/deploy_overcloud.yml b/lib/ansible/playbooks/deploy_overcloud.yml
index e2e84d18..44470da2 100644
--- a/lib/ansible/playbooks/deploy_overcloud.yml
+++ b/lib/ansible/playbooks/deploy_overcloud.yml
@@ -73,6 +73,16 @@
owner: root
group: root
become: yes
+ - name: Insert External network into Compute role
+ shell: |
+ ruby -e '
+ require "yaml"
+ data = YAML.load(File.read("/usr/share/openstack-tripleo-heat-templates/roles_data.yaml"))
+ data[1]["networks"].push("External")
+ data[1]["default_route_networks"] = Array.new(["External"])
+ File.open("/usr/share/openstack-tripleo-heat-templates/roles_data.yaml", "w") { |f| f.write(data.to_yaml) }
+ '
+ become: yes
- name: Upload glance images
shell: "{{ stackrc }} && openstack overcloud image upload"
become: yes
@@ -92,11 +102,6 @@
- baremetal
- control
- compute
- - name: Downgrade ceph
- yum:
- allow_downgrade: yes
- name: ceph-ansible-3.1.6
- become: yes
- name: Re-enable ceph config for aarch64
replace:
path: "/usr/share/ceph-ansible/roles/ceph-client/tasks/create_users_keys.yml"
@@ -106,6 +111,15 @@
when: aarch64
- name: Configure DNS server for ctlplane network
shell: "{{ stackrc }} && openstack subnet set ctlplane-subnet {{ dns_server_args }}"
+ - name: Update NIC templates before deployment
+ shell: >
+ /usr/share/openstack-tripleo-heat-templates/tools/merge-new-params-nic-config-script.py
+ -n /home/stack/network_data.yaml -t /home/stack/nics/{{ item }}.yaml --discard-comments True
+ become: yes
+ become_user: stack
+ with_items:
+ - controller
+ - compute
- block:
- name: Execute Overcloud Deployment
shell: "{{ stackrc }} && bash deploy_command"
diff --git a/lib/ansible/playbooks/patch_containers.yml b/lib/ansible/playbooks/patch_containers.yml
index bc4899ba..1ef05810 100644
--- a/lib/ansible/playbooks/patch_containers.yml
+++ b/lib/ansible/playbooks/patch_containers.yml
@@ -1,13 +1,13 @@
---
- name: "Pull docker image to ensure it exists locally: {{ item }}"
- shell: docker pull {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo
+ shell: "{{ container_client }} pull {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo"
- name: "Find docker image user {{ item }}"
shell: >
- docker inspect --format='{{ '{{' }}.ContainerConfig.User{{ '}}' }}'
+ {{ container_client }} inspect --format='{{ '{{' }}.ContainerConfig.User{{ '}}' }}'
{{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:current-tripleo
register: user_result
- name: "Patch docker image {{ item }}"
shell: >
- cd /home/stack/containers/{{ item }} && docker build
+ cd /home/stack/containers/{{ item }} && {{ container_client }} build
--build-arg REAL_USER={{ user_result.stdout }}
-t {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex .
diff --git a/lib/ansible/playbooks/post_deploy_overcloud.yml b/lib/ansible/playbooks/post_deploy_overcloud.yml
index f3dbfbd2..2b90ab1f 100644
--- a/lib/ansible/playbooks/post_deploy_overcloud.yml
+++ b/lib/ansible/playbooks/post_deploy_overcloud.yml
@@ -55,11 +55,11 @@
- openstack-nova-scheduler
- openstack-nova-conductor
- name: Restart Compute Nova Compute (workaround for NFS)
- shell: "docker restart nova_compute"
+ shell: "{{ container_client }} restart nova_compute"
become: yes
when: "'compute' in ansible_hostname or all_in_one"
- name: Update ODL container restart policy to always
- shell: "docker update --restart=always opendaylight_api"
+ shell: "{{ container_client }} update --restart=always opendaylight_api"
become: yes
when:
- sdn == 'opendaylight'
@@ -88,7 +88,7 @@
- "'controller' in ansible_hostname"
- sdn != 'ovn'
- name: Restart metadata service
- shell: "docker restart neutron_metadata_agent"
+ shell: "{{ container_client }} restart neutron_metadata_agent"
become: yes
when:
- "'controller' in ansible_hostname"
diff --git a/lib/ansible/playbooks/prepare_overcloud_containers.yml b/lib/ansible/playbooks/prepare_overcloud_containers.yml
index db1bff89..ebf081dc 100644
--- a/lib/ansible/playbooks/prepare_overcloud_containers.yml
+++ b/lib/ansible/playbooks/prepare_overcloud_containers.yml
@@ -36,7 +36,7 @@
- patched_docker_services|length > 0
- item in (response.json)['repositories']|join(" ")
- name: Push patched docker images to local registry
- shell: docker push {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex
+ shell: "{{ container_client }} push {{ undercloud_ip }}:8787/tripleo{{ os_version }}/centos-binary-{{ item }}:apex"
when:
- patched_docker_services|length > 0
- item in (response.json)['repositories']|join(" ")