Skip to content

Instantly share code, notes, and snippets.

@nagaki
Created May 11, 2017 04:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nagaki/10265741d782e7830b2893368f28a482 to your computer and use it in GitHub Desktop.
Save nagaki/10265741d782e7830b2893368f28a482 to your computer and use it in GitHub Desktop.
vagrant-ubuntu-oracle-xeの共有フォルダ、タイムゾーン設定変更
# -*- 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 = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.hostname = "oracle"
# share this project under /home/vagrant/vagrant-ubuntu-oracle-xe
config.vm.synced_folder "./tmp", "/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 \"Asia/Tokyo\" | 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
@nagaki
Copy link
Author

nagaki commented May 11, 2017

Vagrantのプロジェクトルートにtmpディレクトリを追加しておく!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment