5

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 good 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 read through the chef scripts but being new to them it is like reading gibberish.

chicks
  • 3,639
  • 10
  • 26
  • 36
James
  • 173
  • 4

1 Answers1

4

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.

chicks
  • 3,639
  • 10
  • 26
  • 36
thexacre
  • 1,849
  • 12
  • 14
  • 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: http://docs.aws.amazon.com/opsworks/latest/userguide/resources-attach.html – thexacre Jun 26 '15 at 12:09