diff options
author | Feng Pan <fpan@redhat.com> | 2018-11-01 16:22:18 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-11-01 16:22:19 +0000 |
commit | 03ad54f56a111dc15a834ae28cbef03da0ad68af (patch) | |
tree | 86194e90010ee0e57583e992e70480031126c1b8 /lib/ansible | |
parent | 63792906e8681bef2f0e03ee12ea422af53d9c12 (diff) | |
parent | d38e8a91c1a0e3f94d2a19876956ade48d1a8ed2 (diff) |
Merge "Fixes Docker image upload for master/rocky"
Diffstat (limited to 'lib/ansible')
-rw-r--r-- | lib/ansible/playbooks/configure_undercloud.yml | 7 | ||||
-rw-r--r-- | lib/ansible/playbooks/prepare_overcloud_containers.yml | 51 |
2 files changed, 12 insertions, 46 deletions
diff --git a/lib/ansible/playbooks/configure_undercloud.yml b/lib/ansible/playbooks/configure_undercloud.yml index 5e11ea9f..45d18e46 100644 --- a/lib/ansible/playbooks/configure_undercloud.yml +++ b/lib/ansible/playbooks/configure_undercloud.yml @@ -27,6 +27,13 @@ with_items: - controller - compute + - name: Copy container prep env file to undercloud + copy: + src: "{{ apex_temp_dir }}/containers-prepare-parameter.yaml" + dest: "/home/stack/containers-prepare-parameter.yaml" + owner: stack + group: stack + mode: 0644 - lineinfile: path: /etc/sudoers regexp: 'Defaults\s*requiretty' diff --git a/lib/ansible/playbooks/prepare_overcloud_containers.yml b/lib/ansible/playbooks/prepare_overcloud_containers.yml index 54dbe098..e2a4e134 100644 --- a/lib/ansible/playbooks/prepare_overcloud_containers.yml +++ b/lib/ansible/playbooks/prepare_overcloud_containers.yml @@ -20,49 +20,9 @@ when: patched_docker_services|length > 0 - name: Prepare generic docker registry image file shell: > - {{ stackrc }} && openstack overcloud container image prepare - --namespace docker.io/tripleo{{ os_version }} - --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 + sudo openstack tripleo container image prepare + -e /home/stack/containers-prepare-parameter.yaml --output-env-file docker-images.yaml - become: yes - become_user: stack - - name: Prepare SDN docker registry image file - shell: > - {{ stackrc }} && openstack overcloud container image prepare - --namespace docker.io/tripleo{{ os_version }} - --tag {{ container_tag }} - --push-destination {{ undercloud_ip }}:8787 - {{ 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 - --config-file /home/stack/overcloud_containers.yml - - name: Upload SDN docker images to local registry - shell: > - {{ stackrc }} && openstack overcloud container image upload - --config-file /home/stack/sdn_containers.yml - when: sdn != false - name: Collect docker images in registry uri: url: http://{{ undercloud_ip }}:8787/v2/_catalog @@ -84,9 +44,8 @@ with_items: "{{ patched_docker_services }}" - name: Modify Images with Apex tag replace: - path: "{{ item[0] }}" + path: "/home/stack/docker-images.yaml" regexp: "(\\s*Docker.*?:.*?centos-binary-{{ item[1] }}):.*" replace: '\1:apex' - with_nested: - - [ '/home/stack/sdn-images.yaml', '/home/stack/docker-images.yaml'] - - "{{ patched_docker_services }}"
\ No newline at end of file + with_items: "{{ patched_docker_services }}" + become: yes |