Merge "[SQUASH] backport tripleo-container-manage to stable/train" into stable/train
This commit is contained in:
commit
9e2d618638
|
@ -207,51 +207,73 @@
|
||||||
tags:
|
tags:
|
||||||
- container_config
|
- container_config
|
||||||
|
|
||||||
##################################################
|
#####################################
|
||||||
# Per step starting of the containers using paunch
|
# Per step starting of the containers
|
||||||
##################################################
|
#####################################
|
||||||
|
|
||||||
# Note container-puppet.py generates the hashed-*.json file, which is a copy of
|
# Note container-puppet.py generates the hashed-*.json file, which is a copy of
|
||||||
# the *step_n.json with a hash of the generated external config added
|
# the *step_n.json with a hash of the generated external config added
|
||||||
# This acts as a salt to enable restarting the container if config changes
|
# This acts as a salt to enable restarting the container if config changes
|
||||||
- name: Start containers for step {{ step }} using paunch
|
- name: Per step starting of the containers using Paunch
|
||||||
async: 3600
|
when: enable_paunch|default(true)
|
||||||
poll: 0
|
block:
|
||||||
|
- name: Start containers for step {{ step }} using paunch
|
||||||
|
async: 3600
|
||||||
|
poll: 0
|
||||||
|
environment:
|
||||||
|
TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}'
|
||||||
|
paunch:
|
||||||
|
config: "/var/lib/tripleo-config/container-startup-config/step_{{ step }}"
|
||||||
|
config_id: "tripleo_step{{ step }}"
|
||||||
|
action: apply
|
||||||
|
container_cli: "{{ container_cli }}"
|
||||||
|
container_log_stdout_path: "{{ container_log_stdout_path }}"
|
||||||
|
healthcheck_disabled: "{{ container_healthcheck_disabled | bool }}"
|
||||||
|
managed_by: "tripleo-{{ tripleo_role_name }}"
|
||||||
|
debug: "{{ enable_debug | bool }}"
|
||||||
|
register: outputs
|
||||||
|
register: start_containers_async_result
|
||||||
|
tags:
|
||||||
|
- container_startup_configs
|
||||||
|
|
||||||
|
- name: Wait for containers to start for step {{ step }} using paunch
|
||||||
|
async_status:
|
||||||
|
jid: "{{ start_containers_async_result.ansible_job_id }}"
|
||||||
|
register: start_containers_outputs
|
||||||
|
until: start_containers_outputs.finished
|
||||||
|
retries: 1200
|
||||||
|
delay: 3
|
||||||
|
tags:
|
||||||
|
- container_startup_configs
|
||||||
|
|
||||||
|
- name: "Debug output for task: Start containers for step {{ step }}"
|
||||||
|
debug:
|
||||||
|
var: start_containers_outputs.stdout_lines | default([]) | union(start_containers_outputs.stderr_lines | default([]))
|
||||||
|
when: start_containers_outputs.rc is defined
|
||||||
|
failed_when: start_containers_outputs.rc != 0
|
||||||
|
tags:
|
||||||
|
- container_startup_configs
|
||||||
|
|
||||||
|
# This is experimental, do not use for production now
|
||||||
|
- name: Per step starting of the containers using tripleo-ansible
|
||||||
|
when: not enable_paunch|default(true)
|
||||||
environment:
|
environment:
|
||||||
TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}'
|
TRIPLEO_MINOR_UPDATE: '{{ tripleo_minor_update | default(false) }}'
|
||||||
paunch:
|
block:
|
||||||
config: "/var/lib/tripleo-config/container-startup-config/step_{{ step }}"
|
- name: "Manage containers for step {{ step }} with tripleo-ansible"
|
||||||
config_id: "tripleo_step{{ step }}"
|
include_role:
|
||||||
action: apply
|
name: tripleo-container-manage
|
||||||
container_cli: "{{ container_cli }}"
|
vars:
|
||||||
container_log_stdout_path: "{{ container_log_stdout_path }}"
|
tripleo_container_manage_concurrency: 2
|
||||||
healthcheck_disabled: "{{ container_healthcheck_disabled | bool }}"
|
tripleo_container_manage_systemd_order: true
|
||||||
managed_by: "tripleo-{{ tripleo_role_name }}"
|
tripleo_container_manage_cli: "{{ container_cli }}"
|
||||||
debug: "{{ enable_debug | bool }}"
|
tripleo_container_manage_config: "/var/lib/tripleo-config/container-startup-config/step_{{ step }}"
|
||||||
register: outputs
|
tripleo_container_manage_config_id: "tripleo_step{{ step }}"
|
||||||
failed_when: false
|
tripleo_container_manage_debug: "{{ enable_debug | bool }}"
|
||||||
when: enable_paunch|default(true)
|
tripleo_container_manage_healthcheck_disabled: "{{ container_healthcheck_disabled | bool }}"
|
||||||
register: start_containers_async_result
|
tripleo_container_manage_log_path: "{{ container_log_stdout_path }}"
|
||||||
tags:
|
tags:
|
||||||
- container_startup_configs
|
- container_startup_configs
|
||||||
|
|
||||||
- name: Wait for containers to start for step {{ step }} using paunch
|
|
||||||
async_status:
|
|
||||||
jid: "{{ start_containers_async_result.ansible_job_id }}"
|
|
||||||
register: start_containers_outputs
|
|
||||||
until: start_containers_outputs.finished
|
|
||||||
retries: 1200
|
|
||||||
delay: 3
|
|
||||||
tags:
|
|
||||||
- container_startup_configs
|
|
||||||
|
|
||||||
- name: "Debug output for task: Start containers for step {{ step }}"
|
|
||||||
debug:
|
|
||||||
var: start_containers_outputs.stdout_lines | default([]) | union(start_containers_outputs.stderr_lines | default([]))
|
|
||||||
when: start_containers_outputs.rc is defined
|
|
||||||
failed_when: start_containers_outputs.rc != 0
|
|
||||||
tags:
|
|
||||||
- container_startup_configs
|
|
||||||
|
|
||||||
########################################################
|
########################################################
|
||||||
# Bootstrap tasks - run any tasks that have been defined
|
# Bootstrap tasks - run any tasks that have been defined
|
||||||
|
|
Loading…
Reference in New Issue