Convert magnum to kolla_docker
Change-Id: I0e20706a19208706d1ae4689e38b32fdbb3ebff3 Partially-Implements: blueprint kolla-docker-module
This commit is contained in:
parent
0ddc6df9bc
commit
fff2ccfa0c
@ -35,42 +35,18 @@
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['magnum-api'][0] }}"
|
||||
|
||||
- name: Starting Magnum bootstrap container
|
||||
docker:
|
||||
tty: True
|
||||
- name: Running Magnum bootstrap container
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
detach: False
|
||||
net: host
|
||||
pull: "{{ docker_pull_policy }}"
|
||||
restart_policy: "no"
|
||||
state: reloaded
|
||||
registry: "{{ docker_registry }}"
|
||||
username: "{{ docker_registry_username }}"
|
||||
password: "{{ docker_registry_password }}"
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: bootstrap_magnum
|
||||
image: "{{ magnum_api_image_full }}"
|
||||
volumes: "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
env:
|
||||
environment:
|
||||
KOLLA_BOOTSTRAP:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['magnum-api'][0] }}"
|
||||
when: database_created
|
||||
|
||||
# https://github.com/ansible/ansible-modules-core/pull/1031
|
||||
- name: Waiting for bootstrap container to exit
|
||||
command: docker wait bootstrap_magnum
|
||||
register: bootstrap_result
|
||||
run_once: True
|
||||
failed_when: bootstrap_result.stdout != "0"
|
||||
delegate_to: "{{ groups['magnum-api'][0] }}"
|
||||
when: database_created
|
||||
|
||||
- name: Cleaning up Magnum boostrap container
|
||||
docker:
|
||||
tty: True
|
||||
name: bootstrap_magnum
|
||||
image: "{{ magnum_api_image_full }}"
|
||||
state: absent
|
||||
name: "bootstrap_magnum"
|
||||
restart_policy: "never"
|
||||
volumes: "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
run_once: True
|
||||
delegate_to: "{{ groups['magnum-api'][0] }}"
|
||||
when: database_created
|
||||
|
@ -1,42 +1,22 @@
|
||||
---
|
||||
- name: Starting magnum-api container
|
||||
docker:
|
||||
tty: True
|
||||
net: host
|
||||
pull: "{{ docker_pull_policy }}"
|
||||
restart_policy: "{{ docker_restart_policy }}"
|
||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
||||
state: reloaded
|
||||
registry: "{{ docker_registry }}"
|
||||
username: "{{ docker_registry_username }}"
|
||||
password: "{{ docker_registry_password }}"
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: magnum_api
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ magnum_api_image_full }}"
|
||||
name: "magnum_api"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/magnum-api/:{{ container_config_directory }}/:ro"
|
||||
- "/var/lib/kolla/dev/log:/dev/log"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['magnum-api']
|
||||
|
||||
- name: Starting magnum-conductor container
|
||||
docker:
|
||||
tty: True
|
||||
net: host
|
||||
pull: "{{ docker_pull_policy }}"
|
||||
restart_policy: "{{ docker_restart_policy }}"
|
||||
restart_policy_retry: "{{ docker_restart_policy_retry }}"
|
||||
state: reloaded
|
||||
registry: "{{ docker_registry }}"
|
||||
username: "{{ docker_registry_username }}"
|
||||
password: "{{ docker_registry_password }}"
|
||||
insecure_registry: "{{ docker_insecure_registry }}"
|
||||
name: magnum_conductor
|
||||
kolla_docker:
|
||||
action: "start_container"
|
||||
common_options: "{{ docker_common_options }}"
|
||||
image: "{{ magnum_conductor_image_full }}"
|
||||
name: "magnum_conductor"
|
||||
volumes:
|
||||
- "{{ node_config_directory }}/magnum-conductor/:{{ container_config_directory }}/:ro"
|
||||
- "/var/lib/kolla/dev/log:/dev/log"
|
||||
env:
|
||||
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
|
||||
when: inventory_hostname in groups['magnum-conductor']
|
||||
|
Loading…
Reference in New Issue
Block a user