Skip to content

Instantly share code, notes, and snippets.

@fuzzy31u
Created May 15, 2014 08:47
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 fuzzy31u/11e1e369acb1ea6d208d to your computer and use it in GitHub Desktop.
Save fuzzy31u/11e1e369acb1ea6d208d to your computer and use it in GitHub Desktop.
Vagrant1.5でEC2インスタンスを立ち上げる設定 ref: http://qiita.com/fuzzy31u/items/8757414bd1064538da95
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "aws"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "<ACCESS_KEY_ID>"
aws.secret_access_key = "<SECRET_ACCESS_KEY>"
aws.keypair_name = "<KEYPAIR_NAME>"
aws.instance_type = "t1.micro"
aws.region = "ap-northeast-1"
aws.ami = "<AMI>"
aws.security_groups = [ '<SECURITY_GROUPS>' ]
override.ssh.username = "ec2-user"
override.ssh.private_key_path = "~/.ssh/aws.pem"
end
end
$ vagrant ssh
__| __|_ )
_| ( / Amazon Linux AMI
___|\___|___|
https://aws.amazon.com/amazon-linux-ami/2014.03-release-notes/
1 package(s) needed for security, out of 18 available
Run "sudo yum update" to apply all updates.
config.vm.provision :fabric do |fabric|
fabric.fabfile_path = "./provision.py"
fabric.tasks = ["execute"]
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment