From 8f72afed8531337a02c43835693a0caa2c977753 Mon Sep 17 00:00:00 2001 From: Michael Chapman Date: Wed, 1 Jun 2016 15:10:05 +1000 Subject: Add dataplane deploy setting 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 --- build/opnfv-apex-common.spec | 4 ++++ ci/deploy.sh | 6 ++++++ config/deploy/os-nosdn-ovs-ha.yaml | 24 ++++++++++++++++++++++++ config/deploy/os-nosdn-ovs-noha.yaml | 24 ++++++++++++++++++++++++ lib/python/apex/deploy_env.py | 26 +++++++++++++++++++------- 5 files changed, 77 insertions(+), 7 deletions(-) create mode 100644 config/deploy/os-nosdn-ovs-ha.yaml create mode 100644 config/deploy/os-nosdn-ovs-noha.yaml diff --git a/build/opnfv-apex-common.spec b/build/opnfv-apex-common.spec index 327df3bc..af0f9332 100644 --- a/build/opnfv-apex-common.spec +++ b/build/opnfv-apex-common.spec @@ -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 diff --git a/ci/deploy.sh b/ci/deploy.sh index 30a6af29..d31993fe 100755 --- a/ci/deploy.sh +++ b/ci/deploy.sh @@ -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 index 00000000..b1715869 --- /dev/null +++ b/config/deploy/os-nosdn-ovs-ha.yaml @@ -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 index 00000000..ea6b4e0e --- /dev/null +++ b/config/deploy/os-nosdn-ovs-noha.yaml @@ -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 diff --git a/lib/python/apex/deploy_env.py b/lib/python/apex/deploy_env.py index bfb94f50..25e2d0a7 100644 --- a/lib/python/apex/deploy_env.py +++ b/lib/python/apex/deploy_env.py @@ -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): -- cgit 1.2.3-korg