diff options
author | Feng Pan <fpan@redhat.com> | 2017-09-11 15:58:49 -0400 |
---|---|---|
committer | Feng Pan <fpan@redhat.com> | 2017-09-28 19:56:09 -0400 |
commit | a3c2c8c746470c993d70d92d13415e2b4263cc25 (patch) | |
tree | 503f3a4deed376768693bac148a36a145c55cbfe | |
parent | 7af8cf039ef21da528a8cb53e0eb78c1b6878714 (diff) |
re-enable support for fdio dvr scenario
- Update FDIO scenarios to use master branch images
- Update VPP/HC version to master for all fdio scenarios
apex-os-net-config: Ie6aee86eaccad5fc98820a28f10adc7475cc5e33
apex-tripleo-heat-templates: Ie8b284f64bd6491c389129d8afdaeae8a399b607
apex-puppet-tripleo: I9954240529278e74d93fdf89d2ebc2536249245a
Change-Id: I31740f97052947b5e4688cca47320bc49a902d7c
Signed-off-by: Feng Pan <fpan@redhat.com>
-rw-r--r-- | apex/deploy.py | 12 | ||||
-rw-r--r-- | apex/overcloud/config.py | 12 | ||||
-rw-r--r-- | apex/overcloud/overcloud_deploy.py | 77 | ||||
-rw-r--r-- | apex/settings/deploy_settings.py | 6 | ||||
-rwxr-xr-x | build/overcloud-full.sh | 14 | ||||
-rwxr-xr-x | build/overcloud-opendaylight.sh | 16 | ||||
-rw-r--r-- | build/rpm_specs/opnfv-apex-common.spec | 4 | ||||
-rw-r--r-- | build/variables.sh | 9 | ||||
-rw-r--r-- | config/deploy/os-odl-fdio-ha.yaml | 2 | ||||
-rw-r--r-- | config/deploy/os-odl-fdio-noha.yaml | 2 | ||||
-rw-r--r-- | config/deploy/os-odl-fdio_dvr-ha.yaml (renamed from config/deploy/os-odl-fdio-dvr-ha.yaml) | 4 | ||||
-rw-r--r-- | config/deploy/os-odl-fdio_dvr-noha.yaml (renamed from config/deploy/os-odl-fdio-dvr-noha.yaml) | 4 |
12 files changed, 101 insertions, 61 deletions
diff --git a/apex/deploy.py b/apex/deploy.py index a0561384..89b0e9f5 100644 --- a/apex/deploy.py +++ b/apex/deploy.py @@ -58,6 +58,14 @@ def validate_cross_settings(deploy_settings, net_settings, inventory): raise ApexDeployException("Setting a DPDK based dataplane requires" "a dedicated NIC for tenant network") + if 'odl_vpp_routing_node' in deploy_settings['deploy_options']: + if deploy_settings['deploy_options']['dataplane'] != 'fdio': + raise ApexDeployException("odl_vpp_routing_node should only be set" + "when dataplane is set to fdio") + if deploy_settings['deploy_options'].get('dvr') is True: + raise ApexDeployException("odl_vpp_routing_node should only be set" + "when dvr is not enabled") + # TODO(trozet): add more checks here like RAM for ODL, etc # check if odl_vpp_netvirt is true and vpp is set # Check if fdio and nosdn: @@ -336,8 +344,8 @@ def main(): overcloud_deploy.prep_image(deploy_settings, sdn_image, APEX_TEMP_DIR, root_pw=root_pw) opnfv_env = os.path.join(args.deploy_dir, args.env_file) - overcloud_deploy.prep_env(deploy_settings, net_settings, opnfv_env, - net_env_target, APEX_TEMP_DIR) + overcloud_deploy.prep_env(deploy_settings, net_settings, inventory, + opnfv_env, net_env_target, APEX_TEMP_DIR) overcloud_deploy.create_deploy_cmd(deploy_settings, net_settings, inventory, APEX_TEMP_DIR, args.virtual, args.env_file) diff --git a/apex/overcloud/config.py b/apex/overcloud/config.py index e48b254f..a7f7d848 100644 --- a/apex/overcloud/config.py +++ b/apex/overcloud/config.py @@ -44,10 +44,14 @@ def create_nic_template(network_settings, deploy_settings, role, template_dir, ovs_dpdk_br = '' if ds['dataplane'] == 'fdio': nets['tenant']['nic_mapping'][role]['phys_type'] = 'vpp_interface' - if ds['sdn_controller'] == 'opendaylight' and role == 'compute': - nets['external'][0]['nic_mapping'][role]['phys_type'] = \ - 'vpp_interface' - ext_net = 'vpp_interface' + if ds['sdn_controller'] == 'opendaylight': + if role == 'compute': + nets['external'][0]['nic_mapping'][role]['phys_type'] = \ + 'vpp_interface' + ext_net = 'vpp_interface' + if ds.get('dvr') is True: + nets['admin']['nic_mapping'][role]['phys_type'] = \ + 'linux_bridge' elif ds['dataplane'] == 'ovs_dpdk': ovs_dpdk_br = 'br-phy' if (ds.get('performance', {}).get(role.title(), {}).get('vpp', {}) diff --git a/apex/overcloud/overcloud_deploy.py b/apex/overcloud/overcloud_deploy.py index 20fb4a60..395e6239 100644 --- a/apex/overcloud/overcloud_deploy.py +++ b/apex/overcloud/overcloud_deploy.py @@ -35,6 +35,7 @@ SDN_FILE_MAP = { 'gluon': 'gluon.yaml', 'vpp': { 'odl_vpp_netvirt': 'neutron-opendaylight-netvirt-vpp.yaml', + 'dvr': 'neutron-opendaylight-fdio-dvr.yaml', 'default': 'neutron-opendaylight-honeycomb.yaml' }, 'default': 'neutron-opendaylight.yaml', @@ -92,6 +93,34 @@ def build_sdn_env_list(ds, sdn_map, env_list=None): return env_list +def _get_node_counts(inventory): + """ + Return numbers of controller and compute nodes in inventory + + :param inventory: node inventory data structure + :return: number of controller and compute nodes in inventory + """ + if not inventory: + raise ApexDeployException("Empty inventory") + + nodes = inventory['nodes'] + num_control = 0 + num_compute = 0 + for node in nodes: + if node['capabilities'] == 'profile:control': + num_control += 1 + elif node['capabilities'] == 'profile:compute': + num_compute += 1 + else: + # TODO(trozet) do we want to allow capabilities to not exist? + logging.error("Every node must include a 'capabilities' key " + "tagged with either 'profile:control' or " + "'profile:compute'") + raise ApexDeployException("Node missing capabilities " + "key: {}".format(node)) + return num_control, num_compute + + def create_deploy_cmd(ds, ns, inv, tmp_dir, virtual, env_file='opnfv-environment.yaml'): @@ -118,21 +147,7 @@ def create_deploy_cmd(ds, ns, inv, tmp_dir, else: deploy_options.append('baremetal-environment.yaml') - nodes = inv['nodes'] - num_control = 0 - num_compute = 0 - for node in nodes: - if 'profile:control' in node['capabilities']: - num_control += 1 - elif 'profile:compute' in node['capabilities']: - num_compute += 1 - else: - # TODO(trozet) do we want to allow capabilities to not exist? - logging.error("Every node must include a 'capabilities' key " - "tagged with either 'profile:control' or " - "'profile:compute'") - raise ApexDeployException("Node missing capabilities " - "key: {}".format(node)) + num_control, num_compute = _get_node_counts(inv) if num_control == 0 or num_compute == 0: logging.error("Detected 0 control or compute nodes. Control nodes: " "{}, compute nodes{}".format(num_control, num_compute)) @@ -235,13 +250,22 @@ def prep_image(ds, img, tmp_dir, root_pw=None): if ds_opts['odl_version'] != con.DEFAULT_ODL_VERSION: virt_cmds.extend([ {con.VIRT_RUN_CMD: "yum -y remove opendaylight"}, - {con.VIRT_RUN_CMD: "yum -y install /root/{}/*".format( - ds_opts['odl_version'])}, {con.VIRT_RUN_CMD: "rm -rf /etc/puppet/modules/opendaylight"}, {con.VIRT_RUN_CMD: "cd /etc/puppet/modules && tar xzf " "/root/puppet-opendaylight-" "{}.tar.gz".format(ds_opts['odl_version'])} ]) + if ds_opts['odl_version'] == 'master': + virt_cmds.extend([ + {con.VIRT_RUN_CMD: "rpm -ivh --nodeps /root/{}/*".format( + ds_opts['odl_version'])} + ]) + else: + virt_cmds.extend([ + {con.VIRT_RUN_CMD: "yum -y install /root/{}/*".format( + ds_opts['odl_version'])} + ]) + elif sdn == 'opendaylight' and 'odl_vpp_netvirt' in ds_opts \ and ds_opts['odl_vpp_netvirt']: virt_cmds.extend([ @@ -289,11 +313,12 @@ def make_ssh_key(): return private_key.decode('utf-8'), pub_key -def prep_env(ds, ns, opnfv_env, net_env, tmp_dir): +def prep_env(ds, ns, inv, opnfv_env, net_env, tmp_dir): """ Creates modified opnfv/network environments for deployment :param ds: deploy settings :param ns: network settings + :param inv: node inventory :param opnfv_env: file path for opnfv-environment file :param net_env: file path for network-environment file :param tmp_dir: Apex tmp dir @@ -351,10 +376,9 @@ def prep_env(ds, ns, opnfv_env, net_env, tmp_dir): output_line = " key: '{}'".format(public_key) if ds_opts['sdn_controller'] == 'opendaylight' and \ - 'odl_vpp_routing_node' in ds_opts and ds_opts[ - 'odl_vpp_routing_node'] != 'dvr': + 'odl_vpp_routing_node' in ds_opts: if 'opendaylight::vpp_routing_node' in line: - output_line = (" opendaylight::vpp_routing_node: ${}.${}" + output_line = (" opendaylight::vpp_routing_node: {}.{}" .format(ds_opts['odl_vpp_routing_node'], ns['domain_name'])) elif 'ControllerExtraConfig' in line: @@ -373,6 +397,17 @@ def prep_env(ds, ns, opnfv_env, net_env, tmp_dir): if 'NeutronVPPAgentPhysnets' in line: output_line = (" NeutronVPPAgentPhysnets: 'datacentre:{}'". format(tenant_ctrl_nic)) + elif ds_opts['sdn_controller'] == 'opendaylight' and ds_opts.get( + 'dvr') is True: + if 'OS::TripleO::Services::NeutronDhcpAgent' in line: + output_line = '' + elif 'NeutronDhcpAgentsPerNetwork' in line: + num_control, num_compute = _get_node_counts(inv) + output_line = (" NeutronDhcpAgentsPerNetwork: {}" + .format(num_compute)) + elif 'ComputeServices' in line: + output_line = (" ComputeServices:\n" + " - OS::TripleO::Services::NeutronDhcpAgent") if perf: for role in 'NovaCompute', 'Controller': diff --git a/apex/settings/deploy_settings.py b/apex/settings/deploy_settings.py index 793e43ac..164997ec 100644 --- a/apex/settings/deploy_settings.py +++ b/apex/settings/deploy_settings.py @@ -31,13 +31,14 @@ OPT_DEPLOY_SETTINGS = ['performance', 'yardstick', 'dovetail', 'odl_vpp_routing_node', + 'dvr', 'odl_vpp_netvirt', 'barometer'] VALID_ROLES = ['Controller', 'Compute', 'ObjectStorage'] VALID_PERF_OPTS = ['kernel', 'nova', 'vpp', 'ovs'] VALID_DATAPLANES = ['ovs', 'ovs_dpdk', 'fdio'] -VALID_ODL_VERSIONS = ['carbon', 'nitrogen', 'master'] +VALID_ODL_VERSIONS = ['carbon', 'nitrogen', 'oxygen', 'master'] class DeploySettings(dict): @@ -110,6 +111,9 @@ class DeploySettings(dict): "Invalid ODL version: {}".format(self[deploy_options][ 'odl_version'])) + if self['deploy_options']['odl_version'] == 'oxygen': + self['deploy_options']['odl_version'] = 'master' + if 'performance' in deploy_options: if not isinstance(deploy_options['performance'], dict): raise DeploySettingsException("Performance deploy_option" diff --git a/build/overcloud-full.sh b/build/overcloud-full.sh index af582f17..2e964022 100755 --- a/build/overcloud-full.sh +++ b/build/overcloud-full.sh @@ -58,7 +58,6 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --install epel-release \ --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 "rm -f /etc/sysctl.d/80-vpp.conf" \ --install unzip \ --upload ${BUILD_DIR}/vsperf.tar.gz:/var/opt \ --run-command "cd /var/opt && tar xzf vsperf.tar.gz" \ @@ -104,8 +103,6 @@ done rm -rf puppet-fdio git clone https://git.fd.io/puppet-fdio pushd puppet-fdio > /dev/null -#TODO: Remove this when we update to 17.07 -git revert a6e575c8f0af17e62990653bcf4a12c688c21aad --no-edit git archive --format=tar.gz --prefix=fdio/ HEAD > ${BUILD_DIR}/puppet-fdio.tar.gz popd > /dev/null @@ -133,13 +130,6 @@ EOF # Get Real Time Kernel from kvm4nfv populate_cache $kvmfornfv_uri_base/$kvmfornfv_kernel_rpm -# packages frozen for fdio scenarios -fdio_pkg_str='' -for package in ${fdio_pkgs[@]}; do - wget "$package" - fdio_pkg_str+=" --upload ${BUILD_DIR}/${package##*/}:/root/fdio/" -done - # upload dpdk rpms but do not install # install fd.io yum repo and packages # upload puppet fdio @@ -154,7 +144,9 @@ LIBGUESTFS_BACKEND=direct virt-customize \ --upload ${BUILD_DIR}/kubernetes.repo:/etc/yum.repos.d/ \ --run-command "mkdir /root/fdio" \ --upload ${BUILD_DIR}/noarch/$netvpp_pkg:/root/fdio \ - $fdio_pkg_str \ + --install honeycomb \ + --install vpp-plugins,vpp,vpp-lib,vpp-api-python \ + --run-command "rm -f /etc/sysctl.d/80-vpp.conf" \ --run-command "yum install -y /root/fdio/*.rpm" \ --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/ovs28" \ diff --git a/build/overcloud-opendaylight.sh b/build/overcloud-opendaylight.sh index c850005e..22a539af 100755 --- a/build/overcloud-opendaylight.sh +++ b/build/overcloud-opendaylight.sh @@ -35,6 +35,14 @@ enabled=1 gpgcheck=0 EOF +cat > ${BUILD_DIR}/opendaylight_master.repo << EOF +[opendaylight-master] +name=OpenDaylight master repository +baseurl=https://nexus.opendaylight.org/content/repositories/opendaylight-oxygen-epel-7-x86_64-devel/ +enabled=1 +gpgcheck=0 +EOF + # OpenDaylight Puppet Module rm -rf puppet-opendaylight git clone -b stable/carbon https://git.opendaylight.org/gerrit/integration/packaging/puppet-opendaylight @@ -61,10 +69,12 @@ populate_cache http://artifacts.opnfv.org/apex/danube/fdio_netvirt/opendaylight- # install ODL packages # Patch in OPNFV custom puppet-tripleO -# install Honeycomb # install quagga/zrpc # upload neutron patch for generic NS linux interface driver + OVS for external networks LIBGUESTFS_BACKEND=direct virt-customize \ + --upload ${BUILD_DIR}/opendaylight_master.repo:/etc/yum.repos.d/opendaylight.repo \ + --run-command "mkdir -p /root/master" \ + --run-command "yumdownloader --destdir=/root/master opendaylight" \ --upload ${BUILD_DIR}/opendaylight_nitrogen.repo:/etc/yum.repos.d/opendaylight.repo \ --run-command "mkdir -p /root/nitrogen" \ --run-command "yum install --downloadonly --downloaddir=/root/nitrogen opendaylight" \ @@ -90,12 +100,8 @@ if [ "$(uname -i)" == 'x86_64' ]; then # Download quagga/zrpc rpms populate_cache http://artifacts.opnfv.org/apex/danube/quagga/quagga-3.tar.gz -# Download Honeycomb -populate_cache $honeycomb_pkg LIBGUESTFS_BACKEND=direct virt-customize \ - --upload ${CACHE_DIR}/${honeycomb_pkg##*/}:/root/fdio/ \ - --run-command "yum install -y /root/fdio/${honeycomb_pkg##*/}" \ --install zeromq-4.1.4 \ --upload ${CACHE_DIR}/quagga-3.tar.gz:/root/ \ --run-command "cd /root/ && tar xzf quagga-3.tar.gz" \ diff --git a/build/rpm_specs/opnfv-apex-common.spec b/build/rpm_specs/opnfv-apex-common.spec index c2e2f14e..0bf244ec 100644 --- a/build/rpm_specs/opnfv-apex-common.spec +++ b/build/rpm_specs/opnfv-apex-common.spec @@ -86,8 +86,8 @@ install config/inventory/pod_example_settings.yaml %{buildroot}%{_docdir}/opnfv/ %{_sysconfdir}/opnfv-apex/os-odl-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl_netvirt-fdio-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-fdio-ha.yaml -%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-ha.yaml -%{_sysconfdir}/opnfv-apex/os-odl-fdio-dvr-noha.yaml +%{_sysconfdir}/opnfv-apex/os-odl-fdio_dvr-ha.yaml +%{_sysconfdir}/opnfv-apex/os-odl-fdio_dvr-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-noha.yaml %{_sysconfdir}/opnfv-apex/os-odl-ovs_dpdk-ha.yaml %{_sysconfdir}/opnfv-apex/os-odl-nofeature-ha.yaml diff --git a/build/variables.sh b/build/variables.sh index 8d736d30..69e1fa09 100644 --- a/build/variables.sh +++ b/build/variables.sh @@ -44,12 +44,3 @@ netvpp_commit=$(git ls-remote ${netvpp_repo} ${netvpp_branch} | awk '{print subs netvpp_pkg=python-networking-vpp-0.0.1-1.git${NETVPP_COMMIT}$(rpm -E %dist).noarch.rpm gluon_rpm=gluon-0.0.1-1_20170302.noarch.rpm - -fdio_pkgs=( -'http://artifacts.opnfv.org/apex/danube/fdio_common_rpms/vpp-17.04.1-3~ge3b7ad7~b72.x86_64.rpm' -'http://artifacts.opnfv.org/apex/danube/fdio_common_rpms/vpp-api-python-17.04.1-3~ge3b7ad7~b72.x86_64.rpm' -'http://artifacts.opnfv.org/apex/danube/fdio_common_rpms/vpp-lib-17.04.1-3~ge3b7ad7~b72.x86_64.rpm' -'http://artifacts.opnfv.org/apex/danube/fdio_common_rpms/vpp-plugins-17.04.1-3~ge3b7ad7~b72.x86_64.rpm' -) - -honeycomb_pkg='http://artifacts.opnfv.org/apex/danube/fdio_common_rpms/honeycomb-1.17.04.1-2073.noarch.rpm' diff --git a/config/deploy/os-odl-fdio-ha.yaml b/config/deploy/os-odl-fdio-ha.yaml index c02b22be..2125265e 100644 --- a/config/deploy/os-odl-fdio-ha.yaml +++ b/config/deploy/os-odl-fdio-ha.yaml @@ -4,7 +4,7 @@ global_params: deploy_options: sdn_controller: opendaylight - odl_version: carbon + odl_version: oxygen odl_vpp_routing_node: overcloud-novacompute-0 tacker: true congress: true diff --git a/config/deploy/os-odl-fdio-noha.yaml b/config/deploy/os-odl-fdio-noha.yaml index 4aab0520..17eea880 100644 --- a/config/deploy/os-odl-fdio-noha.yaml +++ b/config/deploy/os-odl-fdio-noha.yaml @@ -4,7 +4,7 @@ global_params: deploy_options: sdn_controller: opendaylight - odl_version: carbon + odl_version: oxygen odl_vpp_routing_node: overcloud-novacompute-0 tacker: true congress: true diff --git a/config/deploy/os-odl-fdio-dvr-ha.yaml b/config/deploy/os-odl-fdio_dvr-ha.yaml index 6fcbec65..0304fa8b 100644 --- a/config/deploy/os-odl-fdio-dvr-ha.yaml +++ b/config/deploy/os-odl-fdio_dvr-ha.yaml @@ -4,8 +4,8 @@ global_params: deploy_options: sdn_controller: opendaylight - odl_version: carbon - odl_vpp_routing_node: dvr + odl_version: oxygen + dvr: true tacker: true congress: true sfc: false diff --git a/config/deploy/os-odl-fdio-dvr-noha.yaml b/config/deploy/os-odl-fdio_dvr-noha.yaml index e8788d71..9424c080 100644 --- a/config/deploy/os-odl-fdio-dvr-noha.yaml +++ b/config/deploy/os-odl-fdio_dvr-noha.yaml @@ -4,8 +4,8 @@ global_params: deploy_options: sdn_controller: opendaylight - odl_version: carbon - odl_vpp_routing_node: dvr + odl_version: oxygen + dvr: true tacker: true congress: true sfc: false |