SamYaple 4bd6285dc7 Convert neutron to kolla_docker
Change-Id: Id58586ac20ee081eb731deb23e5f8dc26dfb8cc2
Partially-Implements: blueprint kolla-docker-module
2015-12-31 16:38:56 +00:00

125 lines
4.8 KiB
YAML

---
- name: Starting openvswitch-data container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ openvswitch_data_image_full }}"
name: "openvswitch_data"
volumes: "/var/lib/openvswitch/"
- name: Starting openvswitch-db container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ openvswitch_db_image_full }}"
name: "openvswitch_db"
volumes:
- "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro"
- "/run:/run"
volumes_from: "openvswitch_data"
when:
- (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
- neutron_plugin_agent == "openvswitch"
- name: Ensuring OVS bridge is properly setup
command: docker exec openvswitch_db /usr/local/bin/kolla_ensure_openvswitch_configured {{ neutron_bridge_name }} {{ neutron_external_interface }}
register: status
changed_when: status.stdout.find('changed') != -1
when:
- (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
- neutron_plugin_agent == "openvswitch"
- name: Starting openvswitch-vswitchd container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ openvswitch_vswitchd_image_full }}"
name: "openvswitch_vswitchd"
privileged: True
volumes:
- "{{ node_config_directory }}/openvswitch-vswitchd/:{{ container_config_directory }}/:ro"
- "/lib/modules:/lib/modules:ro"
- "/run:/run"
when:
- (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
- neutron_plugin_agent == "openvswitch"
- name: Starting neutron-server container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ neutron_server_image_full }}"
name: "neutron_server"
volumes:
- "{{ node_config_directory }}/neutron-server/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
when: inventory_hostname in groups['neutron-server']
- name: Starting neutron-openvswitch-agent container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ neutron_openvswitch_agent_image_full }}"
name: "neutron_openvswitch_agent"
privileged: True
volumes:
- "{{ node_config_directory }}/neutron-openvswitch-agent/:{{ container_config_directory }}/:ro"
- "/lib/modules:/lib/modules:ro"
- "/run:/run"
- "/var/lib/kolla/dev/log:/dev/log"
when:
- neutron_plugin_agent == "openvswitch"
- ((inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents']) and not (enable_nova_fake | bool)) or
((inventory_hostname in groups['neutron-agents']) and (enable_nova_fake | bool))
- name: Starting Neutron-openvswitch-agent container for fake nova compute
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ neutron_openvswitch_agent_image_full }}"
name: "neutron_openvswitch_agent_fake_{{ item }}"
privileged: True
volumes:
- "{{ node_config_directory }}/neutron-openvswitch-agent-fake-{{ item }}/:{{ container_config_directory }}/:ro"
- "/lib/modules:/lib/modules:ro"
- "/run:/run"
- "/var/lib/kolla/dev/log:/dev/log"
with_sequence: start=1 end={{ num_nova_fake_per_node }}
when:
- inventory_hostname in groups['compute']
- neutron_plugin_agent == "openvswitch"
- enable_nova_fake | bool
- name: Starting neutron-linuxbridge-agent container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
environment:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
NEUTRON_BRIDGE: "br-ex"
NEUTRON_INTERFACE: "{{ neutron_external_interface }}"
image: "{{ neutron_linuxbridge_agent_image_full }}"
name: "neutron_linuxbridge_agent"
privileged: True
volumes:
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:{{ container_config_directory }}/:ro"
- "/lib/modules:/lib/modules:ro"
- "/run:/run"
- "/var/lib/kolla/dev/log:/dev/log"
when:
- (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
- neutron_plugin_agent == "linuxbridge"
- name: Starting neutron-agents container
kolla_docker:
action: "start_container"
common_options: "{{ docker_common_options }}"
image: "{{ neutron_agents_image_full }}"
name: "neutron_agents"
privileged: True
volumes:
- "{{ node_config_directory }}/neutron-agents/:{{ container_config_directory }}/:ro"
- "/run:/run"
- "/var/lib/kolla/dev/log:/dev/log"
when: inventory_hostname in groups['neutron-agents']