Skip to content

Instantly share code, notes, and snippets.

@thwarted
Created April 1, 2014 05:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thwarted/9908215 to your computer and use it in GitHub Desktop.
Save thwarted/9908215 to your computer and use it in GitHub Desktop.
a simplisitic Vagrantfile for use with vagrant-aws; vagrant up --provider=aws
if not ENV['AWS_ACCESS_KEY_ID'] or not ENV['AWS_SECRET_ACCESS_KEY']
puts "Set AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY in the environment"
exit
end
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
#aws.region = "us-west-2"
#aws.ami = "ami-e091f8d0"
aws.region = "us-east-1"
aws.ami = "ami-f353449a"
aws.access_key_id = ENV["AWS_ACCESS_KEY_ID"]
aws.secret_access_key = ENV["AWS_SECRET_ACCESS_KEY"]
aws.keypair_name = "default" # key pair name configured in EC2 already
aws.security_groups = ["default"]
override.ssh.username = "root"
override.ssh.private_key_path = "~/.ssh/id_rsa" # path toe private key
end
config.ssh.pty = true
config.ssh.forward_agent = true
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment