Created
September 12, 2014 13:40
-
-
Save takeyuweb/714390731479853362bb to your computer and use it in GitHub Desktop.
Vagrant Rails開発環境 on Windows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'http://api.berkshelf.com' | |
# from opscode-cookbooks | |
cookbook 'nodejs' | |
cookbook 'yum' | |
cookbook 'mysql' | |
cookbook 'memcached' | |
# from GitHub | |
cookbook 'rbenv', github: 'fnichol/chef-rbenv' | |
# User cook books | |
cookbook 'base', path: 'site-cookbooks/base' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vi Vagrantfile | |
# vi Berksfile | |
# vagrant up | |
# vagrant vagrant rsync | |
VAGRANTFILE_API_VERSION = '2' | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.vm.box = 'centos65' | |
config.vm.box_url = 'https://github.com/2creatives/vagrant-centos/releases/download/v6.5.3/centos65-x86_64-20140116.box' | |
config.vm.network :private_network, :ip => '192.168.50.12' | |
config.vm.network :forwarded_port, :guest => 3000, :host => 3000 | |
config.vm.provider :virtualbox do |vb| | |
vb.customize ['modifyvm', :id, '--memory', '2048'] | |
vb.customize ['modifyvm', :id, '--natdnsproxy1', 'off'] | |
vb.customize ['modifyvm', :id, '--natdnshostresolver1', 'off'] | |
vb.customize ['modifyvm', :id, '--cpus', '4'] | |
vb.customize ['modifyvm', :id, '--ioapic', 'on'] | |
end | |
config.berkshelf.enabled = true | |
config.vm.provision :chef_solo do |chef| | |
chef.log_level = :debug | |
chef.run_list = %w(mysql::server mysql::client memcached ruby_build rbenv::user nodejs base::default) | |
chef.json = { | |
'mysql' => { | |
'server_root_password' => '', | |
}, | |
'rbenv' => { | |
'user_installs' => [ | |
{ | |
'user' => 'vagrant', | |
'rubies' => [ | |
'2.1.2' | |
], | |
'global' => '2.1.2', | |
'gems' => { | |
'2.1.2' => [ | |
{ | |
'name' => 'bundler', | |
'version' => '1.7.0' | |
} | |
] | |
} | |
} | |
] | |
} | |
} | |
end | |
config.omnibus.chef_version = '11.10.4' | |
config.ssh.forward_agent = true | |
config.vm.synced_folder '../', '/vagrant', type: 'rsync', rsync__exclude: %w(.git/ .idea/ log/ tmp/ public/assets/ vagrant/) | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment