Difference between revisions of "Vagrant"

From Freephile Wiki
Jump to navigation Jump to search
 
(8 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[mw:Vagrant_(software)|Vagrant]] is computer software for creating and configuring virtual development environments. It can be seen as a wrapper around virtualization software such as [[VirtualBox]], KVM, VMware and around configuration management software such as [[Ansible]], [[Chef]], Salt or [[Puppet]].
+
[[w:Vagrant_(software)|Vagrant]] is computer software for creating and configuring virtual development environments. It can be seen as a wrapper around virtualization software such as [[VirtualBox]], KVM, VMware and around configuration management software such as [[Ansible]], [[Chef]], Salt or [[Puppet]].
  
See Also [[MediaWiki-Vagrant]]
+
Vagrant uses '''provisioners''' like Ansible to do the 'work' and '''providers''' like VirtualBox to provide the host/platform. Cloud providers can be AWS, or OpenStack; Containerization can be done with Docker or LXC.
 +
 
 +
I prefer Ansible over Chef or Puppet, yet the latter are the biggest 'provisioners' for Vagrant.  And, I prefer [[Digital Ocean]] to AWS and the former is only available as a provider for Vagrant through a 3rd-party plugin<ref>https://github.com/devopsgroup-io/vagrant-digitalocean</ref>.  Thus, we use Vagrant to build local development environments provided by VirtualBox, and provisioned by Ansible.  We use the same Ansible playbooks to provision hosts at DigitalOcean
 +
 
 +
Vagrant was created by HashiCorp which is a leader in DevOps with a [https://www.hashicorp.com/tao.html Tao] which underlies their product portfolio and technology.
 +
 
 +
While it was in beta, it was great to be able to create a vagrant box, and then vagrant share that box publicly even when the machine was located internally (MG project with MediaWiki vagrant). Haven't used it since, so need to reevaluate how vagrant-share works now for future projects.  No doubt vagrant will continue to be extremely useful.
 +
 
 +
== Code ==
 +
https://github.com/hashicorp/vagrant Vagrant is distributed under the MIT license.
 +
 
 +
== Plugins ==
 +
* https://github.com/devopsgroup-io/vagrant-digitalocean A Vagrant provider plugin that manages DigitalOcean droplets.
 +
* [https://github.com/devopsgroup-io/vagrant-hostmanager Vagrant Hostmanager] from the DevOps Group in Philadelphia, PA let's you manage the 'hosts' file on your guests, and optionally the host system itself, to make multi-node deployments easier. Note that there are a handful of 'vagrant hostmanager' plugins <ref>e.g. https://github.com/cogitatio/vagrant-hostsupdater .</ref> The DevOps Group also makes [https://github.com/devopsgroup-io/catapult Catapult] which is a system compared to Pantheon or Acquia for managing the full lifecycle of Drupal hosting.
 +
* [https://github.com/mattes/vagrant-dnsmasq ]  A Dnsmasq Vagrant plugin that manages the dnsmasq.conf file and /etc/resolver directory on your host system.
 +
 
 +
 
 +
== Creating a CentOS 7 box ==
 +
You need a CentOS box to develop/test? 
 +
 
 +
# make a new folder: <code>mkdir ~/src/centos7 && cd ~/src/centos7</code>
 +
# <code>vagrant init centos/7</code> will write your Vagrantfile for you
 +
# <code>vagrant up</code> will start (and build) the virtual machine
 +
# <code>vagrant box update</code> will pull in all the updates to the base box
 +
 
 +
See https://app.vagrantup.com/centos/boxes/7
 +
 
 +
 
 +
== See Also ==
 +
[[MediaWiki-Vagrant]]
 +
 
 +
 
 +
{{References}}
  
 
[[Category:DevOps]]
 
[[Category:DevOps]]
 
[[Category:Configuration Management]]
 
[[Category:Configuration Management]]
 
[[Category:Virtualization]]
 
[[Category:Virtualization]]

Latest revision as of 13:11, 30 August 2018

Vagrant is computer software for creating and configuring virtual development environments. It can be seen as a wrapper around virtualization software such as VirtualBox, KVM, VMware and around configuration management software such as Ansible, Chef, Salt or Puppet.

Vagrant uses provisioners like Ansible to do the 'work' and providers like VirtualBox to provide the host/platform. Cloud providers can be AWS, or OpenStack; Containerization can be done with Docker or LXC.

I prefer Ansible over Chef or Puppet, yet the latter are the biggest 'provisioners' for Vagrant. And, I prefer Digital Ocean to AWS and the former is only available as a provider for Vagrant through a 3rd-party plugin[1]. Thus, we use Vagrant to build local development environments provided by VirtualBox, and provisioned by Ansible. We use the same Ansible playbooks to provision hosts at DigitalOcean

Vagrant was created by HashiCorp which is a leader in DevOps with a Tao which underlies their product portfolio and technology.

While it was in beta, it was great to be able to create a vagrant box, and then vagrant share that box publicly even when the machine was located internally (MG project with MediaWiki vagrant). Haven't used it since, so need to reevaluate how vagrant-share works now for future projects. No doubt vagrant will continue to be extremely useful.

Code[edit | edit source]

https://github.com/hashicorp/vagrant Vagrant is distributed under the MIT license.

Plugins[edit | edit source]

  • https://github.com/devopsgroup-io/vagrant-digitalocean A Vagrant provider plugin that manages DigitalOcean droplets.
  • Vagrant Hostmanager from the DevOps Group in Philadelphia, PA let's you manage the 'hosts' file on your guests, and optionally the host system itself, to make multi-node deployments easier. Note that there are a handful of 'vagrant hostmanager' plugins [2] The DevOps Group also makes Catapult which is a system compared to Pantheon or Acquia for managing the full lifecycle of Drupal hosting.
  • [1] A Dnsmasq Vagrant plugin that manages the dnsmasq.conf file and /etc/resolver directory on your host system.


Creating a CentOS 7 box[edit | edit source]

You need a CentOS box to develop/test?

  1. make a new folder: mkdir ~/src/centos7 && cd ~/src/centos7
  2. vagrant init centos/7 will write your Vagrantfile for you
  3. vagrant up will start (and build) the virtual machine
  4. vagrant box update will pull in all the updates to the base box

See https://app.vagrantup.com/centos/boxes/7


See Also[edit | edit source]

MediaWiki-Vagrant


References[edit source]