Adding gluon to the Build and Deploysystem 83/27983/17
authorGeorg Kunz <georg.kunz@ericsson.com>
Fri, 3 Feb 2017 10:05:37 +0000 (11:05 +0100)
committerTim Rozet <trozet@redhat.com>
Fri, 10 Feb 2017 22:14:54 +0000 (17:14 -0500)
In order to make gluon really deployable some more things
need to be done:
  - Add pull request 103 which add yaml files which
    point to gluon puppet
  - Rename the scenario to odl-gluon similar to bgpvpn
    scenario
  - Add tht of gluon to overcloud-deploy-functions.sh

JIRA: APEX-379

opnfv-tht-pr: 103
opnfv-puppet-tripleo-pr: 13

Change-Id: I3ccfb5a279f1df21c4da79fc47039b3c0b6e5495
Signed-off-by: Nikolas Hermanns <nikolas.hermanns@ericsson.com>
Signed-off-by: Georg Kunz <georg.kunz@ericsson.com>
build/opnfv-environment.yaml
build/overcloud-opendaylight.sh
build/rpm_specs/opnfv-apex-common.spec
config/deploy/os-odl-gluon-noha.yaml [moved from config/deploy/os-odl_l3-gluon-noha.yaml with 93% similarity]
lib/overcloud-deploy-functions.sh
lib/python/apex/deploy_settings.py

index 381456e..ea14ef5 100644 (file)
@@ -104,6 +104,7 @@ parameter_defaults:
     - OS::TripleO::Services::FluentdClient
     - OS::TripleO::Services::VipHosts
     - OS::TripleO::Services::Etcd
+    - OS::TripleO::Services::Gluon
   ComputeServices:
     - OS::TripleO::Services::CACerts
     - OS::TripleO::Services::CephClient
index f64e514..def2bc4 100755 (executable)
@@ -64,6 +64,13 @@ wget https://github.com/oglok/networking-bgpvpn-rpm/raw/stable/newton/python-net
 popd > /dev/null
 tar czf networking-bgpvpn.tar.gz networking-bgpvpn/
 
+#Gluon puppet module
+rm -rf netready
+git clone -b master https://gerrit.opnfv.org/gerrit/netready
+pushd netready/ > /dev/null
+git archive --format=tar.gz HEAD:deploy/puppet/ > ${BUILD_DIR}/puppet-gluon.tar.gz
+popd > /dev/null
+
 # install ODL packages
 # install Jolokia for ODL HA
 # Patch in OPNFV custom puppet-tripleO
@@ -84,6 +91,11 @@ LIBGUESTFS_BACKEND=direct virt-customize \
     --run-command "cd /root/ && tar xzf networking-bgpvpn.tar.gz && cd networking-bgpvpn/ && yum localinstall -y *.rpm && rm -rf /root/networking-bgpvpn*" \
     --run-command "rm -f /etc/neutron/networking_bgpvpn.conf" \
     --run-command "touch /etc/neutron/networking_bgpvpn.conf" \
+    --upload ${BUILD_DIR}/puppet-gluon.tar.gz:/etc/puppet/modules/ \
+    --run-command "cd /etc/puppet/modules/ && tar xzf puppet-gluon.tar.gz" \
+    --install epel-release \
+    --install python-click \
+    --install http://artifacts.opnfv.org/netready/gluon-0.0.1-1_20170127.noarch.rpm \
     -a overcloud-full-opendaylight_build.qcow2
 
 mv overcloud-full-opendaylight_build.qcow2 overcloud-full-opendaylight.qcow2
index de6c303..db27184 100644 (file)
@@ -50,7 +50,7 @@ install config/deploy/os-odl-bgpvpn-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-a
 install config/deploy/os-odl_l2-fdio-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-ha.yaml
 install config/deploy/os-odl_l2-fdio-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-noha.yaml
 install config/deploy/os-odl_l3-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
-install config/deploy/os-odl_l3-gluon-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-gluon-noha.yaml
+install config/deploy/os-odl-gluon-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl-gluon-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
@@ -125,7 +125,7 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l2-fdio-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
-%{_sysconfdir}/opnfv-apex/os-odl_l3-gluon-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-odl-gluon-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
@@ -141,6 +141,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %doc %{_docdir}/opnfv/inventory.yaml.example
 
 %changelog
+* Fri Feb 3 2017 Nikolas Hermanns <nikolas.hermanns@ericsson.com> - 4.0-3
+- change odl_l3-gluon-noha to odl-gluon-noha
 * Thu Feb 2 2017 Feng Pan <fpan@redhat.com> - 4.0-2
 - Add odl_l3-gluon-noha config file
 * Wed Nov 2 2016 Dan Radez <dradez@redhat.com> - 4.0-1
similarity index 93%
rename from config/deploy/os-odl_l3-gluon-noha.yaml
rename to config/deploy/os-odl-gluon-noha.yaml
index 7812d05..cdeb90c 100644 (file)
@@ -9,3 +9,4 @@ deploy_options:
   congress: true
   sfc: false
   vpn: true
+  gluon: true
\ No newline at end of file
index 347bd74..77778e7 100755 (executable)
@@ -19,6 +19,9 @@ function overcloud_deploy {
       DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_sfc.yaml"
     elif [ "${deploy_options_array['vpn']}" == 'True' ]; then
       DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/neutron-opendaylight-bgpvpn.yaml"
+      if [ "${deploy_options_array['gluon']}" == 'True' ]; then
+        DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/services/gluon.yaml"
+      fi
     elif [ "${deploy_options_array['vpp']}" == 'True' ]; then
       DEPLOY_OPTIONS+=" -e /usr/share/openstack-tripleo-heat-templates/environments/opendaylight_fdio.yaml"
     else
index 24287b8..2a9d5a6 100644 (file)
@@ -22,7 +22,8 @@ REQ_DEPLOY_SETTINGS = ['sdn_controller',
                        'sfc',
                        'vpn',
                        'vpp',
-                       'ceph']
+                       'ceph',
+                       'gluon']
 
 OPT_DEPLOY_SETTINGS = ['performance', 'vsperf', 'ceph_device', 'yardstick']
 
@@ -69,6 +70,15 @@ class DeploySettings(dict):
         if not isinstance(deploy_options, dict):
             raise DeploySettingsException("deploy_options should be a list")
 
+        if ('gluon' in self['deploy_options'] and
+           'vpn' in self['deploy_options']):
+                if (self['deploy_options']['gluon'] is True and
+                   self['deploy_options']['vpn'] is False):
+                        raise DeploySettingsException(
+                            "Invalid deployment configuration: "
+                            "If gluon is enabled, "
+                            "vpn also needs to be enabled")
+
         for setting, value in deploy_options.items():
             if setting not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
                 raise DeploySettingsException("Invalid deploy_option {} "