forked from krysopath/vagrant-void-state
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVagrantfile
97 lines (87 loc) · 3.24 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# -*- mode: ruby -*-
# vi: set ft=ruby :
MEMORY_MB = "4096"
NUM_CORES = 6
Vagrant.configure("2") do |config|
config.vm.define "stateless" do |stateless|
stateless.vm.provider "libvirt" do |v|
v.memory = MEMORY_MB
v.cpus = NUM_CORES
end
stateless.vm.provider "virtualbox" do |v|
v.memory = MEMORY_MB
v.cpus = NUM_CORES
end
stateless.vm.provider "aws" do |aws|
aws.instance_type = "t3.medium"
aws.keypair_name = "Georg"
aws.monitoring = false
aws.region = "eu-central-1"
aws.subnet_id = "vpc-3f52bc56"
aws.ami = "ami-066866b740d9ce5a7"
end
stateless.vm.network "private_network", ip: "10.10.10.10"
stateless.vm.box = "generic/ubuntu1904"
stateless.vm.hostname = "void-state"
stateless.vm.network "forwarded_port", guest: 80, host: 8080
stateless.vm.network "forwarded_port", guest: 443, host: 8443
stateless.vm.synced_folder "etc", "/vagrant/etc"
stateless.vm.synced_folder "~/.gnupg", "/home/vagrant/.gnupg"
#stateless.ssh.forward_agent = true
#stateless.ssh.keys_only = false
stateless.ssh.forward_env = [
"VAULT_TOKEN",
"VAULT_ADDR",
"VAULT_PATHS",
"AWS_ACCESS_KEY_ID",
"AWS_SECRET_ACCESS_KEY"
]
stateless.vm.provision "file", source: "~/.ssh/id_rsa", destination: "~/.ssh/id_rsa"
stateless.vm.provision "file", source: "~/.ssh/known_hosts", destination: "~/.ssh/known_hosts"
stateless.vm.provision "ansible_local" do |a|
a.compatibility_mode = "2.0"
a.provisioning_path = "/vagrant/etc/"
a.playbook = "provide.yml"
a.playbook_command = "ansible-playbook [email protected]"
a.extra_vars = {
apt: {
cache_valid: 3600,
latest: true
},
vault_token: ENV['VAULT_TOKEN'],
git: {
repos: [
{src: "[email protected]:3yourmind/polyrepo.git", dest: "~/src/threeyd/polyrepo/"},
{src: "[email protected]:3yourmind/button3d.git", dest: "~/src/threeyd/button3d"},
{src: "[email protected]:3yourmind/3yd-nginx.git", dest: "~/src/threeyd/3yd-nginx"},
{src: "[email protected]:3yourmind/yoda.git", dest: "~/src/threeyd/yoda"},
{src: "[email protected]:3yourmind/backend_spring.git", dest: "~/src/threeyd/backend_spring"},
{src: "[email protected]:3yourmind/devops.git", dest: "~/src/threeyd/devops"},
{src: "[email protected]:3yourmind/e2e-tests.git", dest: "~/src/threeyd/e2e-tests"},
{src: "[email protected]:3yourmind/3yourmind.git", dest: "~/src/threeyd/3yourmind"},
],
clone: true,
},
dotfiles: {
src: "[email protected]:krysopath/dotfiles.git",
active: true,
},
asdf: {
refresh: true,
plugins: [
{name: "vault", ver: "1.3.0"},
{name: "helm", ver: "3.1.1"},
{name: "kubectl", ver: "1.17.3"},
{name: "nomad", ver: "0.10.4"},
{name: "terraform", ver: "0.12.21"},
{name: "terragrunt", ver: "0.22.4"},
{name: "k9s", ver: "0.16.1"},
{name: "rust", ver: "1.41.1"},
],
},
os_deps_extra: ["ipython3"],
pip2_deps: ["j2"],
}
end
end
end