Jan Dittberner
d1cecfe7a8
This commit performs salt provisioning setup by adding salt master to the salt VM and salt minion to all VMs. An /etc/hosts entry for the salt master is added using a shell provisioner. No salt executions are performed yet.
122 lines
3.7 KiB
Ruby
122 lines
3.7 KiB
Ruby
# -*- mode: ruby -*-
|
|
# vi: set ft=ruby :
|
|
|
|
Vagrant.configure("2") do |config|
|
|
config.vm.box = "debian/contrib-jessie64"
|
|
config.vm.post_up_message = nil
|
|
config.vm.synced_folder ".", "/vagrant", disabled: true
|
|
|
|
config.vm.provision "shell",
|
|
inline: "sed -i 's/^mesg n$/tty -s \\&\\& mesg n/g' /root/.profile"
|
|
config.vm.provision "shell",
|
|
path: "scripts/add_salt_to_etc_hosts.sh"
|
|
config.vm.provision :salt do |salt|
|
|
salt.masterless = false
|
|
salt.minion_config = "salt/minion"
|
|
salt.run_highstate = false
|
|
salt.install_type = "stable"
|
|
end
|
|
|
|
config.vm.define "salt" do |node|
|
|
node.vm.hostname = "salt.gva.dev"
|
|
node.vm.synced_folder "repos/gvasalt/states", "/srv/salt"
|
|
node.vm.synced_folder "repos/gvasalt/pillar", "/srv/pillar"
|
|
node.vm.network "private_network", ip: "172.16.4.10"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
|
|
node.vm.provision :salt do |salt|
|
|
salt.install_master = true
|
|
salt.minion_id = "salt"
|
|
end
|
|
end
|
|
|
|
config.vm.define "mq" do |node|
|
|
node.vm.hostname = "mq.gva.dev"
|
|
node.vm.network "private_network", ip: "172.16.4.20"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "syslog" do |node|
|
|
node.vm.hostname = "syslog"
|
|
node.vm.network "private_network", ip: "172.16.4.30"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "pgsql" do |node|
|
|
node.vm.hostname = "pgsql"
|
|
node.vm.synced_folder "repos/gvapgsql", "/srv/gvapgsql"
|
|
node.vm.network "private_network", ip: "172.16.4.40"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "dns" do |node|
|
|
node.vm.hostname = "dns"
|
|
node.vm.network "private_network", ip: "172.16.4.50"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "ldap" do |node|
|
|
node.vm.hostname = "ldap"
|
|
node.vm.synced_folder "repos/gvaldap", "/srv/gvaldap"
|
|
node.vm.network "private_network", ip: "172.16.4.60"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "file" do |node|
|
|
node.vm.hostname = "file"
|
|
node.vm.synced_folder "repos/gvafile", "/srv/gvafile"
|
|
node.vm.network "private_network", ip: "172.16.4.70"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "mail" do |node|
|
|
node.vm.hostname = "mail"
|
|
node.vm.network "private_network", ip: "172.16.4.80"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "mysql" do |node|
|
|
node.vm.hostname = "mysql"
|
|
node.vm.synced_folder "repos/gvamysql", "/srv/gvamysql"
|
|
node.vm.network "private_network", ip: "172.16.4.90"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "web" do |node|
|
|
node.vm.hostname = "web"
|
|
node.vm.synced_folder "repos/gvaweb", "/srv/gvaweb"
|
|
node.vm.network "private_network", ip: "172.16.4.100"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
|
|
config.vm.define "service" do |node|
|
|
node.vm.hostname = "service"
|
|
node.vm.synced_folder "repos/gva", "/srv/gva"
|
|
node.vm.network "forwarded_port", guest: 443, host:8443
|
|
node.vm.network "private_network", ip: "172.16.4.110"
|
|
node.vm.post_up_message = "Use https://localhost:8443/ to access the gva web interface"
|
|
node.vm.provider "virtualbox" do |vb|
|
|
vb.memory = "256"
|
|
end
|
|
end
|
|
end
|