Created
May 15, 2014 08:47
-
-
Save fuzzy31u/11e1e369acb1ea6d208d to your computer and use it in GitHub Desktop.
Vagrant1.5でEC2インスタンスを立ち上げる設定 ref: http://qiita.com/fuzzy31u/items/8757414bd1064538da95
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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