Add dataplane deploy setting 35/14935/10
authorMichael Chapman <woppin@gmail.com>
Wed, 1 Jun 2016 05:10:05 +0000 (15:10 +1000)
committerMichael Chapman <woppin@gmail.com>
Wed, 8 Jun 2016 15:27:39 +0000 (01:27 +1000)
Adds the dataplane deploy option, which can have values of
ovs, ovs_dpdk, or fdio. Currently does nothing

JIRA: APEX-119

Change-Id: I6c14a9c9d6887a325525d634052ea8300b30ee57
Signed-off-by: Michael Chapman <woppin@gmail.com>
build/opnfv-apex-common.spec
ci/deploy.sh
config/deploy/os-nosdn-ovs-ha.yaml [new file with mode: 0644]
config/deploy/os-nosdn-ovs-noha.yaml [new file with mode: 0644]
lib/python/apex/deploy_env.py

index 327df3b..af0f933 100644 (file)
@@ -34,8 +34,10 @@ install ci/util.sh %{buildroot}%{_bindir}/opnfv-util
 
 mkdir -p %{buildroot}%{_sysconfdir}/opnfv-apex/
 install config/deploy/os-nosdn-nofeature-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
+install config/deploy/os-nosdn-ovs-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
 install config/deploy/os-nosdn-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
 install config/deploy/os-nosdn-performance-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
+install config/deploy/os-nosdn-ovs-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-ha.yaml
 install config/deploy/os-odl_l2-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
 install config/deploy/os-odl_l2-sfc-noha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-noha.yaml
 install config/deploy/os-odl_l3-nofeature-ha.yaml %{buildroot}%{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
@@ -80,8 +82,10 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/
 %{python3_sitelib}/apex/
 %{_var}/opt/opnfv/lib/installer/onos/onos_gw_mac_update.sh
 %{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-noha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-nosdn-performance-ha.yaml
+%{_sysconfdir}/opnfv-apex/os-nosdn-ovs-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l2-nofeature-ha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l2-sfc-noha.yaml
 %{_sysconfdir}/opnfv-apex/os-odl_l3-nofeature-ha.yaml
index 30a6af2..d31993f 100755 (executable)
@@ -789,6 +789,12 @@ function undercloud_prep_overcloud_deploy {
     exit 1
   fi
 
+  # Handle different dataplanes
+  if [ "${deploy_options_array['dataplane']}" != 'ovs']; then
+    echo "${red}ovs is the only currently available dataplane. ${deploy_options_array['dataplane']} not implemented${reset}"
+    exit 1
+  fi
+
   # Make sure the correct overcloud image is available
   if [ ! -f $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 ]; then
       echo "${red} $RESOURCES/overcloud-full-${SDN_IMAGE}.qcow2 is required to execute your deployment."
diff --git a/config/deploy/os-nosdn-ovs-ha.yaml b/config/deploy/os-nosdn-ovs-ha.yaml
new file mode 100644 (file)
index 0000000..b171586
--- /dev/null
@@ -0,0 +1,24 @@
+global_params:
+  ha_enabled: true
+
+deploy_options:
+  sdn_controller: false
+  sdn_l3: false
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
+  dataplane: ovs_dpdk
+  performance:
+    Controller:
+      kernel:
+        hugepages: 1024
+        hugepagesz: 2M
+    Compute:
+      nova:
+        libvirtpin: 1
+      kernel:
+        hugepagesz: 2M
+        hugepages: 1024
+        intel_iommu: 'on'
+        iommu: pt
diff --git a/config/deploy/os-nosdn-ovs-noha.yaml b/config/deploy/os-nosdn-ovs-noha.yaml
new file mode 100644 (file)
index 0000000..ea6b4e0
--- /dev/null
@@ -0,0 +1,24 @@
+global_params:
+  ha_enabled: false
+
+deploy_options:
+  sdn_controller: false
+  sdn_l3: false
+  tacker: false
+  congress: false
+  sfc: false
+  vpn: false
+  dataplane: ovs_dpdk
+  performance:
+    Controller:
+      kernel:
+        hugepagesz: 2M
+        hugepages: 1024
+    Compute:
+      nova:
+        libvirtpin: 1
+      kernel:
+        hugepagesz: 2M
+        hugepages: 1024
+        intel_iommu: 'on'
+        iommu: pt
index bfb94f5..25e2d0a 100644 (file)
@@ -15,6 +15,7 @@ REQ_DEPLOY_SETTINGS = ['sdn_controller',
                        'sdn_l3',
                        'tacker',
                        'congress',
+                       'dataplane',
                        'sfc',
                        'vpn']
 
@@ -22,6 +23,7 @@ OPT_DEPLOY_SETTINGS = ['performance']
 
 VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage']
 VALID_PERF_OPTS = ['kernel','nova']
+VALID_DATAPLANES = ['ovs','ovs_dpdk','fdio']
 
 class DeploySettings:
     """
@@ -54,14 +56,24 @@ class DeploySettings:
         if not isinstance(deploy_options, dict):
             raise DeploySettingsException("deploy_options should be a list")
 
-        for option in deploy_options:
-            if option not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
+        for setting, value in deploy_options.items():
+            if setting not in REQ_DEPLOY_SETTINGS + OPT_DEPLOY_SETTINGS:
                 raise DeploySettingsException("Invalid deploy_option {} "
-                                              "specified".format(option))
-
-        for required_setting in REQ_DEPLOY_SETTINGS:
-            if required_setting not in deploy_options:
-                self.deploy_settings['deploy_options']['required'] = False
+                                              "specified".format(setting))
+            if setting == 'dataplane':
+                if value not in VALID_DATAPLANES:
+                    planes = ' '.join(VALID_DATAPLANES)
+                    raise DeploySettingsException("Invalid dataplane {} "
+                                                  "specified. Valid dataplanes:"
+                                                  " {}".format(value,planes))
+
+
+        for req_set in REQ_DEPLOY_SETTINGS:
+            if req_set not in deploy_options:
+                if req_set == 'dataplane':
+                    self.deploy_settings['deploy_options'][req_set] = 'ovs'
+                else:
+                    self.deploy_settings['deploy_options'][req_set] = False
 
         if 'performance' in deploy_options:
             if not isinstance(deploy_options['performance'], dict):