blob: c98f6def484f4fd8784ba62d430a0baa02c86628 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
#!/bin/bash
set -e -o pipefail
OS_ID=$(grep '^ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
OS_VERSION_ID=$(grep '^VERSION_ID=' /etc/os-release | cut -f2- -d= | sed -e 's/\"//g')
function setup {
if ! [ -z ${REPO_NAME} ]; then
echo "INSTALLING VPP-DPKG-DEV from apt/yum repo"
REPO_URL="https://packagecloud.io/fdio/${STREAM}"
echo "REPO_URL: ${REPO_URL}"
# Setup by installing vpp-dev and vpp-lib
if [ "$OS_ID" == "ubuntu" ]; then
if ! [ "${STREAM}" == "master" ]; then
echo "tree not master deleting packagecloud repo pointer"
sudo rm -f /etc/apt/sources.list.d/fdio_master.list
curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.deb.sh | sudo bash
fi
if [ -f /etc/apt/sources.list.d/99fd.io.list ];then
echo "Deleting: /etc/apt/sources.list.d/99fd.io.list"
sudo rm /etc/apt/sources.list.d/99fd.io.list
fi
sudo apt-get update -qq || true
sudo apt-get -y --force-yes install vpp-dpdk-dev || true
sudo apt-get -y --force-yes install vpp-dpdk-dkms || true
sudo apt-get -y --force-yes install vpp-ext-deps || true
elif [ "$OS_ID" == "centos" ]; then
if [ -f /etc/yum.repos.d/fdio-master.repo ]; then
echo "Deleting: /etc/yum.repos.d/fdio-master.repo"
sudo rm /etc/yum.repos.d/fdio-master.repo
fi
if ! [ "${STREAM}" == "master" ]; then
echo "tree not master deleting packagecloud repo pointer"
sudo rm -f /etc/yum.repos.d/fdio_master.repo
curl -s https://packagecloud.io/install/repositories/fdio/${STREAM}/script.rpm.sh | sudo bash
fi
sudo yum -y install vpp-dpdk-devel || true
sudo yum -y install vpp-ext-deps || true
elif [ "$OS_ID" == "opensuse" ]; then
REPO_URL="${NEXUSPROXY}/content/repositories/fd.io.${REPO_NAME}"
echo "REPO_URL: ${REPO_URL}"
sudo cat << EOF > fdio-master.repo
[fdio-master]
name=fd.io master branch latest merge
baseurl=${REPO_URL}
enabled=1
gpgcheck=0
EOF
sudo mv fdio-master.repo /etc/yum/repos.d/fdio-master.repo
sudo yum -y install vpp-dpdk-devel || true
sudo yum -y install vpp-ext-deps || true
elif [ "$OS_ID" == "opensuse-leap" ]; then
REPO_URL="${NEXUSPROXY}/content/repositories/fd.io.${REPO_NAME}"
echo "REPO_URL: ${REPO_URL}"
sudo cat << EOF > fdio-master.repo
[fdio-master]
name=fd.io master branch latest merge
baseurl=${REPO_URL}
enabled=1
gpgcheck=0
EOF
sudo mv fdio-master.repo /etc/yum/repos.d/fdio-master.repo
sudo yum -y install vpp-dpdk-devel || true
sudo yum -y install vpp-ext-deps || true
fi
fi
}
setup
|