From 0f21a0025a21b601fde7de90d806e9ca4a99fb81 Mon Sep 17 00:00:00 2001 From: Christian Trautman Date: Wed, 7 Dec 2016 14:35:54 -0500 Subject: rhel73_install: Provide installer script for RHEL 7.3 Adds installer scripts for RHEL 7.3 OS. Modified dpdk makefile to allow upstream dpdk to build. Prevents upstream OVS from building due to kernel incompatibilities. Provides instructions on setting up RHEL 7.3 for usage with binary OVS packages when testing with OVS Vanilla. Tested under RHEL 7.3 JIRA: VSPerf-322 Change-Id: If294d465f28f60a1c514a7b661ce4696ac3b5b73 Signed-off-by: Christian Trautman --- conf/10_custom.conf | 14 +++++ docs/configguide/installation.rst | 29 +++++---- docs/design/vswitchperf_design.rst | 4 ++ src/dpdk/Makefile | 8 +++ systems/rhel/7.3/build_base_machine.sh | 108 +++++++++++++++++++++++++++++++++ systems/rhel/7.3/prepare_python_env.sh | 29 +++++++++ 6 files changed, 180 insertions(+), 12 deletions(-) create mode 100755 systems/rhel/7.3/build_base_machine.sh create mode 100755 systems/rhel/7.3/prepare_python_env.sh diff --git a/conf/10_custom.conf b/conf/10_custom.conf index 929d2679..498ac29f 100644 --- a/conf/10_custom.conf +++ b/conf/10_custom.conf @@ -107,3 +107,17 @@ TRAFFICGEN_MOONGEN_LINE_SPEED_GBPS = '10' OPNFV_INSTALLER = "Fuel" OPNFV_URL = "http://testresults.opnfv.org/testapi" PACKAGE_LIST = "src/package-list.mk" + + +# Binary package configuration for RHEL 7.3 systems with Vanilla OVS +#################################################################### +# Uncomment these lines for binary usage of Vanilla OVS. + +#PATHS['vswitch']['ovs_var_tmp'] = '/var/run/openvswitch/' +#PATHS['vswitch']['ovs_etc_tmp'] = '/etc/openvswitch/' +#PATHS['vswitch']['OvsVanilla']['bin']['modules'] = [ +# 'libcrc32c', 'ip_tunnel', 'vxlan', 'gre', 'nf_nat', 'nf_nat_ipv6', +# 'nf_nat_ipv4', 'nf_conntrack', 'nf_defrag_ipv4', 'nf_defrag_ipv6', +# 'openvswitch'] +#PATHS['vswitch']['OvsVanilla']['type'] = 'bin' + diff --git a/docs/configguide/installation.rst b/docs/configguide/installation.rst index 7ba64bba..51aa469d 100755 --- a/docs/configguide/installation.rst +++ b/docs/configguide/installation.rst @@ -13,7 +13,8 @@ Supported Operating Systems * Fedora 20 * Fedora 21 * Fedora 22 -* RedHat 7.2 Enterprise +* RedHat 7.2 Enterprise Linux +* RedHat 7.3 Enterprise Linux * Ubuntu 14.04 Supported vSwitches @@ -26,15 +27,15 @@ The vSwitch must support Open Flow 1.3 or greater. Supported Hypervisors --------------------- -* Qemu version 2.3. +* Qemu version 2.3 or greater. Available VNFs -------------- A simple VNF that forwards traffic through a VM, using: * DPDK testpmd -* Linux Brigde -* custom l2fwd module +* Linux Bridge +* Custom l2fwd module The official VM image is called vloop-vnf and it is available for free download at OPNFV website. @@ -89,18 +90,22 @@ automatically. Script **build_base_machine.sh** will install all the vsperf dependencies in terms of system packages, Python 3.x and required Python modules. -In case of CentOS 7 it will install Python 3.3 from an additional repository -provided by Software Collections (`a link`_). In case of RedHat 7 it will -install Python 3.4 as an alternate installation in /usr/local/bin. Installation -script will also use `virtualenv`_ to create a vsperf virtual environment, -which is isolated from the default Python environment. This environment will -reside in a directory called **vsperfenv** in $HOME. +In case of CentOS 7 or RHEL it will install Python 3.3 from an additional +repository provided by Software Collections (`a link`_). Installation script +will also use `virtualenv`_ to create a vsperf virtual environment, which is +isolated from the default Python environment. This environment will reside in a +directory called **vsperfenv** in $HOME. + +**Please Note**: For RHEL 7.3 Enterprise OVS Vanilla is not built from upstream +source due to kernel incompatibilities. Please see the instructions in the +vswitchperf_design document for details on configuring OVS Vanilla for binary +package usage. You will need to activate the virtual environment every time you start a new shell session. Its activation is specific to your OS: -CentOS 7 and RedHat -=================== +CentOS 7 and RHEL +================= .. code:: bash diff --git a/docs/design/vswitchperf_design.rst b/docs/design/vswitchperf_design.rst index 88b6ba88..4f33a99f 100755 --- a/docs/design/vswitchperf_design.rst +++ b/docs/design/vswitchperf_design.rst @@ -257,6 +257,10 @@ that DPDK sources are not available, then vsperf will continue with test executi but testpmd can't be used as a guest loopback. This is useful in case, that other guest loopback applications (e.g. buildin or l2fwd) are used. +Note: In case of RHEL 7.3 OS usage, binary package configuration is required +for Vanilla OVS tests. With the installation of a supported rpm for OVS there is +a section in the ``conf\10_custom.conf`` file that can be used. + .. _VSPERF installation scripts: http://artifacts.opnfv.org/vswitchperf/docs/configguide/installation.html#other-requirements Configuration of GUEST options diff --git a/src/dpdk/Makefile b/src/dpdk/Makefile index 29967029..93cb7292 100755 --- a/src/dpdk/Makefile +++ b/src/dpdk/Makefile @@ -19,9 +19,11 @@ # Contributors: # Aihua Li, Huawei Technologies. # Martin Klozik, Intel Corporation. +# Christian Trautman, Red Hat Inc. include ../mk/master.mk include ../package-list.mk +include /etc/os-release .PHONY: install force_make @@ -76,6 +78,12 @@ ifdef CONFIG_FILE_BASE else $(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST_USER=.\+/CONFIG_RTE_LIBRTE_VHOST_USER=$(VHOST_USER)/g' $(CONFIG_FILE_LINUXAPP) $(AT)sed -i -e 's/CONFIG_RTE_BUILD_COMBINE_LIBS=./CONFIG_RTE_BUILD_COMBINE_LIBS=y/g' $(CONFIG_FILE_LINUXAPP) +endif +# RHEL 7.3 specific config changes to compile +ifeq ($(ID),"rhel") +ifeq ($(VERSION_ID),"7.3") + $(AT)sed -i.bak s@'SRCS-y += ethtool/igb/igb_main.c'@'#SRCS-y += ethtool/igb/igb_main.c'@g $(WORK_DIR)/lib/librte_eal/linuxapp/kni/Makefile +endif endif $(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_VHOST=./CONFIG_RTE_LIBRTE_VHOST=y/g' $(CONFIG_FILE_LINUXAPP) $(AT)sed -i -e 's/CONFIG_RTE_LIBRTE_KNI=./CONFIG_RTE_LIBRTE_KNI=n/g' $(CONFIG_FILE_LINUXAPP) diff --git a/systems/rhel/7.3/build_base_machine.sh b/systems/rhel/7.3/build_base_machine.sh new file mode 100755 index 00000000..5a9b4b2e --- /dev/null +++ b/systems/rhel/7.3/build_base_machine.sh @@ -0,0 +1,108 @@ +#!/bin/bash +# +# Build a base machine for RHEL 7.3 +# +# Copyright 2016 OPNFV, Intel Corporation & Red Hat Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# Contributors: +# Aihua Li, Huawei Technologies. +# Martin Klozik, Intel Corporation. +# Abdul Halim, Intel Corporation. +# Christian Trautman, Red Hat Inc. + +# Make and Compilers +pkglist=(\ + automake\ + fuse-devel\ + gcc\ + gcc-c++\ + glib2-devel\ + glibc\ + kernel-devel\ + openssl-devel\ + pixman-devel\ + sysstat\ +) + +# Tools +pkglist=( + "${pkglist[@]}"\ + git\ + libtool\ + libpcap-devel\ + libnet\ + net-tools\ + openssl\ + openssl-devel\ + pciutils\ + socat\ + tk-devel\ + wget\ + numactl\ + numactl-devel\ +) + +# python tools for proper QEMU, DPDK, and OVS make +pkglist=( + "${pkglist[@]}"\ + python-six\ +) + +# Iterate installing each package. If packages fail to install, record those +# packages and exit with an error message on completion. Customer may need to +# add repo locations and subscription levels. +failedinstall=() +for pkg in ${pkglist[*]}; do + echo "Installing ${pkg}" + yum -y install ${pkg} || failedinstall=("${failedinstall[*]}" "$pkg") +done + +if [ "${#failedinstall[*]}" -gt 0 ]; then + echo "The following packages failed to install. Please add appropriate repo\ + locations and/or subscription levels. Then run the build script again." + for fail in ${failedinstall[*]}; do + echo $fail + done + exit 1 +fi + +# install SCL for python33 by adding a repo to find its location to install it +cat <<'EOT' >> /etc/yum.repos.d/python33.repo +[rhscl-python33-el7] +name=Copr repo for python33-el7 owned by rhscl +baseurl=https://copr-be.cloud.fedoraproject.org/results/rhscl/python33-el7/epel-7-$basearch/ +type=rpm-md +skip_if_unavailable=True +gpgcheck=1 +gpgkey=https://copr-be.cloud.fedoraproject.org/results/rhscl/python33-el7/pubkey.gpg +repo_gpgcheck=0 +enabled=1 +enabled_metadata=1 +EOT + +# install python33 packages and git-review tool +yum -y install $(echo " +python33 +python33-python-tkinter +" | grep -v ^#) + +# cleanup python 33 repo file +rm -f /etc/yum.repos.d/python33.repo + +# Create hugepage dirs +mkdir -p /dev/hugepages + +# prevent ovs vanilla from building from source due to kernel incompatibilities +sed -i s/'SUBBUILDS = src_vanilla'/'#SUBBUILDS = src_vanilla'/ ../src/Makefile \ No newline at end of file diff --git a/systems/rhel/7.3/prepare_python_env.sh b/systems/rhel/7.3/prepare_python_env.sh new file mode 100755 index 00000000..3ba049e8 --- /dev/null +++ b/systems/rhel/7.3/prepare_python_env.sh @@ -0,0 +1,29 @@ +#!/bin/bash +# +# Prepare Python environment for vsperf execution on RHEL 7.3 systems. +# +# Copyright 2016 OPNFV, Intel Corporation, Red Hat Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +if [ -d "$VSPERFENV_DIR" ] ; then + echo "Directory $VSPERFENV_DIR already exists. Skipping python virtualenv creation." + exit +fi + +scl enable python33 " +virtualenv "$VSPERFENV_DIR" +source "$VSPERFENV_DIR"/bin/activate +pip install -r ../requirements.txt +pip install pylint +" \ No newline at end of file -- cgit 1.2.3-korg