Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Use role tripleo-modify-image to update containers
Browse files Browse the repository at this point in the history
This change uses the yum_update task file in ansible role
tripleo-modify-image to update the undercloud images.

Change-Id: I62a4b03538d26083a0ba4ce0b2e7a5b0c456134d
Blueprint: container-prepare-workflow
  • Loading branch information
steveb authored and EmilienM committed Jun 15, 2018
1 parent b3794ff commit c2a3aac
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
5 changes: 5 additions & 0 deletions roles/extras-common/tasks/main.yml
Expand Up @@ -20,3 +20,8 @@
set_fact:
container_build_id: "{{ docker_image_tag }}"
when: container_build_id is not defined

- name: Set update_containers_append_tag for the play
set_fact:
update_containers_append_tag: "{{ lookup('pipe','date +-updated-%Y%m%d%H%M%S') }}"
when: update_containers and update_containers_append_tag is undefined
Expand Up @@ -30,15 +30,14 @@ PREPARE_ARGS=${PREPARE_ARGS:-"{{ prepare_service_env_args }}"}
## populate the docker registry. This is done automatically.
## ::

BUILD_ID=${BUILD_ID:-"{{ container_build_id }}"}

{% if release not in ['ocata', 'pike', 'queens'] %}
openstack tripleo container image prepare \
--output-env-file {{ working_dir }}/containers-default-parameters.yaml \
${PREPARE_ARGS} \
-e {{ working_dir }}/containers-prepare-parameter.yaml

{% else %}
BUILD_ID=${BUILD_ID:-"{{ container_build_id }}"}

openstack overcloud container image prepare \
--output-images-file {{ working_dir }}/overcloud_containers.yaml \
Expand Down Expand Up @@ -109,7 +108,6 @@ openstack overcloud container image upload --debug --config-file {{ working_dir
{% endif %}
--tag $BUILD_ID
{% endif %}
{% endif %}

{% if update_containers|bool and not use_overcloud_mixed_upgrade|default(false)|bool %}
# See https://github.com/imain/container-check for script and documentation
Expand Down Expand Up @@ -141,6 +139,7 @@ if [[ -n "$packages_for_update" ]]; then
-k $packages_for_update
fi

{% endif %}
{% endif %}

echo "============================="
Expand Down
Expand Up @@ -3,11 +3,24 @@ parameter_defaults:
- {{ local_docker_registry_host }}:8787
ContainerImagePrepare:
- push_destination: "{{ local_docker_registry_host }}:8787"
excludes: [ceph]
{% if update_containers|bool and not use_overcloud_mixed_upgrade|default(false)|bool %}
modify_role: tripleo-modify-image
modify_append_tag: "{{ update_containers_append_tag }}"
modify_vars:
tasks_from: yum_update.yml
compare_host_packages: true
yum_repos_dir_path: /etc/yum.repos.d
update_repo: gating-repo
{% endif %}
set:
tag: "{{ container_build_id }}"
namespace: "{{ docker_registry_host }}/{{ docker_registry_namespace_used }}"
name_prefix: "{{ docker_prep_prefix }}"
name_suffix: "{{ docker_prep_suffix }}"
- push_destination: "{{ local_docker_registry_host }}:8787"
includes: [ceph]
set:
ceph_namespace: "{{ docker_ceph_namespace }}"
ceph_image: "{{ docker_ceph_image }}"
ceph_tag: "{{ docker_ceph_tag }}"

0 comments on commit c2a3aac

Please sign in to comment.