summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYifei Xue <xueyifei@huawei.com>2017-05-27 14:11:17 +0800
committerYifei Xue <xueyifei@huawei.com>2017-06-02 17:13:56 +0800
commitf9d5aacba1ce6a2fdc3f5ef71a82550cec3812ae (patch)
tree2f6718fbb224a4fb8ab22cbc235ae55cf6c9f537
parent02603a05c4d3fe59876030dc914cab019193d4e6 (diff)
Add opendaylight sfc support for compass installer
JIRA: COMPASS-483 As odl sfc has been supported by other installers, we compass project has also support odl boron and tacker now. So we are going to support odl sfc+tacker in Danube release. This patch includes: 1. Add ovs-common and ovs-dkms 2. Install networking-sfc for neutron and odl 3. Configure odl sfc in neutron ml2 4. Add sfc related features in odl 5. Add sfc related repo making scripts 6. Add odl_sfc switch both in compass4nfv and compass-core Change-Id: If37a9e190c3095d771ffab61777a927b6d94ea9e Signed-off-by: Yifei Xue <xueyifei@huawei.com>
-rw-r--r--deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml2
-rw-r--r--deploy/adapters/ansible/roles/odl_cluster/tasks/01_04_install_pip_packages.yml4
-rw-r--r--deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml7
-rw-r--r--deploy/adapters/ansible/roles/odl_cluster/tasks/03_02_openvswitch_connect_opendaylight.yml28
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian2
-rwxr-xr-xdeploy/adapters/ansible/roles/odl_cluster/vars/main.yml16
-rwxr-xr-xdeploy/adapters/ansible/roles/tacker/vars/RedHat.yml2
-rw-r--r--deploy/client.py5
-rwxr-xr-xdeploy/compass_conf/templates/ansible_installer/openstack_newton/vars/HA-ansible-multinodes.tmpl1
-rw-r--r--deploy/conf/vm_environment/os-odl_l2-sfc-ha.yml47
-rwxr-xr-xdeploy/deploy_host.sh2
-rw-r--r--repo/openstack/make_ppa/ubuntu/xenial/newton/download_pkg.tmpl2
-rw-r--r--repo/pip/code_url.conf2
-rw-r--r--repo/pip/extra-requirement-tar.txt1
14 files changed, 113 insertions, 8 deletions
diff --git a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
index 38b8b0e6..eef8127e 100644
--- a/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
+++ b/deploy/adapters/ansible/openstack/HA-ansible-multinodes.yml
@@ -232,7 +232,7 @@
remote_user: root
max_fail_percentage: 0
roles:
-# - tacker
+ - tacker
- hosts: controller
remote_user: root
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_04_install_pip_packages.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_04_install_pip_packages.yml
index fa418c6c..cc4ae992 100644
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_04_install_pip_packages.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_04_install_pip_packages.yml
@@ -23,3 +23,7 @@
pip install {{ networking_odl_pkg_name }}
rm -rf {{ networking_odl_pkg_name }}
cd -
+
+- name: install networking-sfc
+ pip: name=networking-sfc state=present version=3.0.0
+ when: odl_sfc == "Enable"
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml
index 80443f1b..49396e35 100644
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/01_08_configure_neutron.yml
@@ -38,6 +38,13 @@
force_metadata "True";
when: odl_l3_agent == "Enable"
+- name: configure sfc
+ shell: |
+ crudini --set /etc/neutron/neutron.conf sfc drivers \
+ odl;
+ crudini --set /etc/neutron/neutron.conf flowclassifier drivers \
+ odl;
+ when: odl_sfc == "Enable"
- name: drop and recreate neutron database
shell: |
diff --git a/deploy/adapters/ansible/roles/odl_cluster/tasks/03_02_openvswitch_connect_opendaylight.yml b/deploy/adapters/ansible/roles/odl_cluster/tasks/03_02_openvswitch_connect_opendaylight.yml
index 2a9622f9..56326563 100644
--- a/deploy/adapters/ansible/roles/odl_cluster/tasks/03_02_openvswitch_connect_opendaylight.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/tasks/03_02_openvswitch_connect_opendaylight.yml
@@ -21,6 +21,34 @@
when: inventory_hostname in groups['odl']
ignore_errors: "True"
+- name: table configuration for netvirt
+ uri:
+ url: "{{ item.url }}"
+ method: PUT
+ user: "{{ odl_username }}"
+ password: "{{ odl_password }}"
+ body: "{{ item.body }}"
+ force_basic_auth: "yes"
+ body_format: json
+ status_code: 200, 201
+ with_items: "{{ conf_netvirt }}"
+ when: inventory_hostname == haproxy_hosts.keys()[0]
+ and odl_sfc == "Enable"
+
+- name: table configuration for sfc
+ uri:
+ url: "{{ item.url }}"
+ method: PUT
+ user: "{{ odl_username }}"
+ password: "{{ odl_password }}"
+ body: "{{ item.body }}"
+ force_basic_auth: "yes"
+ body_format: json
+ status_code: 200, 201
+ with_items: "{{ conf_sfc }}"
+ when: inventory_hostname == haproxy_hosts.keys()[0]
+ and odl_sfc == "Enable"
+
- name: set opendaylight as the manager
command: |
su -s /bin/sh -c "ovs-vsctl set-manager ptcp:6639:127.0.0.1 tcp:{{ internal_vip.ip }}:6640;"
diff --git a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian
index eebd47a6..743e7123 100755
--- a/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian
+++ b/deploy/adapters/ansible/roles/odl_cluster/templates/org.apache.karaf.features.cfg.Debian
@@ -41,7 +41,7 @@ featuresRepositories = mvn:org.apache.karaf.features/standard/3.0.7/xml/features
#
# Comma separated list of features to install at startup
#
-featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-ovsdb-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-openflowplugin-nxm-extensions
+featuresBoot=config,standard,region,package,kar,ssh,management,odl-restconf-all,odl-aaa-authn,odl-dlux-all,odl-ovsdb-openstack,odl-mdsal-apidocs,odl-dlux-core,odl-openflowplugin-nxm-extensions,odl-ovsdb-sfc,odl-netvirt-openstack-sfc-translator-rest
#
# Defines if the boot features are started in asynchronous mode (in a dedicated thread)
diff --git a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml
index a968e3ec..365247ef 100755
--- a/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml
+++ b/deploy/adapters/ansible/roles/odl_cluster/vars/main.yml
@@ -11,9 +11,19 @@ odl_username: admin
odl_password: admin
odl_api_port: 8181
-# odl_pkg_url: https://nexus.opendaylight.org/content/groups/public/org/
-# opendaylight/integration/distribution-karaf/0.3.0-Lithium/
-# distribution-karaf-0.3.0-Lithium.tar.gz
+netvirt_table: netvirt-providers-config:netvirt-providers-config
+sfc_table: sfc-of-renderer:sfc-of-renderer-config
+
+conf_netvirt:
+ - url: http://{{ internal_vip.ip }}:{{ odl_api_port }}/restconf/config/{{ netvirt_table }}
+ body: {"netvirt-providers-config":{"table-offset":1}}
+
+# yamllint disable rule:line-length
+conf_sfc:
+ - url: http://{{ internal_vip.ip }}:{{ odl_api_port }}/restconf/config/{{ sfc_table }}
+ body: {"sfc-of-renderer-config":{"sfc-of-table-offset":"150", "sfc-of-app-egress-table-offset":"11"}}
+# yamllint enable rule:line-length
+
odl_pkg_url: distribution-karaf-0.5.2-Boron-SR2.tar.gz
odl_pkg_name: distribution-karaf-0.5.2-Boron-SR2.tar.gz
odl_home: "/opt/opendaylight/"
diff --git a/deploy/adapters/ansible/roles/tacker/vars/RedHat.yml b/deploy/adapters/ansible/roles/tacker/vars/RedHat.yml
index 59a4dbd9..fc944f1b 100755
--- a/deploy/adapters/ansible/roles/tacker/vars/RedHat.yml
+++ b/deploy/adapters/ansible/roles/tacker/vars/RedHat.yml
@@ -12,3 +12,5 @@ packages:
- crudini
services: []
+
+heat_services: []
diff --git a/deploy/client.py b/deploy/client.py
index e3591e51..50e236f0 100644
--- a/deploy/client.py
+++ b/deploy/client.py
@@ -249,6 +249,9 @@ opts = [
cfg.StrOpt('onos_sfc',
help='onos_sfc enable flag',
default='Disable'),
+ cfg.StrOpt('odl_sfc',
+ help='odl_sfc enable flag',
+ default='Disable'),
]
CONF.register_cli_opts(opts)
@@ -779,6 +782,8 @@ class CompassClient(object):
if CONF.odl_l3_agent == "Enable" else "Disable"
package_config['onos_sfc'] = "Enable" \
if CONF.onos_sfc == "Enable" else "Disable"
+ package_config['odl_sfc'] = "Enable" \
+ if CONF.odl_sfc == "Enable" else "Disable"
status, resp = self.client.update_cluster_config(
cluster_id, package_config=package_config)
diff --git a/deploy/compass_conf/templates/ansible_installer/openstack_newton/vars/HA-ansible-multinodes.tmpl b/deploy/compass_conf/templates/ansible_installer/openstack_newton/vars/HA-ansible-multinodes.tmpl
index 467c9fc9..2202ab7a 100755
--- a/deploy/compass_conf/templates/ansible_installer/openstack_newton/vars/HA-ansible-multinodes.tmpl
+++ b/deploy/compass_conf/templates/ansible_installer/openstack_newton/vars/HA-ansible-multinodes.tmpl
@@ -33,6 +33,7 @@ odl_l3_agent: $getVar('odl_l3_agent', 'Disable')
ha_network: $getVar('ha_network', 'Disable')
onos_nic: $getVar('onos_nic', 'eth2')
onos_sfc: $getVar('onos_sfc', 'Disable')
+odl_sfc: $getVar('odl_sfc', 'Disable')
ip_settings: $ip_settings
network_cfg: $network_cfg
sys_intf_mappings: $sys_intf_mappings
diff --git a/deploy/conf/vm_environment/os-odl_l2-sfc-ha.yml b/deploy/conf/vm_environment/os-odl_l2-sfc-ha.yml
new file mode 100644
index 00000000..8b3c2033
--- /dev/null
+++ b/deploy/conf/vm_environment/os-odl_l2-sfc-ha.yml
@@ -0,0 +1,47 @@
+##############################################################################
+# Copyright (c) 2016 HUAWEI TECHNOLOGIES CO.,LTD and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
+---
+TYPE: virtual
+FLAVOR: cluster
+
+odl_sfc: "Enable"
+
+hosts:
+ - name: host1
+ roles:
+ - controller
+ - ha
+ - odl
+ - ceph-adm
+ - ceph-mon
+
+ - name: host2
+ roles:
+ - controller
+ - ha
+ - odl
+ - ceph-mon
+
+ - name: host3
+ roles:
+ - controller
+ - ha
+ - odl
+ - ceph-mon
+
+ - name: host4
+ roles:
+ - compute
+ - ceph-osd
+
+ - name: host5
+ roles:
+ - compute
+ - ceph-osd
diff --git a/deploy/deploy_host.sh b/deploy/deploy_host.sh
index a8132672..6454a4b9 100755
--- a/deploy/deploy_host.sh
+++ b/deploy/deploy_host.sh
@@ -49,7 +49,7 @@ function deploy_host(){
--cluster_vip="${VIP}" --network_cfg="$NETWORK" --neutron_cfg="$NEUTRON" \
--enable_secgroup="${ENABLE_SECGROUP}" --enable_fwaas="${ENABLE_FWAAS}" --expansion="${EXPANSION}" \
--rsa_file="$rsa_file" --enable_vpnaas="${ENABLE_VPNAAS}" --odl_l3_agent="${odl_l3_agent}" \
- --moon_cfg="${MOON_CFG}" --onos_sfc="${onos_sfc}"
+ --moon_cfg="${MOON_CFG}" --onos_sfc="${onos_sfc}" --odl_sfc="${odl_sfc}"
RET=$?
sleep $((AYNC_TIMEOUT+5))
diff --git a/repo/openstack/make_ppa/ubuntu/xenial/newton/download_pkg.tmpl b/repo/openstack/make_ppa/ubuntu/xenial/newton/download_pkg.tmpl
index 7bec8878..0790552c 100644
--- a/repo/openstack/make_ppa/ubuntu/xenial/newton/download_pkg.tmpl
+++ b/repo/openstack/make_ppa/ubuntu/xenial/newton/download_pkg.tmpl
@@ -11,7 +11,7 @@ apt-get install -d nova-compute-kvm -y
#make pernoca database
apt-get install -y apt-transport-https debconf-utils libaio1 libc6 libdbd-mysql-perl libgcc1 libgcrypt20 libstdc++6 python-software-properties wget
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
-add-apt-repository 'deb https://mirrors.tuna.tsinghua.edu.cn/mariadb/mariadb-10.0.26/repo/ubuntu/ xenial main'
+add-apt-repository 'deb http://ftp.hosteurope.de/mirror/archive.mariadb.org/mariadb-10.0.26/repo/ubuntu/ xenial main'
apt-get update
apt-get install -d mariadb-client mariadb-galera-server-10.0 galera-3 rsync socat -y
#make pernoca database end
diff --git a/repo/pip/code_url.conf b/repo/pip/code_url.conf
index c3c90c4c..8d82875c 100644
--- a/repo/pip/code_url.conf
+++ b/repo/pip/code_url.conf
@@ -16,7 +16,7 @@ export GIT_URL="https://github.com/openstack/keystone.git \
https://github.com/openstack/heat.git \
https://github.com/openstack/python-heatclient.git \
https://github.com/openstack/aodh.git \
- https://github.com/openstack/python-aodhclient.git \
+ https://github.com/openstack/python-aodhclient.git"
export PIP_GIT_URL="https://github.com/openstack/congress.git \
https://github.com/openstack/python-congressclient.git \
diff --git a/repo/pip/extra-requirement-tar.txt b/repo/pip/extra-requirement-tar.txt
index 6d70d563..46bcd98c 100644
--- a/repo/pip/extra-requirement-tar.txt
+++ b/repo/pip/extra-requirement-tar.txt
@@ -3,3 +3,4 @@
networking-odl==3.2.0
pymongo==3.0.3
+networking-sfc==3.0.0