Adding OVN as an SDN option to Apex 51/23851/17
authorDan Radez <dradez@redhat.com>
Wed, 26 Oct 2016 13:22:12 +0000 (09:22 -0400)
committerDan Radez <dradez@redhat.com>
Mon, 27 Mar 2017 16:36:03 +0000 (12:36 -0400)
JIRA: APEX-129

opnfv-tht-pr: 111
opnfv-puppet-tripleo-pr: 18

Change-Id: I71de5802ed476b6f78ad5a718ac15d9aec9a6a1d
Signed-off-by: Dan Radez <dradez@redhat.com>
build/opnfv-environment.yaml
build/overcloud-full.sh
build/rpm_specs/opnfv-apex-common.spec
ci/PR_revision.log
config/deploy/os-ovn-nofeature-noha.yaml [new file with mode: 0644]
lib/overcloud-deploy-functions.sh

index b42779b..0018aa9 100644 (file)
@@ -114,6 +114,7 @@ parameter_defaults:
     - OS::TripleO::Services::NeutronHoneycombAgent
     - OS::TripleO::Services::Congress
     - OS::TripleO::Services::NeutronVppAgent
+    - OS::TripleO::Services::OVNDBs
   ComputeServices:
     - OS::TripleO::Services::CACerts
     - OS::TripleO::Services::CephClient
index cfda039..dbf297f 100755 (executable)
@@ -68,6 +68,13 @@ pushd puppet-tacker > /dev/null
 git archive --format=tar.gz --prefix=tacker/ origin/stable/ocata > ${BUILD_DIR}/puppet-tacker.tar.gz
 popd > /dev/null
 
+# tar up the ovn puppet module
+rm -rf puppet-ovn
+git clone https://github.com/openstack/puppet-ovn
+pushd puppet-ovn > /dev/null
+git archive --format=tar.gz --prefix=ovn/ origin/stable/ocata > ${BUILD_DIR}/puppet-ovn.tar.gz
+popd > /dev/null
+
 # Master FD.IO Repo
 cat > ${BUILD_DIR}/fdio.repo << EOF
 [fdio-master]
@@ -104,11 +111,11 @@ qemu-img resize overcloud-full_build.qcow2 +900MB
 LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "xfs_growfs /dev/sda" \
     --upload ${BUILD_DIR}/opnfv-puppet-tripleo.tar.gz:/etc/puppet/modules \
+    --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \
     --run-command "yum update -y python-ipaddress rabbitmq-server erlang*" \
     --run-command "if ! rpm -qa | grep python-redis; then yum install -y python-redis; fi" \
     --run-command "sed -i 's/^#UseDNS.*$/UseDNS no/' /etc/ssh/sshd_config" \
     --run-command "sed -i 's/^GSSAPIAuthentication.*$/GSSAPIAuthentication no/' /etc/ssh/sshd_config" \
-    --run-command "cd /etc/puppet/modules && rm -rf tripleo && tar xzf opnfv-puppet-tripleo.tar.gz" \
     --run-command "mkdir /root/dpdk_rpms" \
     --upload ${BUILD_DIR}/fdio.repo:/etc/yum.repos.d/fdio.repo \
     $dpdk_pkg_str \
@@ -142,6 +149,11 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --install /root/$tacker_pkg \
     --upload ${BUILD_DIR}/noarch/$tackerclient_pkg:/root/ \
     --install /root/$tackerclient_pkg \
+    --upload ${BUILD_DIR}/puppet-ovn.tar.gz:/etc/puppet/modules/ \
+    --run-command "cd /etc/puppet/modules/ && rm -fr ovn && tar xzf puppet-ovn.tar.gz" \
+    --run-command "curl -f https://copr.fedorainfracloud.org/coprs/leifmadsen/ovs-master/repo/epel-7/leifmadsen-ovs-master-epel-7.repo > /etc/yum.repos.d/leifmadsen-ovs-master-epel-7.repo" \
+    --run-command "mkdir /root/ovs27" \
+    --run-command "yumdownloader --destdir=/root/ovs27 openvswitch*2.7* python-openvswitch-2.7*" \
     --run-command "pip install python-senlinclient" \
     --run-command "sed -i -E 's/timeout=[0-9]+/timeout=60/g' /usr/share/openstack-puppet/modules/rabbitmq/lib/puppet/provider/rabbitmqctl.rb" \
     --upload ${BUILD_ROOT}/patches/puppet-neutron-add-odl-settings.patch:/usr/share/openstack-puppet/modules/neutron/ \
