-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
63 lines (58 loc) · 2.03 KB
/
Vagrantfile
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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-18.04"
config.vm.network "private_network", ip: "192.168.33.10"
config.vm.synced_folder "./", "/src"
config.vm.provider "virtualbox" do |vb|
# Display the VirtualBox GUI when booting the machine
vb.gui = false
vb.name = "Arrrspace-dev"
# Customize the amount of memory on the VM:
vb.memory = "4096"
vb.customize ["modifyvm", :id, "--cpus", "2"]
end
# docker
config.vm.provision "shell", inline: <<-SHELL
apt update
apt install dos2unix -y
apt install gcc -y
curl -fsSL get.docker.com -o get-docker.sh && sh get-docker.sh
usermod -aG docker vagrant
SHELL
# golang
config.vm.provision "shell", inline: <<-SHELL
wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz -nv -O go.tar.gz
tar -C /usr/local -xzf go.tar.gz
echo "export PATH=$PATH:/usr/local/go/bin:/home/vagrant/go/bin" >> /etc/profile
source /etc/profile
SHELL
# minikube
config.vm.provision "shell", inline: <<-SHELL
sudo apt install conntrack
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \
&& chmod +x minikube
sudo install ./minikube /usr/local/bin
rm ./minikube
SHELL
# kubectl
config.vm.provision "shell", inline: <<-SHELL
echo "[+] Installing kubectl..."
export URL_BASE=https://storage.googleapis.com/kubernetes-release/release/
export VER=$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)
# assuming 64 bit linux here.
# can expand this later to work for other systems, maybe.
echo "[!] kubectl version: $VER"
export URL="$URL_BASE$VER/bin/linux/amd64/kubectl"
echo "[!] $URL"
curl -LO $URL
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
echo "[!] $(kubectl version --short --client)"
echo "[!] Done!"
SHELL
# arrrspace
config.vm.provision "shell", inline: <<-SHELL
sudo su - vagrant -c "cd /src && ./setup.sh"
SHELL
end