Dependencies/Setup:
- Vagrant (http://www.vagrantup.com/downloads) this will be our “remote server”
- VirtualBox (https://www.virtualbox.org/wiki/Downloads) this will be our vagrant provider
- Ansible (http://docs.ansible.com/intro_installation.html) windows is not supported at this time. If you have windows, skip this step and come back after you setup vagrant below on the VM itself
After you have these installed, in a new directory do the following steps:
- Run “vagrant init” which will put a new file called “Vagrantfile” in that directory
- Replace the contents of the Vagrantfile with the following:
Vagrant.configure("2") do |config|
config.vm.provision "shell", inline: "echo Welcome to Tyler's Training"
config.vm.define "mockwebserver" do |mockwebserver|
mockwebserver.vm.box = "hashicorp/precise32"
end
End
After this is done, you can test it by running “vagrant up” which will boot your mock web server. “vagrant destroy” will do just that. If you’re running windows, you will need to install ansible on the server itself, you can do this by running “vagrant ssh” (username and password both 'vagrant’) and following the install steps for ansible as linked.