|AWS OpsWorks Layer during Chef run|
Solved. SSH connect to my instance, then :
sudo opsworks-agent-cli get_json
This shows me the Opsworks JSON that is merged with Chef Custom JSON... and
there is my layer's name:
Then i used some logic in my recipe...
|setting up mongodb via AWS opsworks|
I just tested this repo on github, it works for MongoDB / OpsWorks. Goto
OpsWorks > Layers > In the "Custom Chef Recipes" section reference this
github link "https://github.com/Cyclic/cookbooks" then add "yum::default"
to the Setup lifecycle event. Then add "mongodb::10gen_repo"
"mongodb::default" and "mongodb::10gen_remrepo" to the Setup lifecycle
|AWS Opsworks Custom Layer Deployment|
Yes, you will need to write your own custom deploy recipe for a custom
layer. Your deploy recipe can configure where the deployment goes and any
steps required to deploy your software. Alternatively you can extend the
OpsWorks static web server layer, which deploys Nginx, to meet your needs.
|OpsWorks - what to include in custom cookbook|
OpsWorks, at the moment, does not support a single cookbook directory
style. It works to build the repository like this:
Then under stack settings, under custom cookbooks, one can add e.g.
whenever::deploy under deploy. For default.rb recipes, once can just add
e.g. sphinx instead of sphinx::default.
And after changing and pushing to the repositiory, one has to run the
update_custom_cookbooks command from the deployments page.
|OpsWorks overriding database.yml / ignoring custom JSON|
Using the short name for the app worked (without hyphens). I was using the
full name before. See:
|OpsWorks Config Data: TypeError - Symbol as array index|
The error is correct: you can't use a symbol as an array index.
By the output of you last line, since it starts with a [, it is an array.
Most likely you are trying to index the dictionary on the second position
of the array with the symbol :private_ip. In this case, the correct line is
You need to go step by step in your mind. If
Then node[:opsworks][:layers][:admin][:instances].first will return
|Amazon OpsWorks Custom Cookbooks not updating when using Load-based instances|
According to the opsworks documentation:
To manually update custom cookbooks
Update your repository with the modified cookbooks. AWS OpsWorks uses the
cache URL that you provided when you originally installed the cookbooks, so
the cookbook root file name, repository location, and access rights should
For Amazon S3 or HTTP repositories, replace the original .zip file with a
new .zip file that has the same name.
For Git or Subversion repositories, edit your stack settings to change
the Branch/Revision field to the new version.
On the stack's page, click Run command and select the update custom