I have a fairly complex deployment of dynamically configured instances of a rail apps on nginx using passenger that I currently use Capistrano for. I am trying to automate the e
I was able to solve this is issue using Chef+Kitchen+Vagrant
Here's my wrapper: https://github.com/elitechance/opsworks-cookbooks-wrapper
git clone https://github.com/elitechance/opsworks-cookbooks-wrapper.git
git clone https://github.com/aws/opsworks-cookbooks.git
cd opsworks-cookbooks-wrapper
cp .kitchen.sample.yml .kitchen.yml
cp Berksfile.sample Berksfile
cp metadata.sample.rb metadata.rb
The last command will simulate OpsWorks NodeJs Setup Recipes, see .kitchen.sample.yml
for details.
$ chef exec kitchen setup
The first time you run $ chef exec kitchen setup
, you will encounter errors saying:
Running handlers: [2016-04-08T17:08:34+00:00] ERROR: Running exception handlers Running handlers complete [2016-04-08T17:08:34+00:00] ERROR: Exception handlers complete Chef Client failed. 43 resources updated in 01 minutes 02 seconds [2016-04-08T17:08:34+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out [2016-04-08T17:08:34+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report [2016-04-08T17:08:34+00:00] ERROR: ruby_blockFallback for remote_file[/tmp/rubygems-2.2.2.tgz] had an error: NoMethodError: remote_file/tmp/rubygems-2.2.2.tgz had an error: NoMethodError: undefined method `to_sym' for [:create]:Array [2016-04-08T17:08:34+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
$ chef exec kitchen setup