Upload
startit
View
256
Download
2
Tags:
Embed Size (px)
Citation preview
How do we Develop ...
Local Dev Environment
Local Dev Environment
● No isolation
● Not Shareable
● Not Repeatable
Alternative?
Virtual Machines?
Free and Open Source
Started on January 2010 by Mitchell Hashimoto
The first release, 0.1.0 released on March 7, 2010
Linux, Mac OS X and Windows
Tool that allows you to easy manage your environment
How we use Vagrant 101
$ vagrant init precise32 http://files.vagrantup.com/precise32.box
$ vagrant up
Vagrantfile
Vagrant::Config.run do |config|
config.vm.box = "debian-6.0.3-64-elastica-20120211"
config.vm.box_url = "http://ruflin.com/files/vagrant/debian-6.0.3-64-elastica-
20120211.box"
config.vm.network :hostonly, "10.10.10.10"
config.vm.share_folder("www", "/var/www", ".")
config.vm.customize [
"modifyvm", :id,
"--memory", "2048"
]
end
https://github.com/djuric42/xBoilerplate/blob/master/Vagrantfile
Vagrant::Config.run do |config|
config.vm.box = "debian-6.0.3-64-elastica-20120211"
config.vm.box_url = "http://ruflin.com/files/vagrant/debian-6.0.3-64-elastica-
20120211.box"
config.vm.network :hostonly, "10.10.10.10"
config.vm.share_folder("www", "/var/www", ".")
config.vm.customize ["modifyvm", :id, "--memory", "2048"]
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "vagrant/puppet/manifests"
puppet.manifest_file = "base.pp"
end
config.vm.provision :shell, :inline => "/bin/bash /vagrant/load_database.sh"
end
Provisioning ToolSetting up server without knowing of server specifications
class doInstall {
class { 'base-setup': stage => "first" }
include apache2
include php
include mysql
include phpmyadmin
class { 'cleanup': stage => "last" }
}
Alternatives
● Chef● Salt● Bash Script
Questions ?@djbranislav
Thank you