Vagrant + Chef-solo 0x00C0FFEE Donetsk Sep 2013
Pavel Mitin
dpkg --get-selections | grep vagrant
cd ~/projects/demo && ruby redis_client.rb
vagrant init
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
vagrant up
vagrant ssh
config.vm.network :forwarded_port, guest: 6379, host: 6379
vagrant reload
Chef Solo provisioning for Vagrant
vagrant destroy
rm Vagrant && vagrant init
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :forwarded_port, guest: 50030, host: 50030
config.vm.network :forwarded_port, guest: 50060, host: 50060
config.vm.network :forwarded_port, guest: 50070, host: 50070
config.vm.network :forwarded_port, guest: 50075, host: 50075
config.vm.provision :chef_solo do |chef|
chef.add_recipe "apt"
chef.add_recipe "java"
chef.add_recipe "pseudo_distributed_cdh4"
chef.json = {
:java => {
:install_flavor => "oracle",
:jdk_version => '6',
:url => 'jdk-6u45-linux-x64.bin',
:oracle => {
"accept_oracle_download_terms" => true
}
}
}
end
mkdir cookbooks
vagrant up
Resource examples:
Custom Lightweight Resources:
Pavel Mitin: