aboutsummaryrefslogtreecommitdiff
path: root/ansible
diff options
context:
space:
mode:
authorprithiv <prithiv.mohan@intel.com>2016-09-13 11:24:53 +0100
committerJeffrey Zhang <zhang.lei.fly@gmail.com>2016-09-14 15:41:03 +0800
commit8a01ed32702b7c849c744b6cc593b76bdb78cab1 (patch)
tree34fdc7722e80c95ea2dafc8dfc46bfb90ec695fc /ansible
parent1109c25b602b0517c56921d5307382f574cfb5ed (diff)
downloadkolla-8a01ed32702b7c849c744b6cc593b76bdb78cab1.tar.gz
kolla-8a01ed32702b7c849c744b6cc593b76bdb78cab1.zip
Add Networking-SFC role
Networking-SFC is a neutron big-tent project support Service Function Chaining in Neutron. * Rename the image from neutron-networking-sfc-agent to neutron-sfc-agent. * Add networking-sfc role in playbooks. Co-Authored-by: Jeffrey Zhang <zhang.lei.fly@gmail.com> Change-Id: I1f99650eed85f59929d4ab6b2226603c54f29577 Implements: blueprint enable-networking-sfc-support
Diffstat (limited to 'ansible')
-rw-r--r--ansible/group_vars/all.yml2
-rw-r--r--ansible/roles/neutron/defaults/main.yml4
-rw-r--r--ansible/roles/neutron/tasks/start.yml49
-rw-r--r--ansible/roles/neutron/templates/neutron.conf.j28
4 files changed, 61 insertions, 2 deletions
diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml
index 83d504a97..ab1581096 100644
--- a/ansible/group_vars/all.yml
+++ b/ansible/group_vars/all.yml
@@ -110,7 +110,7 @@ tunnel_interface: "{{ network_interface }}"
bifrost_network_interface: "{{ network_interface }}"
-# Valid options are [ openvswitch, linuxbridge ]
+# Valid options are [ openvswitch, linuxbridge, sfc ]
neutron_plugin_agent: "openvswitch"
# The default ports used by each service.
diff --git a/ansible/roles/neutron/defaults/main.yml b/ansible/roles/neutron/defaults/main.yml
index 21ef9a49f..0de2a597f 100644
--- a/ansible/roles/neutron/defaults/main.yml
+++ b/ansible/roles/neutron/defaults/main.yml
@@ -36,6 +36,10 @@ neutron_openvswitch_agent_image: "{{ docker_registry ~ '/' if docker_registry el
neutron_openvswitch_agent_tag: "{{ openstack_release }}"
neutron_openvswitch_agent_image_full: "{{ neutron_openvswitch_agent_image }}:{{ neutron_openvswitch_agent_tag }}"
+neutron_sfc_agent_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-neutron-sfc-agent"
+neutron_sfc_agent_tag: "{{ openstack_release }}"
+neutron_sfc_agent_image_full: "{{ neutron_sfc_agent_image }}:{{ neutron_sfc_agent_tag }}"
+
neutron_server_image: "{{ docker_registry ~ '/' if docker_registry else '' }}{{ docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-neutron-server"
neutron_server_tag: "{{ openstack_release }}"
neutron_server_image_full: "{{ neutron_server_image }}:{{ neutron_server_tag }}"
diff --git a/ansible/roles/neutron/tasks/start.yml b/ansible/roles/neutron/tasks/start.yml
index 0d29efe25..696fcf332 100644
--- a/ansible/roles/neutron/tasks/start.yml
+++ b/ansible/roles/neutron/tasks/start.yml
@@ -109,6 +109,36 @@
)
- neutron_plugin_agent == "openvswitch"
+- name: Starting neutron-sfc-agent container
+ kolla_docker:
+ action: "start_container"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_sfc_agent_image_full }}"
+ name: "neutron_sfc_agent"
+ privileged: True
+ volumes:
+ - "{{ node_config_directory }}/neutron-sfc-agent/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/lib/modules:/lib/modules:ro"
+ - "/run:/run"
+ - "kolla_logs:/var/log/kolla/"
+ when:
+ - (
+ ( inventory_hostname in groups['compute']
+ or (enable_manila | bool and inventory_hostname in groups['manila-share'])
+ or inventory_hostname in groups['neutron-dhcp-agent']
+ or inventory_hostname in groups['neutron-l3-agent']
+ or inventory_hostname in groups['neutron-metadata-agent']
+ and not enable_nova_fake | bool
+ ) or
+ ( inventory_hostname in groups['neutron-dhcp-agent']
+ or inventory_hostname in groups['neutron-l3-agent']
+ or inventory_hostname in groups['neutron-metadata-agent']
+ and enable_nova_fake | bool
+ )
+ )
+ - neutron_plugin_agent == "sfc"
+
- name: Starting neutron-openvswitch-agent container for fake nova compute
kolla_docker:
action: "start_container"
@@ -128,6 +158,25 @@
- neutron_plugin_agent == "openvswitch"
- enable_nova_fake | bool
+- name: Starting neutron-sfc-agent container for fake nova compute
+ kolla_docker:
+ action: "start_container"
+ common_options: "{{ docker_common_options }}"
+ image: "{{ neutron_sfc_agent_image_full }}"
+ name: "neutron_sfc_agent_fake_{{ item }}"
+ privileged: True
+ volumes:
+ - "{{ node_config_directory }}/neutron-sfc-agent-fake-{{ item }}/:{{ container_config_directory }}/:ro"
+ - "/etc/localtime:/etc/localtime:ro"
+ - "/lib/modules:/lib/modules:ro"
+ - "/run:/run"
+ - "kolla_logs:/var/log/kolla/"
+ with_sequence: start=1 end={{ num_nova_fake_per_node }}
+ when:
+ - inventory_hostname in groups['compute']
+ - neutron_plugin_agent == "sfc"
+ - enable_nova_fake | bool
+
- name: Starting neutron-linuxbridge-agent container
kolla_docker:
action: "start_container"
diff --git a/ansible/roles/neutron/templates/neutron.conf.j2 b/ansible/roles/neutron/templates/neutron.conf.j2
index 87dfb4729..6d7a051a7 100644
--- a/ansible/roles/neutron/templates/neutron.conf.j2
+++ b/ansible/roles/neutron/templates/neutron.conf.j2
@@ -35,7 +35,7 @@ host = {{ ansible_hostname }}_{{ item }}
allow_overlapping_ips = true
core_plugin = ml2
-service_plugins = router{% if enable_neutron_lbaas | bool %},neutron_lbaas.services.loadbalancer.plugin.LoadBalancerPluginv2{% endif %}{% if enable_neutron_qos | bool %},qos{% endif %}
+service_plugins = router{% if enable_neutron_lbaas | bool %},lbaas{% endif %}{% if enable_neutron_qos | bool %},qos{% endif %},{% if neutron_plugin_agent == "sfc" %}flow_classifier,sfc{% endif %}
{% if enable_neutron_agent_ha | bool %}
dhcp_agents_per_network = {{ dhcp_agents_per_network }}
@@ -100,3 +100,9 @@ topics = notifications
{% else %}
driver = noop
{% endif %}
+
+{% if neutron_plugin_agent == "sfc" %}
+[sfc]
+drivers = ovs
+[flowclassifier]
+{% endif %}