4 VPP_SOURCE_REPO_URL=$(cat /opt/config/vpp_source_repo_url.txt)
5 VPP_SOURCE_REPO_RELEASE_TAG=$(cat /opt/config/vpp_source_repo_release_tag.txt)
6 HC2VPP_SOURCE_REPO_URL=$(cat /opt/config/hc2vpp_source_repo_url.txt)
7 HC2VPP_SOURCE_REPO_RELEASE_TAG=$(cat /opt/config/hc2vpp_source_repo_release_tag.txt)
8 CLOUD_ENV=$(cat /opt/config/cloud_env.txt)
11 # Download required dependencies
12 echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
13 echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list
14 apt-get --allow-unauthenticated update
15 apt-get install --allow-unauthenticated -y wget openjdk-8-jdk apt-transport-https ca-certificates g++ libcurl4-gnutls-dev
18 # Install the tools required for download codes
19 apt-get --allow-unauthenticated install -y expect git make linux-image-extra-`uname -r`
22 apt-get install -y isc-dhcp-server
24 #Download and build the VPP codes
26 git clone ${VPP_SOURCE_REPO_URL} -b ${VPP_SOURCE_REPO_RELEASE_TAG} vpp
29 yes y | make install-dep
33 make V=0 PLATFORM=vpp TAG=vpp install-deb
35 # Install the VPP package
41 # Download and install HC2VPP from source
43 git clone ${HC2VPP_SOURCE_REPO_URL} -b ${HC2VPP_SOURCE_REPO_RELEASE_TAG} hc2vpp
45 apt --allow-unauthenticated install -y python-ply-lex-3.5 python-ply-yacc-3.5 python-pycparser python-cffi
46 apt-get install -y maven
48 cat > ~/.m2/settings.xml << EOF
49 <?xml version="1.0" encoding="UTF-8"?>
50 <!-- vi: set et smarttab sw=2 tabstop=2: -->
51 <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
52 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
53 xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
57 <id>fd.io-release</id>
61 <name>fd.io-mirror</name>
62 <url>https://nexus.fd.io/content/groups/public/</url>
64 <enabled>true</enabled>
65 <updatePolicy>never</updatePolicy>
68 <enabled>false</enabled>
75 <name>fd.io-mirror</name>
76 <url>https://nexus.fd.io/content/repositories/public/</url>
78 <enabled>true</enabled>
79 <updatePolicy>never</updatePolicy>
82 <enabled>false</enabled>
89 <id>fd.io-snapshots</id>
92 <id>fd.io-snapshot</id>
93 <name>fd.io-snapshot</name>
94 <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
96 <enabled>false</enabled>
99 <enabled>true</enabled>
105 <id>fd.io-snapshot</id>
106 <name>fd.io-snapshot</name>
107 <url>https://nexus.fd.io/content/repositories/fd.io.snapshot/</url>
109 <enabled>false</enabled>
112 <enabled>true</enabled>
115 </pluginRepositories>
118 <id>opendaylight-snapshots</id>
121 <id>opendaylight-snapshot</id>
122 <name>opendaylight-snapshot</name>
123 <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
125 <enabled>false</enabled>
128 <enabled>true</enabled>
134 <id>opendaylight-shapshot</id>
135 <name>opendaylight-snapshot</name>
136 <url>https://nexus.opendaylight.org/content/repositories/opendaylight.snapshot/</url>
138 <enabled>false</enabled>
141 <enabled>true</enabled>
144 </pluginRepositories>
149 <activeProfile>fd.io-release</activeProfile>
150 <activeProfile>fd.io-snapshots</activeProfile>
151 <activeProfile>opendaylight-snapshots</activeProfile>
158 l_version=$(cat pom.xml | grep "<version>" | head -1)
159 l_version=$(echo "${l_version%<*}")
160 l_version=$(echo "${l_version#*>}")
161 mv vpp-integration/minimal-distribution/target/vpp-integration-distribution-${l_version}-hc/vpp-integration-distribution-${l_version} /opt/honeycomb
162 sed -i 's/127.0.0.1/0.0.0.0/g' /opt/honeycomb/config/honeycomb.json
164 # Disable automatic upgrades
165 if [[ $CLOUD_ENV != "rackspace" ]]
167 echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
168 sed -i 's/\(APT::Periodic::Unattended-Upgrade\) "1"/\1 "0"/' /etc/apt/apt.conf.d/20auto-upgrades