From 6989e876f76813c3a4f24df069f8724d35bf6bf4 Mon Sep 17 00:00:00 2001 From: Ryan Hallisey Date: Wed, 25 Nov 2015 12:52:47 -0500 Subject: [PATCH] Add OVS-data container Change-Id: I488b386ef6864f88b7693cf028626330f5414638 Implements: blueprint ovsdb-data --- ansible/roles/neutron/defaults/main.yml | 4 ++++ ansible/roles/neutron/tasks/start.yml | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml index 9bb9939f25..0ca1c9e628 100644 --- a/ansible/roles/neutron/defaults/main.yml +++ b/ansible/roles/neutron/defaults/main.yml @@ -36,6 +36,10 @@ openvswitch_db_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ openvswitch_db_tag: "{{ openstack_release }}" openvswitch_db_image_full: "{{ openvswitch_db_image }}:{{ openvswitch_db_tag }}" +openvswitch_data_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-data" +openvswitch_data_image_tag: "{{ openstack_release }}" +openvswitch_data_image_full: "{{ openvswitch_data_image }}:{{ openvswitch_data_image_tag }}" + #################### # Openstack diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml index 7aaeb0e2bc..b2181196e8 100644 --- a/ansible/roles/neutron/tasks/start.yml +++ b/ansible/roles/neutron/tasks/start.yml @@ -1,4 +1,20 @@ --- +- name: Starting Openvswitch data 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: openvswitch_data + image: "{{ openvswitch_data_image_full }}" + volumes: "/var/lib/openvswitch/" + - name: Starting Openvswitch-db container docker: tty: True @@ -16,6 +32,8 @@ volumes: - "/run:/run" - "{{ node_config_directory }}/openvswitch-db-server/:{{ container_config_directory }}/:ro" + volumes_from: + - openvswitch_data env: KOLLA_CONFIG_STRATEGY: "{{ config_strategy }}" when: (inventory_hostname in groups['compute'] or inventory_hostname in groups['neutron-agents'])