Skip to content

Instantly share code, notes, and snippets.

@nitheesh86
Created November 7, 2017 15:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save nitheesh86/6670ec91a7b6e6dd61eb44aeefbaee95 to your computer and use it in GitHub Desktop.
Vagrant File
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure("2") do |config|
config.vm.provider :aws do |aws, override|
override.vm.box = "dummy"
aws.access_key_id = "XXXXXXXXXXXXXX"
aws.secret_access_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
aws.keypair_name = "yourkey"
aws.ami = "ami-0797ea64"
aws.region = "us-west-2"
aws.instance_type = "t2.micro"
iam_instance_profile_name = "ec2-role"
aws.security_groups = ['XXXXXXX']
aws.subnet_id = "XXXXXXXXX"
aws.tags = {
'Name' => 'ImmutableServer'
}
override.ssh.username = "ec2-user"
override.ssh.private_key_path = "/Users/username/yourkey.pem"
end
config.vm.provision "chef_solo" do |chef|
chef.cookbooks_path = "cookbooks"
chef.add_recipe "Base"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment