Provisioning Vagrant VM using Puppet
Arpit Aggarwal
What is Vagrant
● An open source tool written by Mitchell
Hashimoto.
● Wrapper around a variety of VM providers
like VirtualBox, VMware.
● Provides a single command that uniformly
creates, provisions, destroys and connects
to machines.
Why Vagrant
● Lowers environmental setup time.
● Increases development/production parity.
● Makes the “works on machine” excuse a
relic of the past.
Vagrant Lifecycle
● Vagrant init
● Vagrant up
● Vagrant suspend/halt/destroy
What is Provisioning
● Actions to prepare a server with
appropriate systems, data and software.
● Setting up a server for use in the network.
Vagrant Provisioners
● Automatically installs softwares, copy data on a
machine.
● Alter configuration of a machine.
● Offers multiple options for provisioning the machine:
– Shell scripts.
– Puppet
– Chef
– Ansible
– Salt.
Vagrant Shell Provisioning
● Allows us to upload and execute a script
within the guest machine.
● Shell provisioner options:
– Inline
– Path
When Provisioning Happens
● On running
– vagrant up
– vagrant provision
– vagrant reload --provision
What is Puppet
● An open-source configuration management
tool written by Luke Kanies.
● Has its own declarative language which
describe system configuration.
●
Programs are called “manifests” and
use the “.pp” file extension.
Why Puppet
● Avoid writing in-house scripts.
● Ease the work of Sysadmin.
How Puppet Works
● Puppet configures systems in two main
stages:
– Compile a catalog
– Apply the catalog
What is a Catalog?
● Document that describes the desired
system state.
● Lists all resources that need to be
managed, as well as any dependencies
between those resources.
Catalog Compilation And Execution
● Retrieve the Node Object
● Set Variables from the Node Object
● Evaluate the Main Manifest
● Load and Evaluate Classes from Modules
● Evaluate Classes from the Node Object
Thank You

Puppet Provisioning Vagrant Virtual Machine

  • 1.
    Provisioning Vagrant VMusing Puppet Arpit Aggarwal
  • 2.
    What is Vagrant ●An open source tool written by Mitchell Hashimoto. ● Wrapper around a variety of VM providers like VirtualBox, VMware. ● Provides a single command that uniformly creates, provisions, destroys and connects to machines.
  • 3.
    Why Vagrant ● Lowersenvironmental setup time. ● Increases development/production parity. ● Makes the “works on machine” excuse a relic of the past.
  • 4.
    Vagrant Lifecycle ● Vagrantinit ● Vagrant up ● Vagrant suspend/halt/destroy
  • 5.
    What is Provisioning ●Actions to prepare a server with appropriate systems, data and software. ● Setting up a server for use in the network.
  • 6.
    Vagrant Provisioners ● Automaticallyinstalls softwares, copy data on a machine. ● Alter configuration of a machine. ● Offers multiple options for provisioning the machine: – Shell scripts. – Puppet – Chef – Ansible – Salt.
  • 7.
    Vagrant Shell Provisioning ●Allows us to upload and execute a script within the guest machine. ● Shell provisioner options: – Inline – Path
  • 8.
    When Provisioning Happens ●On running – vagrant up – vagrant provision – vagrant reload --provision
  • 9.
    What is Puppet ●An open-source configuration management tool written by Luke Kanies. ● Has its own declarative language which describe system configuration. ● Programs are called “manifests” and use the “.pp” file extension.
  • 10.
    Why Puppet ● Avoidwriting in-house scripts. ● Ease the work of Sysadmin.
  • 11.
    How Puppet Works ●Puppet configures systems in two main stages: – Compile a catalog – Apply the catalog
  • 12.
    What is aCatalog? ● Document that describes the desired system state. ● Lists all resources that need to be managed, as well as any dependencies between those resources.
  • 13.
    Catalog Compilation AndExecution ● Retrieve the Node Object ● Set Variables from the Node Object ● Evaluate the Main Manifest ● Load and Evaluate Classes from Modules ● Evaluate Classes from the Node Object
  • 14.