Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vagrant 1.2.2 and AWS

Vagrant 1.2.2 and AWS

Demo of new features in Vagrant 1.2.2 and usage with AWS

Arturas Smorgun

May 09, 2013
Tweet

More Decks by Arturas Smorgun

Other Decks in Technology

Transcript

  1. Artūras Šmorgun, Inviqa Enlighten Lunch, 9th of May 2013 va·grant

    One who lives on the streets and constitutes a public nuisance.
  2. 1.x Fully compatible with 1.0.x Compatibility between 1.x not promised

    (until next stable release 2.0) (1.0 considered to be stable)
  3. vagrant-apache2, vagrant-aws, vagrant- berkshelf, vagrant-boxen, vagrant-bundler, vagrant-butcher, vagrant-digitalocean, vagrant- exec,

    vagrant-fog-box-storage, vagrant-host-path, vagrant-hostmaster, vagrant-hostmanager, vagrant-kvm, vagrant-librarian, vagrant- librarian-chef, vagrant-libvirt, vagrant-lxc, vagrant-mysql, vagrant-notify, vagrant-persistent- storage, vagrant-plugins, vagrant-rake, vagrant- rsync, vagrant-salt, vagrant-screenshot, vagrant- snap, vagrant-vbguest, nugrant, vagrant- sparseimage, vagrant-windows Last edited by p0deje, 10 days ago
  4. vagrant-librarian-chef Automatically runs librarian-chef You will still need to have

    in installed git://github.com/jimmycuadra/vagrant-librarian-chef.git Vagrant 1.2.0+
  5. Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby

    : Vagrant.configure("2") do |config| config.vm.provider :aws do |aws| aws.ami = "ami-7747d01e" end end
  6. Vagrantfile # -*- mode: ruby -*- # vi: set ft=ruby

    : Vagrant.configure("2") do |config| config.vm.provider :aws do |aws, override| end end
  7. Vagrantfile: box # -*- mode: ruby -*- # vi: set

    ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "vagrant122-aws" config.vm.box_url = "file:///home/arturas/ Downloads/vagrant122-aws.box" <..> end
  8. Vagrantfile: aws <..> config.vm.provider :aws do |aws, override| aws.access_key_id =

    'key_id' aws.secret_access_key = 'secret_access_key' aws.keypair_name = 'Vagrant122' aws.region = 'eu-west-1' aws.instance_type = 'm1.micro' aws.ami = 'ami-f2191786' override.ssh.username = 'ubuntu' override.ssh.private_key_path = "path_to_pem" end <..>
  9. usage: step #4 Project provisioning with Vagrantfile Shell script to

    install chef Add shell provision Add chef provision
  10. Vagrantfile: chef <..> config.vm.provision :chef_solo do |chef| chef.cookbooks_path = ["cookbooks"]

    chef.add_recipe "apache2" chef.add_recipe "php" chef.add_recipe "apache2::mod_php5" chef.add_recipe "mysql::server" chef.add_recipe "php::module_mysql" end <..>