summaryrefslogtreecommitdiffstats
path: root/lib/ansible
diff options
context:
space:
mode:
authorRicardo Noriega <rnoriega@redhat.com>2018-07-23 12:14:59 +0200
committerRicardo Noriega <rnoriega@redhat.com>2018-07-26 10:10:47 +0200
commit70138a393e3641d83c488ee504b7839973e6e9d5 (patch)
treedac921ed8665d8b271595832b9b8bb6e4c69a7c4 /lib/ansible
parent82a9bec67b094f6381acb035a9efeffe47b011ab (diff)
Remove obsolete Ceph tags
This patch removes the logic to use an specific tag for Ceph containers. We will use whatever docker image TripleO upstream uses. For aarch64, an ansible task will replace the tag to pull the proper container image. This patch also refactors the preparation of the local registry. In Queens, there is no need to execute twice the overcloud container image prepare command. JIRA: APEX-622 Change-Id: I947d931609e58505675bb460a59d08c1d10d1d0b Signed-off-by: Ricardo Noriega <rnoriega@redhat.com>
Diffstat (limited to 'lib/ansible')
-rw-r--r--lib/ansible/playbooks/prepare_overcloud_containers.yml45
1 files changed, 16 insertions, 29 deletions
diff --git a/lib/ansible/playbooks/prepare_overcloud_containers.yml b/lib/ansible/playbooks/prepare_overcloud_containers.yml
index 79629c2b..1651a531 100644
--- a/lib/ansible/playbooks/prepare_overcloud_containers.yml
+++ b/lib/ansible/playbooks/prepare_overcloud_containers.yml
@@ -25,7 +25,9 @@
--tag {{ container_tag }}
--push-destination {{ undercloud_ip }}:8787
-e /usr/share/openstack-tripleo-heat-templates/environments/docker.yaml
+ -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml
--output-images-file overcloud_containers.yml
+ --output-env-file docker-images.yaml
become: yes
become_user: stack
- name: Prepare SDN docker registry image file
@@ -36,9 +38,22 @@
--push-destination {{ undercloud_ip }}:8787
-e {{ sdn_env_file }}
--output-images-file sdn_containers.yml
+ --output-env-file sdn-images.yaml
become: yes
become_user: stack
when: sdn != false
+ - name: Update Ceph tag for aarch64 in container env file
+ lineinfile:
+ path: /home/stack/overcloud_containers.yml
+ regexp: '.*ceph.*'
+ line: '- imagename: docker.io/ceph/daemon:master-fafda7d-luminous-centos-7-aarch64'
+ when: aarch64
+ - name: Update Ceph tag for aarch64 in container image file
+ lineinfile:
+ path: /home/stack/docker-images.yaml
+ regexp: '^DockerCephDaemonImage'
+ line: 'DockerCephDaemonImage: {{ undercloud_ip }}:8787/ceph/daemon/master-fafda7d-luminous-centos-7-aarch64'
+ when: aarch64
- name: Upload docker images to local registry
shell: >
{{ stackrc }} && openstack overcloud container image upload
@@ -67,25 +82,6 @@
- patched_docker_services|length > 0
- item in (response.json)['repositories']|join(" ")
with_items: "{{ patched_docker_services }}"
- - name: Prepare deployment generic docker image file
- shell: >
- {{ stackrc }} && openstack overcloud container image prepare
- --namespace {{ undercloud_ip }}:8787/tripleo{{ os_version }}
- --tag {{ container_tag }}
- -e /usr/share/openstack-tripleo-heat-templates/environments/docker.yaml
- --output-env-file docker-images.yaml
- become: yes
- become_user: stack
- - name: Prepare deployment SDN docker image file
- shell: >
- {{ stackrc }} && openstack overcloud container image prepare
- --namespace {{ undercloud_ip }}:8787/tripleo{{ os_version }}
- --tag {{ container_tag }}
- -e {{ sdn_env_file }}
- --output-env-file sdn-images.yaml
- when: sdn != false
- become: yes
- become_user: stack
- name: Modify Images with Apex tag
replace:
path: "{{ item[0] }}"
@@ -93,13 +89,4 @@
replace: '\1:apex'
with_nested:
- [ '/home/stack/sdn-images.yaml', '/home/stack/docker-images.yaml']
- - "{{ patched_docker_services }}"
- - name: Pull Ceph docker image
- shell: docker pull {{ ceph_docker_image }}
- become: yes
- - name: Tag Ceph image for local registry
- shell: docker tag {{ ceph_docker_image }} {{ undercloud_ip }}:8787/{{ ceph_docker_image }}
- become: yes
- - name: Push Ceph docker image to local registry
- shell: docker push {{ undercloud_ip }}:8787/{{ ceph_docker_image }}
- become: yes
+ - "{{ patched_docker_services }}" \ No newline at end of file