This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
102 lines (85 loc) · 2.72 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
98
99
100
101
102
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
#config.vm.box = 'chef/centos-6.5'
#config.vm.box_url = 'https://vagrantcloud.com/chef/boxes/centos-6.5/versions/1/providers/virtualbox.box'
config.vm.box = 'chef/centos-6.5'
config.vm.box_url = 'https://atlas.hashicorp.com/chef/boxes/centos-6.5'
config.vm.provider "virtualbox" do |v|
v.gui = true
end
config.vm.define 'next' do |box|
box.vm.hostname = 'next'
box.vm.network 'private_network', ip: '192.168.1.100'
box.vm.provision 'shell', path: 'scripts/bootstrap.sh'
box.vm.provision 'chef_solo' do |chef|
# Assign node variables that would otherwise be defined via node.set_unless for Chef server / hosted chef
chef.json = {
next: {
app: {
server_name: '192.168.1.100',
database: {
production: {
password: 'app'
}
},
environment: {
oauth2: {
provider: {
shibboleth: {
secret: 'txen',
properties: {
site: 'http://192.168.1.100:8443'
}
}
}
}
},
secret_key_base: 'insecure'
},
auth: {
server_name: '192.168.1.100',
database: {
connections: {
mysql: {
password: 'auth'
}
}
},
seeds: {
clients: {
'next' => {
'secret' => 'txen',
'endpoints' => [
"https://192.168.1.100/auth/oauth2/shibboleth"
]
}
}
}
},
mysql: {
root: {
password: 'root'
}
}
}
}
chef.cookbooks_path = ['cookbooks', 'vendor_cookbooks']
chef.data_bags_path = 'data_bags'
chef.environments_path = 'environments'
chef.roles_path = 'roles'
chef.environment = 'local'
chef.add_role 'foundation'
chef.add_recipe 'chef-solo-search' # don't use this with Chef server / hosted chef
chef.add_role 'next-database'
chef.add_role 'next-app'
chef.add_role 'next-auth'
# Only uncomment to test Shibboleth setup (SPs don't like localhost)
# chef.add_recipe 'shibboleth-sp::configure'
# chef.add_recipe 'shibboleth-sp::service'
# chef.add_recipe 'shibboleth-sp::apache2'
end
end
end