Merge "Convert Ironic to kolla_docker"

This commit is contained in:
Jenkins 2016-01-03 16:10:38 +00:00 committed by Gerrit Code Review
commit f9ce96dfd9
2 changed files with 34 additions and 95 deletions

View File

@ -37,39 +37,18 @@
run_once: True run_once: True
delegate_to: "{{ groups['ironic-api'][0] }}" delegate_to: "{{ groups['ironic-api'][0] }}"
- name: Starting Ironic bootstrap container - name: Running Ironic bootstrap container
docker: kolla_docker:
tty: True action: "start_container"
common_options: "{{ docker_common_options }}"
detach: False detach: False
net: host environment:
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_ironic
image: "{{ ironic_api_image_full }}"
volumes: "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
env:
KOLLA_BOOTSTRAP: KOLLA_BOOTSTRAP:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
run_once: True
delegate_to: "{{ groups['ironic-api'][0] }}"
when: database_created
# https://github.com/ansible/ansible-modules-core/pull/1031
- name: Waiting for Ironic bootstrap container to exit
command: docker wait bootstrap_ironic
run_once: True
delegate_to: "{{ groups['ironic-api'][0] }}"
when: database_created
- name: Cleaning up boostrap container
docker:
name: bootstrap_ironic
image: "{{ ironic_api_image_full }}" image: "{{ ironic_api_image_full }}"
state: absent name: "bootstrap_ironic"
restart_policy: "never"
volumes: "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
run_once: True
delegate_to: "{{ groups['ironic-api'][0] }}" delegate_to: "{{ groups['ironic-api'][0] }}"
when: database_created when: database_created

View File

@ -1,81 +1,41 @@
--- ---
- name: Starting Ironic-pxe container - name: Starting ironic-pxe container
docker: kolla_docker:
tty: True action: "start_container"
net: host common_options: "{{ docker_common_options }}"
pull: "{{ docker_pull_policy }}" name: "ironic-pxe"
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: ironic-pxe
image: "{{ ironic_pxe_image_full }}" image: "{{ ironic_pxe_image_full }}"
volumes: volumes:
- "{{ node_config_directory }}/ironic-pxe/:{{ container_config_directory }}/:ro" - "{{ node_config_directory }}/ironic-pxe/:{{ container_config_directory }}/:ro"
- "/tftpboot/" - "ironic-pxe:/tftpboot/"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['ironic-pxe'] when: inventory_hostname in groups['ironic-pxe']
- name: Starting Ironic-api container - name: Starting ironic-api container
docker: kolla_docker:
tty: True action: "start_container"
net: host common_options: "{{ docker_common_options }}"
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: ironic-api
image: "{{ ironic_api_image_full }}" image: "{{ ironic_api_image_full }}"
name: "ironic-api"
volumes: "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro" volumes: "{{ node_config_directory }}/ironic-api/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['ironic-api'] when: inventory_hostname in groups['ironic-api']
- name: Starting Ironic-conductor container - name: Starting ironic-conductor container
docker: kolla_docker:
tty: True action: "start_container"
net: host common_options: "{{ docker_common_options }}"
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: ironic-conductor
image: "{{ ironic_conductor_image_full }}" image: "{{ ironic_conductor_image_full }}"
volumes: "{{ node_config_directory }}/ironic-conductor/:{{ container_config_directory }}/:ro" name: "ironic-conductor"
volumes_from: volumes:
- ironic-pxe - "{{ node_config_directory }}/ironic-conductor/:{{ container_config_directory }}/:ro"
env: - "ironic-pxe:/tftpboot/"
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['ironic-conductor'] when: inventory_hostname in groups['ironic-conductor']
- name: Starting Ironic-discoverd container - name: Starting ironic-discoverd container
docker: kolla_docker:
tty: True action: "start_container"
net: host common_options: "{{ docker_common_options }}"
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 }}"
privileged: True
name: ironic-discoverd
image: "{{ ironic_discoverd_image_full }}" image: "{{ ironic_discoverd_image_full }}"
name: "ironic-discoverd"
privileged: True
volumes: "{{ node_config_directory }}/ironic-discoverd/:{{ container_config_directory }}/:ro" volumes: "{{ node_config_directory }}/ironic-discoverd/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['ironic-discoverd'] when: inventory_hostname in groups['ironic-discoverd']