• No products in the cart.

DevOps on AWS – Installing Vagrant and configuring Virtual boxes for Environments

Step 1 : Install VirtualBox

Step 2 : Install Vagrant

Step 3 : Create a new directory for your configuration scripts. e.g. puppet, or docker. This folder will not contain the VirtualBox binary files, just the Vagrant configuration scripts.

Step 4 : From the command line, run the following commands:

$ vagrant init

Then add the following content to the ‘vagrantfile’ which is created in the previous step:

# -*- mode: ruby -*-
# vi: set ft=ruby :


HOST_IP = ‘’

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define “puppet” do |puppet|
puppet.vm.hostname = “puppet.rnstech.com”
puppet.vm.box = “trusty-server”
puppet.vm.box_url = “https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box”
puppet.vm.network :private_network,
ip: HOST_IP,
netmask: ‘’
puppet.vm.synced_folder ‘html’, ‘/var/www/html’
puppet.vm.synced_folder ‘puppet’, ‘/etc/puppet’

config.vm.define “puppetmaster” do |puppetmaster|

puppetmaster.vm.hostname = “puppetmaster.rnstech.com”
puppetmaster.vm.box = “trusty-server”
puppetmaster.vm.box_url = “https://oss-binaries.phusionpassenger.com/vagrant/boxes/latest/ubuntu-14.04-amd64-vbox.box”
puppetmaster.vm.network :private_network,

ip: ‘’,
netmask: ‘’

puppetmaster.vm.synced_folder ‘htmlmaster’, ‘/var/www/html’
puppetmaster.vm.synced_folder ‘puppetmaster’, ‘/etc/puppet’


Start the Virtual boxes:
$ vagrant up

SSH to the virtual boxes
$ vagrant ssh puppetmaster

Open an other terminal and go to vagrant file locatio run
$ vagrant ssh puppet

To return to your host machine, run the command:
$ exit

To destroy the VM and remove the binary disk image:
$ vagrant destroy

Note: This command must be run from the directory which contains the Vagrantfile for the box you wish to destroy. It will not remove any of your configuration files.

February 22, 2021

Contact Address

Rise ‘n’ Shine Technologies:
Third Floor, Plot No1(Part), near KPHB Metro Station, KPHB Bagyanagar Colony, Kukatpally Main road, Balanagar Mandal, Rangareddy Dist-500072

Landmarks : Above VIOLET & PURPLE, near PJR statue, kphb metro station

  8686 98 8042


All rights reserved.
error: Alert: Content is protected !!