-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprovision.sh
72 lines (55 loc) · 2.05 KB
/
provision.sh
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
70
71
72
#!/bin/bash
# install curl if needed
if [[ ! -e /usr/bin/curl ]]; then
apt-get update
apt-get -yqq install curl
fi
#########################
# etcd install and setup
#########################
# if [[ ! -e /usr/local/bin/etcd ]]; then
# # Get etcd download
# curl -sL https://github.com/coreos/etcd/releases/download/v2.0.9/etcd-v2.0.9-linux-amd64.tar.gz -o etcd-v2.0.9-linux-amd64.tar.gz
# # Expand the download
# tar xzvf etcd-v2.0.9-linux-amd64.tar.gz
# # Move etcd and etcdctl to /usr/local/bin
# cd etcd-v2.0.9-linux-amd64
# sudo mv etcd /usr/local/bin/
# sudo mv etcdctl /usr/local/bin/
# cd ..
# # Remove etcd download and directory
# rm etcd-v2.0.9-linux-amd64.tar.gz
# rm -rf etcd-v2.0.9-linux-amd64
# # Create directories needed by etcd
# sudo mkdir -p /var/etcd
# fi
# # Copy files into the correct locations; requires shared folders
# sudo cp /vagrant/etcd.conf /etc/init/etcd.conf
# sudo cp /vagrant/$HOSTNAME.defaults /etc/default/etcd
# # restart if already running, otherwise start.
# initctl status etcd && initctl restart etcd || initctl start etcd
#################
# LXD install
#################
# Initial housekeepting
export DEBIAN_FRONTEND=noninteractive
# Add the PPA repository for LXD/LXC stable
if [[ ! -e /etc/apt/sources.list.d/ubuntu-lxc-lxd-stable-trusty.list ]]; then
sudo add-apt-repository -y ppa:ubuntu-lxc/lxd-stable
fi
# Update package list
sudo apt-get update
# Install LXC/LXD if not already installed
# if [[ ! -e /usr/bin/lxd ]]; then
# sudo apt-get -y install lxd
# fi
#################
# Misc Packages
#################
apt-get install -q -y dkms libpython-stdlib python python-minimal python-six python-doc python-tk
apt-get install -q -y iperf netperf conntrack
# apt-get install -q -y ipsec-tools racoon
# apt-get install -q -y openvswitch-switch openvswitch-ipsec
dpkg -i /vagrant/openvswitch/2.6/openvswitch-common_2.6.0-1_amd64.deb /vagrant/openvswitch/2.6/openvswitch-switch_2.6.0-1_amd64.deb
apt-get install -q -y dkms
dpkg -i /vagrant/openvswitch/2.6/openvswitch-datapath-dkms_2.6.0-1_all.deb