Thursday, September 4, 2014

Solutions for Vagrant deployment to AWS


Here are a bunch of notes from troubleshooting Vagrant out to AWS:





An active machine was found with a different provider. Vagrant currently allows each machine to be brought up with only a single provider at a time. A future version will remove this limitation. Until then, please destroy the existing machine to up with a new provider. Machine name: default Active provider: virtualbox Requested provider: aws

 ... yep, destroy it



<br /><span style="font-family: Arial, Helvetica, sans-serif;">Here are a bunch of old notes on errors I got while trying to use Vagrant with AWS.</span><br /> The box you're attempting to add doesn't support the provider you requested. Please find an alternate box or use an alternate provider. Double-check your requested provider to verify you didn't simply misspell it. Name: hashicorp/precise64 Address: https://vagrantcloud.com/hashicorp/precise64 Requested provider: [:aws] ... change to the dummy box There was an error talking to AWS. The error message is shown below: UnauthorizedOperation =&gt; You are not authorized to perform this operation. ... IAM... had to make user with that key ID have power access




==&gt; default: Warning! Vagrant might not be able to SSH into the instance. ==&gt; default: Please check your security groups settings. /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/expects.rb:6:in `response_call': The image id '[ami-21e6e964]' does not exist (Fog::Compute::AWS::NotFound) from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/response_parser.rb:8:in `response_call' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:363:in `response' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:233:in `request' from /Users/tlarson/.vagrant.d/gems/gems/fog-1.23.0/lib/fog/xml/sax_parser_connection.rb:35:in `request' ... had to find an AMI, in the right zone ==&gt; default: Warning! Vagrant might not be able to SSH into the instance. ==&gt; default: Please check your security groups settings. /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/expects.rb:6:in `response_call': The key pair 'halfpricedgranite-workbook' does not exist (Fog::Compute::AWS::NotFound) from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/middlewares/response_parser.rb:8:in `response_call' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:363:in `response' from /Users/tlarson/.vagrant.d/gems/gems/excon-0.39.5/lib/excon/connection.rb:233:in `request' from /Users/tlarson/.vagrant.d/gems/gems/fog-1.23.0/lib/fog/xml/sax_parser_connection.rb:35:in `request' ... again, in the right zone ==&gt; default: Waiting for instance to become "ready"... ==&gt; default: Waiting for SSH to become available... ^C ... because networking is restricted: security_groups ... and may want to name it