From e2148a5167e9a9837747ccce7ec889905ef453c5 Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Thu, 12 Jul 2018 11:25:06 +1200 Subject: [PATCH] Do undercloud container prepare in external_deploy_tasks This change moves docker and docker-distribution installation from step 1 to host_prep_tasks, then runs container prepare as external_deploy_tasks. Container image prepare needs to run before any steps which require container images, and it always needs to run on the undercloud because it only ever populates the undercloud registry. Docker needs to be installed in host_prep_tasks, since it is just before external_deploy_tasks step 1. The aim is to move these prepare tasks into their own service file so they can be run during undercloud install and overcloud deploy, as an alternative to having a dedicated mistral action for the overcloud prepare. Change-Id: I2c82b6829e574424067130d1a369ff30030fb4bc Blueprint: container-prepare-workflow --- puppet/services/docker-registry.j2.yaml | 8 +++++--- puppet/services/docker.yaml | 4 +--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/puppet/services/docker-registry.j2.yaml b/puppet/services/docker-registry.j2.yaml index bcc1e420b9..714b959e90 100644 --- a/puppet/services/docker-registry.j2.yaml +++ b/puppet/services/docker-registry.j2.yaml @@ -60,10 +60,8 @@ outputs: - 8787 - 13787 step_config: '' - host_prep_tasks: [] - deploy_steps_tasks: + host_prep_tasks: - name: Install, Configure and Run Docker Distribution - when: step|int == 1 block: # NOTE(bogdando): w/a https://github.com/ansible/ansible/issues/42621 - set_fact: @@ -77,6 +75,10 @@ outputs: - include_role: name: container-registry tasks_from: docker-distribution + external_deploy_tasks: + - name: Container image prepare + when: step|int == 1 + block: - name: Create temp file for prepare parameter tempfile: state: file diff --git a/puppet/services/docker.yaml b/puppet/services/docker.yaml index d773c29c2c..11abda9cc4 100644 --- a/puppet/services/docker.yaml +++ b/puppet/services/docker.yaml @@ -80,10 +80,8 @@ outputs: service_name: docker config_settings: {} step_config: '' - host_prep_tasks: [] - deploy_steps_tasks: + host_prep_tasks: - name: Install, Configure and Run Docker - when: step|int == 1 block: # NOTE(bogdando): w/a https://github.com/ansible/ansible/issues/42621 - set_fact: &docker_vars