Merge "Rename docker-container-startup-configs to container-startup-configs"
This commit is contained in:
commit
92f9557bd1
@ -230,8 +230,16 @@
|
|||||||
- container_config_scripts
|
- container_config_scripts
|
||||||
|
|
||||||
# The container config files
|
# The container config files
|
||||||
# /var/lib/docker-container-startup-configs.json is removed as we now write
|
# /var/lib/container-startup-configs.json is removed as we now write
|
||||||
# per-step files instead
|
# per-step files instead
|
||||||
|
- name: Clean old /var/lib/container-startup-configs.json file
|
||||||
|
file:
|
||||||
|
path: /var/lib/container-startup-configs.json
|
||||||
|
state: absent
|
||||||
|
tags:
|
||||||
|
- container_startup_configs
|
||||||
|
|
||||||
|
# For legacy, can be removed in Train cycle
|
||||||
- name: Clean old /var/lib/docker-container-startup-configs.json file
|
- name: Clean old /var/lib/docker-container-startup-configs.json file
|
||||||
file:
|
file:
|
||||||
path: /var/lib/docker-container-startup-configs.json
|
path: /var/lib/docker-container-startup-configs.json
|
||||||
@ -239,7 +247,8 @@
|
|||||||
tags:
|
tags:
|
||||||
- container_startup_configs
|
- container_startup_configs
|
||||||
|
|
||||||
- name: Write docker config scripts
|
|
||||||
|
- name: Write container config scripts
|
||||||
no_log: True
|
no_log: True
|
||||||
copy:
|
copy:
|
||||||
content: "{{ item[1].content }}"
|
content: "{{ item[1].content }}"
|
||||||
@ -255,47 +264,47 @@
|
|||||||
tags:
|
tags:
|
||||||
- container_config_scripts
|
- container_config_scripts
|
||||||
|
|
||||||
# Here we are dumping all the docker container startup configuration data
|
# Here we are dumping all the container startup configuration data
|
||||||
# so that we can have access to how they are started outside of heat
|
# so that we can have access to how they are started outside of heat
|
||||||
# and docker-cmd. This lets us create command line tools to test containers.
|
# and container cmd. This lets us create command line tools to test containers.
|
||||||
# FIXME We need to update the defaults, e.g in docker-tool, so we can remove the
|
# FIXME We need to update the defaults, e.g in docker-tool, so we can remove the
|
||||||
# docker-container-startup-configs.json and use per-step configs instead
|
# container-startup-configs.json and use per-step configs instead
|
||||||
- name: Set docker_config_default fact
|
- name: Set container_config_default fact
|
||||||
no_log: True
|
no_log: True
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_config_default: "{{ docker_config_default | default({}) | combine( {'step_' + item: {}} ) }}"
|
container_config_default: "{{ container_config_default | default({}) | combine( {'step_' + item: {}} ) }}"
|
||||||
with_sequence: count={{ deploy_steps_max }}
|
with_sequence: count={{ deploy_steps_max }}
|
||||||
tags:
|
tags:
|
||||||
- container_startup_configs
|
- container_startup_configs
|
||||||
|
|
||||||
- name: Set docker_startup_configs_with_default fact
|
- name: Set container_startup_configs_with_default fact
|
||||||
no_log: True
|
no_log: True
|
||||||
set_fact:
|
set_fact:
|
||||||
docker_config_with_default: "{{ docker_config_default | combine(role_data_docker_config) }}"
|
container_config_with_default: "{{ container_config_default | combine(role_data_container_config) }}"
|
||||||
vars:
|
vars:
|
||||||
role_data_docker_config: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default({}, True) | from_yaml }}"
|
role_data_container_config: "{{ lookup('file', tripleo_role_name + '/docker_config.yaml', errors='ignore') | default({}, True) | from_yaml }}"
|
||||||
tags:
|
tags:
|
||||||
- container_startup_configs
|
- container_startup_configs
|
||||||
|
|
||||||
- name: Write docker-container-startup-configs
|
- name: Write container-startup-configs
|
||||||
no_log: True
|
no_log: True
|
||||||
copy:
|
copy:
|
||||||
content: "{{ docker_config_with_default | to_nice_json }}"
|
content: "{{ container_config_with_default | to_nice_json }}"
|
||||||
dest: /var/lib/docker-container-startup-configs.json
|
dest: /var/lib/container-startup-configs.json
|
||||||
force: yes
|
force: yes
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
tags:
|
tags:
|
||||||
- container_startup_configs
|
- container_startup_configs
|
||||||
diff: no
|
diff: no
|
||||||
|
|
||||||
- name: Write per-step docker-container-startup-configs
|
- name: Write per-step container-startup-configs
|
||||||
no_log: True
|
no_log: True
|
||||||
copy:
|
copy:
|
||||||
content: "{{ item[1] | to_nice_json }}"
|
content: "{{ item[1] | to_nice_json }}"
|
||||||
dest: /var/lib/tripleo-config/docker-container-startup-config-{{ item[0] }}.json
|
dest: /var/lib/tripleo-config/container-startup-config-{{ item[0] }}.json
|
||||||
force: yes
|
force: yes
|
||||||
mode: '0600'
|
mode: '0600'
|
||||||
loop: "{{ docker_config_with_default | dictsort }}"
|
loop: "{{ container_config_with_default | dictsort }}"
|
||||||
loop_control:
|
loop_control:
|
||||||
label: "{{ item[0] }}"
|
label: "{{ item[0] }}"
|
||||||
tags:
|
tags:
|
||||||
@ -437,7 +446,7 @@
|
|||||||
CONFIG: '/var/lib/container-puppet/{{ ansible_check_mode | ternary("check-mode/", "") }}container-puppet.json'
|
CONFIG: '/var/lib/container-puppet/{{ ansible_check_mode | ternary("check-mode/", "") }}container-puppet.json'
|
||||||
CONFIG_VOLUME_PREFIX: '/var/lib/config-data{{ ansible_check_mode | ternary("/check-mode", "") }}'
|
CONFIG_VOLUME_PREFIX: '/var/lib/config-data{{ ansible_check_mode | ternary("/check-mode", "") }}'
|
||||||
CHECK_MODE: '{{ ansible_check_mode | ternary(1, 0) }}'
|
CHECK_MODE: '{{ ansible_check_mode | ternary(1, 0) }}'
|
||||||
STARTUP_CONFIG_PATTERN: '/var/lib/tripleo-config/{{ ansible_check_mode | ternary("check-mode/", "") }}docker-container-startup-config-step_*.json'
|
STARTUP_CONFIG_PATTERN: '/var/lib/tripleo-config/{{ ansible_check_mode | ternary("check-mode/", "") }}container-startup-config-step_*.json'
|
||||||
MOUNT_HOST_PUPPET: '{{docker_puppet_mount_host_puppet | default(true)}}'
|
MOUNT_HOST_PUPPET: '{{docker_puppet_mount_host_puppet | default(true)}}'
|
||||||
CONTAINER_LOG_STDOUT_PATH: "{{ container_log_stdout_path }}"
|
CONTAINER_LOG_STDOUT_PATH: "{{ container_log_stdout_path }}"
|
||||||
when: step == "1"
|
when: step == "1"
|
||||||
@ -498,7 +507,7 @@
|
|||||||
paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply
|
paunch {% if enable_debug|bool %}--debug{% else %}-v{% endif %} apply
|
||||||
--default-runtime "{{ container_cli }}"
|
--default-runtime "{{ container_cli }}"
|
||||||
--container-log-path "{{ container_log_stdout_path }}"
|
--container-log-path "{{ container_log_stdout_path }}"
|
||||||
--file /var/lib/tripleo-config/hashed-docker-container-startup-config-step_{{ step }}.json
|
--file /var/lib/tripleo-config/hashed-container-startup-config-step_{{ step }}.json
|
||||||
--config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }}
|
--config-id tripleo_step{{ step }} --managed-by tripleo-{{ tripleo_role_name }}
|
||||||
changed_when: false
|
changed_when: false
|
||||||
register: outputs
|
register: outputs
|
||||||
|
@ -426,13 +426,13 @@ outputs:
|
|||||||
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
|
docker_puppet_process_count: DOCKER_PUPPET_PROCESS_COUNT
|
||||||
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
|
docker_puppet_mount_host_puppet: DOCKER_PUPPET_MOUNT_HOST_PUPPET
|
||||||
tasks:
|
tasks:
|
||||||
- name: Check if /var/lib/docker-container-startup-configs.json already exists
|
- name: Check if /var/lib/container-startup-configs.json already exists
|
||||||
stat:
|
stat:
|
||||||
path: /var/lib/docker-container-startup-configs.json
|
path: /var/lib/container-startup-configs.json
|
||||||
register: docker_container_startup_configs_json_stat
|
register: container_startup_configs_json_stat
|
||||||
- import_tasks: common_deploy_steps_tasks.yaml
|
- import_tasks: common_deploy_steps_tasks.yaml
|
||||||
when:
|
when:
|
||||||
- ((deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or not docker_container_startup_configs_json_stat.stat.exists)
|
- ((deploy_identifier is defined and deploy_identifier != "" and deploy_identifier is not none) or not container_startup_configs_json_stat.stat.exists)
|
||||||
tags:
|
tags:
|
||||||
- overcloud
|
- overcloud
|
||||||
- deploy_steps
|
- deploy_steps
|
||||||
|
@ -48,7 +48,7 @@ def parse_opts(argv):
|
|||||||
"TripleO configurations")
|
"TripleO configurations")
|
||||||
parser.add_argument('-f', '--config',
|
parser.add_argument('-f', '--config',
|
||||||
help="""File to use as docker startup configuration data.""",
|
help="""File to use as docker startup configuration data.""",
|
||||||
default='/var/lib/docker-container-startup-configs.json')
|
default='/var/lib/container-startup-configs.json')
|
||||||
parser.add_argument('-r', '--run',
|
parser.add_argument('-r', '--run',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
help="""Run the container as specified with --container.""",
|
help="""Run the container as specified with --container.""",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user