Vagrant: Provisioning Dev Environments Automatically

Héctor Fabio Jiménez Saldarriaga

@c1b3rh4ck              @h3ctorjs

www.devops.com.co

  • Harry Potter and Unix/Gnu-Linux Fanboy

  • Paranoic by default

  • Interested in Open Source and Open Communities, coorganizer Pereirajs and PereiraTechTalks

  • DevOps/SysOps practicioner

  • Infra Engineer at Soluciones Globales SAS

  • Helping Startups to improve the CI/CD  Workflow

What is Vagrant?

What is Vagrant?

Vagrant is an open source tool for building and managing virtual machine environments in a single workflow.

What is Vagrant?

This means, essentially, that it allows you to manage and share pre-configured virtual machines.and makes the "works on my machine" excuse a relic of the past.

What is this all about?

Name: Vagrant
Developer: HashiCorp
Initial Release: 2010
Latest Version: 2.2.6
Written in: Ruby
Operating System: Linux, FreeBSD, OS X, and Microsoft
Interface: Command line
Website: www.vagrantup.com

John Bender and Mitchell Hashimoto

🤗Vagrant is for EveryOne👩‍💻 👨‍💻

  • For Developers
  • For SysOps/DevOps/InfraEngineers
  • For Designers
 Focusing on your task

Use Case #1🔭

Use Case #1🔭

 Focusing on your task
  •  An already all-in-one virtual machine with all the software and dependencies installed is a great way to make developers focused on their tasks.
  • One just needs to create an optimal virtual box, once, and then it can be distributed to collaborators.

Use Case #2 📈

Improving the workflow

Use Case #2 📈

Improving the workflow
  • Having the exact same environment, both in development and production (and the intermediary ones[1]). If this is accomplished, the probability of the production app crashing due to an error that was not spot on the development environment is very little

* [1]Traditional Development/Integration/Staging/Production Practice for Software Development

Use Case #3 ⭐️

Distribution
  • By packing everything you need on a virtual machine and distributing it, you have done work that others don’t need to (uselessly) replicate.

Use Case #3 ⭐️

WorkFlow🛠️⚙️

VagrantFile 📃📑

VagrantBox 📦

VagrantBox 📦

VagrantBox 📦

Metadata from a box

VagrantBox 📦

Text

Use know ssh keys for everyone Insecure by Default

VagrantBox Repo 📦

* [4] How to create vagrant boxes

VagrantBox Cycle📦

$ vagrant init <box> [url]
$ vagrant up
$ vagrant halt
$ vagrant destroy [--force]
$ vagrant reload
$ vagrant ssh
$ vagrant status

List of Commands

Providers 📦

Providers 📦

VirtualMachine⚙️🔩

WorkFlow🛠️⚙️

Provisioners🛠️⚙️

Provisioners🛠️⚙️

Networking🛠️⚙️

Tips: MultiMachine

Tips: Loops

Demo

Thank you So Much!

and go ahead and build great products using vagrant

References

Vagrant, Provisioning Dev Enviroment Automatically

By Hector F. Jimenez Saldarriaga

Vagrant, Provisioning Dev Enviroment Automatically

Vagrant, Provisioning Dev Enviroment Automatically

  • 239