Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | apt-get update |
| 3 | apt-get -y install apt-transport-https ca-certificates |
| 4 | apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D |
| 5 | if [ ! -f /etc/apt/sources.list.d/docker.list ]; then |
| 6 | echo deb https://apt.dockerproject.org/repo ubuntu-trusty main | tee /etc/apt/sources.list.d/docker.list |
| 7 | fi |
| 8 | apt-get update |
| 9 | apt-get purge lxc-docker || true |
| 10 | apt-get -y install linux-image-extra-$(uname -r) |
| 11 | apt-get -y install apparmor |
| 12 | echo "Installing Docker" |
| 13 | apt-get -y install docker-engine |
| 14 | service docker start |
| 15 | echo "Verifying Docker installation" |
Chetan Gaonker | 8a0f782 | 2016-05-10 08:30:43 -0700 | [diff] [blame] | 16 | docker run --rm hello-world || exit 127 |
| 17 | docker rmi hello-world |
Chetan Gaonker | 06f02f9 | 2016-05-04 17:55:20 -0700 | [diff] [blame] | 18 | echo "Pulling ONOS latest and 1.5" |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 19 | docker pull onosproject/onos:latest || exit 127 |
Chetan Gaonker | 06f02f9 | 2016-05-04 17:55:20 -0700 | [diff] [blame] | 20 | docker pull onosproject/onos:1.5 || exit 127 |
Chetan Gaonker | 0ff7e78 | 2016-05-06 11:57:33 -0700 | [diff] [blame] | 21 | apt-get -y install wget git python python-dev python-pip python-setuptools python-scapy python-pexpect tcpdump arping |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 22 | easy_install nose |
| 23 | apt-get -y install openvswitch-common openvswitch-switch |
| 24 | pip install -U scapy |
| 25 | pip install monotonic |
| 26 | pip install configObj |
| 27 | pip install -U docker-py |
| 28 | pip install -U pyyaml |
| 29 | pip install -U nsenter |
| 30 | pip install -U pyroute2 |
| 31 | pip install -U netaddr |
| 32 | pip install scapy-ssl_tls |
Chetan Gaonker | 66bff93 | 2016-05-09 10:06:37 -0700 | [diff] [blame] | 33 | ( cd /tmp && git clone https://github.com/jpetazzo/pipework.git && cp -v pipework/pipework /usr/bin && rm -rf pipework ) |
Chetan Gaonker | cc19ac4 | 2016-05-04 17:21:50 -0700 | [diff] [blame] | 34 | ## Special mode to pull cord-tester repo in case prereqs was installed by hand instead of repo |
| 35 | if [ "$1" = "-test" ]; then |
| 36 | rm -rf cord-tester |
| 37 | git clone https://github.cyanoptics.com/cgaonker/cord-tester.git |
Chetan Gaonker | 66bff93 | 2016-05-09 10:06:37 -0700 | [diff] [blame] | 38 | fi |