13. $ git clone git://.../development.git
$ cd development
$ vagrant up
14.
15. HOW DOES IT WORK?
VAGRANTFILE_API_VERSION = "2"!
!
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|!
config.vm.box = "debian-wheezy-64"!
config.vm.box_url = "https://.../debian-wheezy-64.box"!
config.vm.hostname = "wheezy-vm"!
end
Vagrantfile
16. • Ease of use#
• Many pre-configured boxes available#
• Support for multiple machines#
• Local support forVirtualBox orVMware#
• Build remote clouds on AWS, RackSpace, etc.#
• Provisioning using:Ansible, Chef, Docker, Puppet, etc.
FEATURES
http://www.vagrantup.com
17. PUPPET PROVISIONING
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|!
config.vm.box = "debian-wheezy-64"!
config.vm.box_url = "https://www.dropbox.com/s/foj5mml4ft3b363/debian-wheezy-64.box?dl=1"!
config.vm.hostname = "wheezy-vm"!
!
# Install puppet modules!
config.vm.provision :shell do |shell|!
shell.inline = "# Install modules from Puppet Forge!
mkdir -p /etc/puppet/modules;!
puppet module install puppetlabs/apt;!
!
# Install Puppet modules from GitHub!
aptitude -y install git;!
cd /etc/puppet/modules;!
git clone git://github.com/stankevich/puppet-python.git python;!
"!
end!
!
# Use Puppet to provision server configuration!
config.vm.provision "puppet" do |puppet|!
puppet.manifests_path = "manifests"!
end!
!
end
Vagrantfile
22. SET UP A DATABASE
# Install the Postgres server!
class { 'postgresql::server':!
ensure => 'present',!
listen_addresses => 'localhost',!
encoding => 'UTF8',!
manage_firewall => true,!
}!
!
# Install PostgreSQL client!
class { 'postgresql::client': }!
!
# And development libraries!
class { 'postgresql::lib::devel': }!
!
!
# Set up a PostgreSQL database named 'hello' !
# and user named 'hello_django' with a long passphrase!
postgresql::server::db { 'hello':!
user => 'hello_django',!
password => postgresql_password('hello_django', 'xxxxxxxxxxxxx'),!
}
database.pp
24. FEATURES
• Store server configuration in text files (manifests)#
• Automatically configure packages, user accounts, services, etc.#
• Declarative language to describe machines#
• Store configuration of multiple machines on a central Puppet
master server#
• Update configuration when manifest file changes
http://puppetlabs.com
35. FEATURES
• Graphically manage packages, user accounts, services#
• Install and configure server software#
• Monitor server activity and log files#
• Tweak and test settings#
• Execute commands and access files through the browser#
• Support for MySQL, PostgreSQL,Apache, PHP and many, many others
http://webmin.com