-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathVagrantfile
64 lines (56 loc) · 2.07 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
DOMAIN = 'local'
CIP_NODE_IP = '192.168.33.40'
JH_DEV_NODE_IP = '192.168.33.41'
CIP_DATA_DISK = './.vagrant/machines/cip-vm/cip_data_disk.vdi'
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# Debian boxes are available in https://vagrantcloud.com/deb
# Actual stable release is Debian Jessie
config.vm.box = 'deb/jessie-amd64'
# Disable automatique box update
config.vm.box_check_update = false
# Disabling the default /vagrant share
config.vm.synced_folder ".", "/vagrant" , disabled: true
# Update /etc/hosts in all VMs
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
config.hostmanager.include_offline = true
# Continuous Integration Platform VM
config.vm.define "cip-vm" do |cfg|
cfg.vm.hostname = "cip-vm.#{DOMAIN}"
cfg.vm.network "private_network", ip: CIP_NODE_IP
cfg.hostmanager.aliases = "cip-vm"
cfg.vm.provider "virtualbox" do |v|
v.name = 'cip-vm'
v.memory = 1536
v.cpus = 2
unless File.exist?(CIP_DATA_DISK)
# Create the a second 20GiB disk for data storage
v.customize ['createhd', '--filename', CIP_DATA_DISK, '--size', 20 * 1024]
# Attach the created disk to the virtual machine
v.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port',
1, '--device', 0, '--type', 'hdd', '--medium', CIP_DATA_DISK]
end
end
cfg.vm.provision :ansible do |ansible|
ansible.playbook = 'provisioning/cip-setup.yml'
end
end
# Setup a Jhipster Development environement
config.vm.define "jhipster-dev" do |cfg|
cfg.vm.hostname = "jhipster-dev.#{DOMAIN}"
cfg.vm.network "private_network", ip: JH_DEV_NODE_IP
cfg.hostmanager.aliases = "jhipster-dev"
cfg.vm.provider "virtualbox" do |v|
v.name = 'jhipster-dev'
v.memory = 768
end
cfg.vm.provision :ansible do |ansible|
ansible.playbook = 'provisioning/jhipster-dev/setup.yml'
end
end
# Setup a Jhipster QA environement
# Setup a Jhipster producation environement
end