Tran Duy PHP Developer since 2012 User 2877596 on stackoverflow Loves open source Developments Go1 Company [email protected] October 29, 2014 GO1 (meetup) Vagrant October 29, 2014 1 / 9
tool for building complete development environments, sandboxed in a virtual machine. Vagrant lowers development environment setup time, increases development/production parity, and brings the idea of disposable compute resources down to the desktop 1 Developer tool that automates VM management GO1 (meetup) Vagrant October 29, 2014 3 / 9
tool for building complete development environments, sandboxed in a virtual machine. Vagrant lowers development environment setup time, increases development/production parity, and brings the idea of disposable compute resources down to the desktop 1 Developer tool that automates VM management 2 Automate the setup of your development environment GO1 (meetup) Vagrant October 29, 2014 3 / 9
tool for building complete development environments, sandboxed in a virtual machine. Vagrant lowers development environment setup time, increases development/production parity, and brings the idea of disposable compute resources down to the desktop 1 Developer tool that automates VM management 2 Automate the setup of your development environment 3 Terminology Provision Mount Vagrantfile Ruby GO1 (meetup) Vagrant October 29, 2014 3 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer GO1 (meetup) Vagrant October 29, 2014 4 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer 2 If you are an operations engineer GO1 (meetup) Vagrant October 29, 2014 4 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer 2 If you are an operations engineer 3 If you are a designer GO1 (meetup) Vagrant October 29, 2014 4 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer 2 If you are an operations engineer 3 If you are a designer 4 The server disk died GO1 (meetup) Vagrant October 29, 2014 4 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer 2 If you are an operations engineer 3 If you are a designer 4 The server disk died 5 It will mange VM for you , describe VM in configuration file GO1 (meetup) Vagrant October 29, 2014 4 / 9
provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team. 1 If you are a developer 2 If you are an operations engineer 3 If you are a designer 4 The server disk died 5 It will mange VM for you , describe VM in configuration file 6 You can allow other to contribute GO1 (meetup) Vagrant October 29, 2014 4 / 9
Running vagrant init hashicorp/precise32 vagrant up 2 The Vagrantfile Vagrant.configure(versiob) do |config| config.vm.box = ”hashicorp/precise32” 3 Working with the Vagrant Machine State of the Vagrant machine SSH Share filesystem Basic networking GO1 (meetup) Vagrant October 29, 2014 6 / 9
directory: #! / usr / bin /env bash echo ” I n s t a l l i n g Apache and s e t t i n g i t up . . . ” apt−get update apt−get i n s t a l l −y apache2 >/dev/ n u l l 2>&1 rm −r f / var /www l n −f s / vagrant / var /www With the shell script created, the next step is to configure Vagrant to use the script. Add the following line somewhere in the Vagrantfile: c o n f i g .vm. p r o v i s i o n ” s h e l l ” , path : ” p r o v i s i o n . sh ” GO1 (meetup) Vagrant October 29, 2014 8 / 9
that a bare-bones Vagrant environment can be brought up in just two commands with no additional configuration. Also we introduced all the available automated provisioners in Vagrant, showing how theyre used to set up a basic Apache web sever as an example. GO1 (meetup) Vagrant October 29, 2014 8 / 9