Vagrant-powered environment for deploying a CAS test application using Apache and Tomcat.
For the local install, we are using a box (image) from Puppet Labs. For the remote install, we are using the most recent Amazon Linux AMI.
Puppet modules are pulled in using r10k on the VM.
- Install VirtualBox
- Install Vagrant
- Clone this repository to a local directory
- From within this directory, run:
vagrant up --provider virtualbox
- Install the Vagrant AWS plugin: vagrant plugin install vagrant-aws
- Import the Vagrant box we are using: vagrant box add amazon-linux-x64-13.09 https://github.com/huit/huit-vagrant-boxes/blob/master/aws/amazon-linux-2013.09.box?raw=true`
- If you have not setup an EC2 keypair, do so now.
- If you have deleted the default EC2 security group "basic-web", re-create it or customize this option in step 4.
- Create a Vagrant configuration file in your home directory to contain your AWS credentials:
~/.vagrant.d/Vagrantfile
It should resemble this, and may be expanded with additional options:
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
aws.access_key_id = "YOUR_AWS_ACCESS_KEY"
aws.secret_access_key = "YOUR_AWS_SECRET_KEY"
aws.keypair_name = "CHOOSE_AN_EXISTING_KEYPAIR"
override.ssh.private_key_path = "PATH_TO_PRIVATE_KEY"
end
end
- Run:
vagrant up --provider=aws