An introduction to vagrant for DrupalCamp 2013. Aimed at beginners, in this talk I talk about providers, provisioners and plugins. I also cover best practices and address problems which vagrant may introduce.
Coming up ● What vagrant really is ● How you can start using vagrant today (or tomorrow if you don’t want to miss the other awesome talks) ● Some neat tricks ● The downside of vagrant
Enter vagrant ● Configuration: Vagrantfile ● Boxes: Exported Virtual Machines + metadata ● Providers: VirtualBox ● Synced folders: Folders from the host which are dublicated inside the VM ● Provisioners: Shell / ansible / Chef / Puppet ● Plugins: Way to extend Vagrant with additional Providers, Provisioners and other stuff
Chef Provisioning package "nginx" do action :install end template "/etc/nginx/nginx.conf" do source "nginx.conf.erb" action :create end execute "pecl install -f mongo" do action :run end
A sample workflow Repository Vagrantfile Provisiong files … $ git clone [email protected]:vagrantLover/awesomeVm.git $ cd awesomeVm $ vagrant up # this may take a while $ vagrant ssh
Real world vagrant apache php python ruby nodejs mysql mongodb redis project1 project2 python-stuff crazy-idea vs apache php mysql apache php mongodb redis apache php nodejs mysql project1 project2 project3
Real world vagrant Which provider? Which base box? Which provisioner? How should I start? How to best solve X? Do I need many vms? How should I switch? What if anything goes wrong?
Real world vagrant Which provider? Which base box? Which provisioner? How should I start? How to best solve X? Do I need many vms? How should I switch? What if anything goes wrong? Would you start already?