summaryrefslogtreecommitdiffstats
path: root/ci/Vagrantfile
blob: 7bee0ac58e59663e7526d214b2a392eac811006a (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
Vagrant.require_version ">= 1.8.6"

$script = <<SCRIPT
#!/bin/bash
wget https://raw.githubusercontent.com/mitchellh/vagrant/master/keys/vagrant.pub -O .ssh/authorized_keys
chmod 700 .ssh
chmod 600 .ssh/authorized_keys
chown -R vagrant:vagrant .ssh


sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-key adv -k 58118E89F3A912897C070ADBF76221572C52609D
cat << EOF | sudo tee /etc/apt/sources.list.d/docker.list
deb [arch=amd64] https://apt.dockerproject.org/repo ubuntu-xenial main
EOF

curl -s http://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
cat <<EOF | tee /etc/apt/sources.list.d/kubernetes.list
deb http://apt.kubernetes.io/ kubernetes-xenial main
EOF
apt-get update
apt-get install -y --allow-downgrades docker-engine=1.12.6-0~ubuntu-xenial kubelet=1.7.0-00 kubeadm=1.7.0-00 kubectl=1.7.0-00 kubernetes-cni=0.5.1-00
docker pull gcr.io/google_containers/kube-proxy-amd64:v1.7.10
docker pull gcr.io/google_containers/kube-apiserver-amd64:v1.7.10
docker pull gcr.io/google_containers/kube-controller-manager-amd64:v1.7.10
docker pull gcr.io/google_containers/kube-scheduler-amd64:v1.7.10
docker pull weaveworks/weave-npc:2.0.5
docker pull weaveworks/weave-kube:2.0.5
docker pull gcr.io/google_containers/k8s-dns-sidecar-amd64:1.14.4
docker pull gcr.io/google_containers/k8s-dns-kube-dns-amd64:1.14.4
docker pull gcr.io/google_containers/k8s-dns-dnsmasq-nanny-amd64:1.14.4
docker pull gcr.io/google_containers/etcd-amd64:3.0.17
docker pull gcr.io/google_containers/pause-amd64:3.0
SCRIPT

Vagrant.configure("2") do |config|

  config.vm.box = "bento/ubuntu-16.04"
  config.ssh.insert_key = false

  config.vm.define "container4nfv" do |config|
    config.vm.hostname = "container4nfv"
    config.vm.provision "shell", inline: $script
  end
end