Vagrant + aws 的應用也很夯
這是一個官方的 plugin
Install using standard Vagrant 1.1+ plugin installation methods. After installing, vagrant up and specify the aws provider. An example is shown below.
$ vagrant plugin install vagrant-aws
...
$ vagrant up --provider=aws
...
Of course prior to doing this, you'll need to obtain an AWS-compatible box file for Vagrant.
After installing the plugin (instructions above), the quickest way to get started is to actually use a dummy AWS box and specify all the details manually within a config.vm.provider block. So first, add the dummy box using any name you want:
$ vagrant box add dummy https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box
...
And then make a Vagrantfile that looks like the following, filling in your information where necessary.
Vagrant.configure("2") do |config|
config.vm.box = "dummy"
config.vm.provider :aws do |aws, override|
aws.access_key_id = "YOUR KEY"
aws.secret_access_key = "YOUR SECRET KEY"
aws.keypair_name = "KEYPAIR NAME"
aws.ami = "ami-7747d01e"
override.ssh.username = "ubuntu"
override.ssh.private_key_path = "PATH TO YOUR PRIVATE KEY"
end
end
And then run vagrant up --provider=aws.