The company I'm working for is making a move to AWS and so I've been given the opportunity to start investigating the various services they provide. OpsWorks looks really go for rolling out mass architecture changes however the 'custom' layer includes 13 recipes that cannot be removed.

They seem to do all sorts of different things including mounting a drive over /var/www/html

Does anyone know where I can find some documentation on precisely what the default OptsWorks scripts are doing and more importantly why they are doing it?

I can obviously ready through the chef scripts but being new to them its like reading gibberish.


Realistically any summary will be missing some amount of detail so if you want to know exactly then you'll have to read the source. The source is pretty accessible though, you can actually just click the recipe names and they'll take you to the source on GitHub:

enter image description here

You can also check the metadata.rb of each recipe for a brief description.

At a high level:

  • opsworks_initial_setup - Installs basic utilities and dependencies such as NTP, vim and sets basic config such as limits.conf
  • ssh_* - OpsWorks supports managing SSH users via the OpsWorks interface, most of the SSH recipes are to support that functionality.
  • mysql::client - Obviously installs the MySQL client, although this recipe actually does nothing if the stack doesn't involve MySQL
  • opsworks_ganglia* - Does nothing unless you have a ganglia layer
  • dependencies - Supports the OS packages functionality of OpsWorks and I think also installs some dependencies needed by the OpsWorks agent
  • ebs - Supports the EBS functionality of OpsWorks
  • agent_version - Updates the agent

In general, most of these recipes are supporting functionality built into OpsWorks but you could overwrite any of the recipes to remove anything you feel is detrimental.

To some extent the benefit of OpsWorks is to provide sensible defaults, so in most cases it's pragmatic to establish a need to alter the defaults before setting out to customise things.

  • I should have emphasize the why aspect of my question. This has all come about because the scripts are mounting instance store over /var/www which I'm under the impression would result in data under that directory being lost after a restart and I can't fathom why this is being done, I'm sure there is a good reason. – James Jun 26 '15 at 10:10
  • It might be best to ask that specific question separately. However, I'm pretty sure OpsWorks deploys to /srv/www by default and when you add an EBS volume you should be able to set the mount point to /srv/www therefore making it persistent: docs.aws.amazon.com/opsworks/latest/userguide/… – thexacre Jun 26 '15 at 12:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.