Convert Murano to kolla_docker

Change-Id: I7be9c91cb31eca5dfc15e8ff0a6ab8f42c5af8dc
Partially-Implements: blueprint kolla-docker-module
This commit is contained in:
SamYaple 2015-12-26 00:37:02 +00:00
parent fff2ccfa0c
commit 2f03fc81ec
2 changed files with 19 additions and 61 deletions

View File

@ -36,39 +36,18 @@
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
- name: Starting Murano bootstrap container
docker:
tty: True
- name: Running Murano 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_murano
image: "{{ murano_api_image_full }}"
volumes: "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
env:
environment:
KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
run_once: True
delegate_to: "{{ groups['murano-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_murano
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
when: database_created
- name: Cleaning up Murano boostrap container
docker:
name: bootstrap_murano
image: "{{ murano_api_image_full }}"
state: absent
name: "bootstrap_murano"
restart_policy: "never"
volumes: "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
run_once: True
delegate_to: "{{ groups['murano-api'][0] }}"
when: database_created

View File

@ -1,43 +1,22 @@
---
- name: Starting Murano-engine 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: murano_engine
- name: Starting murano-engine container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ murano_engine_image_full }}"
name: "murano_engine"
volumes:
- "{{ node_config_directory }}/murano-engine/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
volumes_from:
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['murano-engine']
- name: Starting Murano-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: murano_api
- name: Starting murano-api container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ murano_api_image_full }}"
name: "murano_api"
volumes:
- "{{ node_config_directory }}/murano-api/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['murano-api']