index 4266897..c1bf296 100644 (file)
@@ -59,6 +59,7 @@ install config/deploy/os-odl_l3-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/o
 install config/deploy/os-odl_l3-ovs-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-ovs-ha.yaml
 install config/deploy/os-odl_l3-ovs-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-ovs-noha.yaml
 install config/deploy/os-odl-gluon-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml
+install config/deploy/os-ovn-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ovn-nofeature-noha.yaml
 #install config/deploy/os-onos-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
 #install config/deploy/os-onos-sfc-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
 install config/deploy/os-ocl-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
@@ -144,6 +145,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl-gluon-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-ovn-nofeature-noha.yaml
 #%{_sysconfdir}/opnfv-apex/os-onos-nofeature-ha.yaml
 #%{_sysconfdir}/opnfv-apex/os-onos-sfc-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-ocl-nofeature-ha.yaml
@@ -170,6 +172,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 * Wed Mar 08 2017 Dan Radez <dradez@redhat.com> - 4.0-5
 - Commenting out ONOS, unsupported in Danube
 - Adding kvm4nfv files
+- Adding OVN files
 * Tue Feb 14 2017 Feng Pan <fpan@redhat.com> - 4.0-4
 - Add network_settings_vpp.yaml
 * Fri Feb 3 2017 Nikolas Hermanns <nikolas.hermanns@ericsson.com> - 4.0-3
index 067aa8b..58f3eda 100644 (file)
@@ -15,3 +15,4 @@
 120,Add old openflow port (6633) and karaf ssh port (8101)
 123,Disable L3 HA for ODL/FDIO scenarios
 124,setting keystone region for tacker and congress
+111,Backporting OVN fixes
diff --git a/config/deploy/os-ovn-nofeature-noha.yaml b/config/deploy/os-ovn-nofeature-noha.yaml
new file mode 100644 (file)
index 0000000..e03ac0a
--- /dev/null
@@ -0,0 +1,10 @@
+global_params:
+  ha_enabled: false
+
+deploy_options:
+  sdn_controller: ovn
+  sdn_l3: false
+  tacker: false
+  congress: true
+  sfc: false
+  vpn: false
index 8f5b1a2..ec03aaa 100755 (executable)
@@ -55,6 +55,15 @@ function overcloud_deploy {
     #  DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/onos.yaml"
     #fi
     #SDN_IMAGE=onos
+  elif [ "${deploy_options_array['sdn_controller']}" == 'ovn' ]; then
+    if [[ "$ha_enabled" == "True" ]]; then
+      DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-ovn-ha.yaml"
+      echo "${red}OVN HA support is not not supported... exiting.${reset}"
+      exit 1
+    else
+      DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-ml2-ovn.yaml"
+    fi
+    SDN_IMAGE=opendaylight
   elif [ "${deploy_options_array['sdn_controller']}" == 'opencontrail' ]; then
     echo -e "${red}ERROR: OpenContrail is currently unsupported...exiting${reset}"
     exit 1
@@ -256,6 +265,17 @@ EOI
     DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/storage-environment.yaml"
   fi
 
+  if [ "${deploy_options_array['sdn_controller']}" == 'ovn' ]; then
+    # The epoch in deloran's ovs is 1: and in leif's is 0:
+    # so we have to execute a downgrade instead of an update
+    ssh -T ${SSH_OPTIONS[@]} "stack@$UNDERCLOUD" <<EOI
+      LIBGUESTFS_BACKEND=direct virt-customize \
+        --run-command "cd /root/ovs27 && yum update -y *openvswitch*" \
+        --run-command "cd /root/ovs27 && yum downgrade -y *openvswitch*" \
+        -a overcloud-full.qcow2
+EOI
+  fi
+
   # get number of nodes available in inventory
   num_control_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:control /home/stack/instackenv.json")
   num_compute_nodes=$(ssh -T ${SSH_OPTIONS[@]} "root@$UNDERCLOUD" "grep -c profile:compute /home/stack/instackenv.json")