Sam Yaple 94162bd08f Bring Kolla inline with FHS
This brings Kolla images inline with FHS and should make finding
locations of things more consistent and reliable with the linux world
at large.

Change-Id: Iece5b4da4bace0fb8b1f41a65ab2c852ec73e6f8
Closes-Bug: #1485742
2015-10-06 03:30:53 +00:00

150 lines
5.9 KiB
YAML

---
- name: Starting Openvswitch-db container
docker:
docker_api_version: "{{ docker_api_version }}"
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: openvswitch_db
image: "{{ openvswitch_db_image_full }}"
volumes:
- "/run:/run"
- "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- name: Starting Openvswitch-vswitchd container
docker:
docker_api_version: "{{ docker_api_version }}"
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 }}"
privileged: True
name: openvswitch_vswitchd
image: "{{ openvswitch_vswitchd_image_full }}"
volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/openvswitch-vswitchd/:{{ container_config_directory }}/:ro"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- name: Ensuring OVS bridge is properly setup
command: docker exec openvswitch_vswitchd /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'])
and neutron_plugin_agent == "openvswitch"
- name: Starting Neutron-server container
docker:
docker_api_version: "{{ docker_api_version }}"
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: neutron_server
image: "{{ neutron_server_image_full }}"
volumes:
- "{{ node_config_directory }}/neutron-server/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['neutron-server']
- name: Starting Neutron-openvswitch-agent container
docker:
docker_api_version: "{{ docker_api_version }}"
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 }}"
privileged: True
name: neutron_openvswitch_agent
image: "{{ neutron_openvswitch_agent_image_full }}"
volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-openvswitch-agent/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "openvswitch"
- name: Starting Neutron-linuxbridge-agent container
docker:
docker_api_version: "{{ docker_api_version }}"
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 }}"
privileged: True
name: neutron_linuxbridge_agent
image: "{{ neutron_linuxbridge_agent_image_full }}"
volumes:
- "/run:/run"
- "/lib/modules:/lib/modules:ro"
- "{{ node_config_directory }}/neutron-linuxbridge-agent/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
NEUTRON_BRIDGE: "br-ex"
NEUTRON_INTERFACE: "{{ neutron_external_interface }}"
when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])
and neutron_plugin_agent == "linuxbridge"
- name: Starting Neutron-agents container
docker:
docker_api_version: "{{ docker_api_version }}"
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 }}"
privileged: True
name: neutron_agents
image: "{{ neutron_agents_image_full }}"
volumes:
- "/run:/run"
- "{{ node_config_directory }}/neutron-agents/:{{ container_config_directory }}/:ro"
- "/var/lib/kolla/dev/log:/dev/log"
env:
KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}"
when: inventory_hostname in groups['neutron-agents']