-
Notifications
You must be signed in to change notification settings - Fork 90
/
Vagrantfile
55 lines (44 loc) · 2.09 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
config.vm.box = "hashicorp/precise64"
config.vm.box_url = "https://vagrantcloud.com/hashicorp/precise64"
config.vm.hostname = "oracle"
# share this project under /home/vagrant/vagrant-ubuntu-oracle-xe
config.vm.synced_folder ".", "/home/vagrant/vagrant-ubuntu-oracle-xe", :mount_options => ["dmode=777","fmode=666"]
# Forward Oracle port
config.vm.network :forwarded_port, guest: 1521, host: 1521
# Provider-specific configuration so you can fine-tune various backing
# providers for Vagrant. These expose provider-specific options.
config.vm.provider :virtualbox do |vb|
# Use VBoxManage to customize the VM
vb.customize ["modifyvm", :id,
"--name", "oracle",
# Oracle claims to need 512MB of memory available minimum
"--memory", "512",
# Enable DNS behind NAT
"--natdnshostresolver1", "on"]
end
# This is just an example, adjust as needed
config.vm.provision :shell, :inline => "echo \"America/New_York\" | sudo tee /etc/timezone && dpkg-reconfigure --frontend noninteractive tzdata"
config.vbguest.auto_update = true
$install_puppet_modules = <<SCRIPT
if [ -f /home/vagrant/vagrant-ubuntu-oracle-xe/oracle-jdbc/ojdbc6.jar ]; then
mkdir -p /etc/puppet/modules
puppet module list | grep -q puppetlabs-java || puppet module install puppetlabs-java
puppet module list | grep -q maestrodev-maven || puppet module install maestrodev-maven
fi
SCRIPT
config.vm.provision "shell", inline: $install_puppet_modules
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "manifests"
puppet.module_path = "modules"
puppet.manifest_file = "base.pp"
puppet.options = "--verbose --trace"
end
# Run the Maven goals for data-with-flyway
config.vm.provision "shell", path: "flyway.sh"
end