Created
December 31, 2013 05:23
-
-
Save atsuya046/8192949 to your computer and use it in GitHub Desktop.
Vagrantfile for EC2 Ubuntu instance.
This file contains hidden or 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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Uncomment these lines (and the ones in the generated Gemfile) if you want | |
# to live on the Edge: | |
# | |
# Vagrant.require_plugin "vagrant-berkshelf" | |
# Vagrant.require_plugin "vagrant-omnibus" | |
Vagrant.configure("2") do |config| | |
config.vm.box = "dummy" | |
config.omnibus.chef_version = :latest | |
config.ssh.forward_agent = true | |
config.ssh.username = 'ubuntu' | |
config.ssh.private_key_path = '~/.ssh/nobus_key.pem' | |
config.vm.provider :aws do |aws, override| | |
aws.access_key_id = 'XXXXXXXXXXXXXXXXXXXXXX' | |
aws.secret_access_key = 'XXXXXXXXXXXXXXXXXXXXXX' | |
aws.keypair_name = 'nobus_key' | |
aws.instance_type = 't1.micro' | |
aws.region = 'ap-northeast-1' | |
aws.ami = 'ami-3f32ac3e' | |
aws.availability_zone = 'ap-northeast-1c' | |
aws.security_groups = ['webservice'] | |
aws.tags = { | |
'Name' => 'vagrant-test', | |
'Description' => 'vagrant test' | |
} | |
end | |
config.vm.provision :chef_solo do |chef| | |
chef.cookbooks_path = ["./cookbooks"] | |
chef.add_recipe "apt" | |
chef.add_recipe "git" | |
chef.add_recipe "nginx" | |
chef.json = { | |
"nginx" => { | |
"worker_processes" => 4, | |
} | |
} | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment