Step One – Installing Vagrant
- Download Vagrant
- List of supported OS packages: https://www.vagrantup.com/downloads.html
- For Windows, choose Windows 64-bit or use the following URL: https://releases.hashicorp.com/vagrant/1.9.8/vagrant_1.9.8_x86_64.msi?_ga=2.41058914.1341339206.1503842729-16055220.1503842729
- Install after download completes.
- This step assumes familiarity installing Windows applications.
- Reboot as informed by the installer.
- Launch PowerShell (Choose Run as Administrator)
- Install AWS-provider plugin:
- vagrant plugin install vagrant-aws
- Create a project folder on root of C:\
- mkdir project
- Run “vagrant init”
- Add dummy.box from Mitchell Hashimoto.
- vagrant box add aws-dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
Step Two – Using Vagrant
- Use Scott Lowe’s blog on how use vagrant with AWS plugin.
- Create Vagrantfile and instances.yml similar to those of Scott Lowe’s github project.
- Since the Vagrantfile is looking in the user environment for AWS related key_id and secret_key, use set command to add this info to the environment:
- set AWS_ACCESS_KEY_ID=
- set AWS_SECRET_ACCESS_KEY=
- Customize instances.yml for your needs.
- Save files and run “vagrant up”.
- Check AWS Console under EC2 for running instance.
- Use Putty-gen to convert keypair.pem to keypair.ppk.
- This step assumes familiarity with Putty.
- Setup a connection in Putty to connect to running instance.
- This step assumes familiarity with Putty.
- SSH to instance using connection setup in previous step.
- Once done, run “vagrant destroy” to delete instance.
- Verify status of instance is “Terminated” on AWS Console.
- Logout of AWS Console.