-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathVagrantfile
29 lines (25 loc) · 1.02 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define "mgmt" do |mgdock|
mgdock.vm.hostname = "mgmt"
mgdock.vm.network :private_network, ip: "192.168.56.10", netmask: "24"
mgdock.vm.provider :docker do |docker, override|
override.vm.box = nil
docker.image = "rofrano/vagrant-provider:ubuntu"
docker.remains_running = true
docker.has_ssh = true
docker.privileged = true
docker.volumes = ["/sys/fs/cgroup:/sys/fs/cgroup:rw"]
docker.create_args = ["--cgroupns=host"]
end
mgdock.vm.synced_folder ".", "/home/vagrant/k8s", docker_consistency: "cached"
# Provisioning
mgdock.vm.provision "shell", inline: 'sudo apt-get -y update; sudo apt-get -y install sl'
mgdock.vm.provision :shell, path: "bootstrap-mgmt.sh"
end
config.trigger.before :destroy do |trigger|
trigger.warn = "Running terraform destroy"
trigger.run_remote = {inline: "terraform destroy"}
end
end