Add experimental support to deploy containers without Paunch
This is experimental and therefore not stable. Only enable it for testing purpose or if you know what you're doing. To disable Paunch and use 100% Ansible to manage the containers, just set that paramter into your environment: EnablePaunch: false Story: 2006732 Task: 37165 Change-Id: I19386ec20aa060f52174588266b4fe82b83ed697
This commit is contained in:
parent
794da25b07
commit
f157e1afb1
@ -222,40 +222,55 @@
|
||||
tags:
|
||||
- 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
|
||||
# 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
|
||||
- name: Start containers for step {{ step }} using paunch
|
||||
- name: Per step starting of the containers using Paunch
|
||||
when: enable_paunch|default(true)
|
||||
block:
|
||||
- name: Start containers for step {{ step }} using paunch
|
||||
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
|
||||
failed_when: false
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
- name: "Debug output for task: Start containers for step {{ step }}"
|
||||
debug:
|
||||
var: outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))
|
||||
when: outputs.rc is defined
|
||||
failed_when: 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:
|
||||
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
|
||||
failed_when: false
|
||||
when: enable_paunch|default(true)
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
- name: "Debug output for task: Start containers for step {{ step }}"
|
||||
debug:
|
||||
var: outputs.stdout_lines | default([]) | union(outputs.stderr_lines | default([]))
|
||||
when:
|
||||
- enable_paunch|default(true)
|
||||
- outputs.rc is defined
|
||||
failed_when: outputs.rc != 0
|
||||
tags:
|
||||
- container_startup_configs
|
||||
block:
|
||||
- name: "Manage containers for step {{ step }} with tripleo-ansible"
|
||||
include_role:
|
||||
name: tripleo-container-manage
|
||||
vars:
|
||||
tripleo_container_manage_log_path: "{{ container_log_stdout_path }}"
|
||||
tripleo_container_cli: "{{ container_cli }}"
|
||||
tags:
|
||||
- container_startup_configs
|
||||
|
||||
########################################################
|
||||
# Bootstrap tasks - run any tasks that have been defined
|
||||
|
Loading…
x
Reference in New Issue
Block a user