From ccbb5d34927dc1905984bead3ebb576c0ea20960 Mon Sep 17 00:00:00 2001 From: Galen Sampson Date: Wed, 6 Nov 2013 19:16:56 -0800 Subject: [PATCH] Vagrantfile updates. - Remove the overrides config.vm.box and config.vm.box_url and use the same values for all providers. - Use the same private key path for all providers. It is still possible to set a different private key path through the environment variable SSH_PRIVKEY_PATH if desired (your AWS key may be different from your Virtualbox key). - Allow the environment variable AWS_INSTANCE_TYPE to specify the instance type of instead of hard coding the AWS instance type as 't1.micro'. 't1.micro' is still the default if unspecified. - Use the same environment variables for keys as the Amazon provided EC2 API tools. This allows people who already have the EC2 tools set up correctly to use 'vagrant up' with less environment configuration than before. - Rewrite the provisioning code. The goal is to be idempotent and to correctly install docker for all providers instead of just virtualbox. It will conditionally install the virtualbox guest additions if virtualbox is the provider. - Update the AWS install documentation to reflect the changes. --- Vagrantfile | 163 +++++++++++++++++++-------- docs/sources/installation/amazon.rst | 35 ++++-- 2 files changed, 146 insertions(+), 52 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 93a2219fa0..a0bb38ca4f 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -4,65 +4,135 @@ BOX_NAME = ENV['BOX_NAME'] || "ubuntu" BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64.box" VF_BOX_URI = ENV['BOX_URI'] || "http://files.vagrantup.com/precise64_vmware_fusion.box" +AWS_BOX_URI = ENV['BOX_URI'] || "https://github.com/mitchellh/vagrant-aws/raw/master/dummy.box" AWS_REGION = ENV['AWS_REGION'] || "us-east-1" -AWS_AMI = ENV['AWS_AMI'] || "ami-d0f89fb9" +AWS_AMI = ENV['AWS_AMI'] || "ami-69f5a900" +AWS_INSTANCE_TYPE = ENV['AWS_INSTANCE_TYPE'] || 't1.micro' + FORWARD_DOCKER_PORTS = ENV['FORWARD_DOCKER_PORTS'] +SSH_PRIVKEY_PATH = ENV["SSH_PRIVKEY_PATH"] + +# A script to upgrade from the 12.04 kernel to the raring backport kernel (3.8) +# and install docker. +$script = <