3 # Build a base machine for RHEL 7.3
5 # Copyright 2016 OPNFV, Intel Corporation & Red Hat Inc.
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
11 # http://www.apache.org/licenses/LICENSE-2.0
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
20 # Aihua Li, Huawei Technologies.
21 # Martin Klozik, Intel Corporation.
22 # Abdul Halim, Intel Corporation.
23 # Christian Trautman, Red Hat Inc.
60 # python tools for proper QEMU, DPDK, and OVS make
66 # Iterate installing each package. If packages fail to install, record those
67 # packages and exit with an error message on completion. Customer may need to
68 # add repo locations and subscription levels.
70 for pkg in ${pkglist[*]}; do
71 echo "Installing ${pkg}"
72 yum -y install ${pkg} || failedinstall=("${failedinstall[*]}" "$pkg")
75 if [ "${#failedinstall[*]}" -gt 0 ]; then
76 echo "The following packages failed to install. Please add appropriate repo\
77 locations and/or subscription levels. Then run the build script again."
78 for fail in ${failedinstall[*]}; do
84 # install SCL for python34 by adding a repo to find its location to install it
85 cat <<'EOT' >> /etc/yum.repos.d/python34.repo
87 name=CentOS-7 - SCLo rh
88 baseurl=http://mirror.centos.org/centos/7/sclo/$basearch/rh/
91 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-SCLo
94 # install python34 packages and git-review tool
95 yum -y install $(echo "
97 rh-python34-python-tkinter
100 # cleanup python 34 repo file
101 rm -f /etc/yum.repos.d/python34.repo
103 # Create hugepage dirs
104 mkdir -p /dev/hugepages