Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm deploying a web app on AWS.

I intend to use chef to build AMIs which I'll then put into production.

I want to have Chef monitor a URL stored in simpleDB. The URL would point to a tarball in S3. There would be different URLs, one for a config tarball, one for a code tarball. When I update the URL in simpleDB, I want chef to spot this and pull in and apply the configs/deploy the code.

Is this possible? Has anything like this been done before or would I need to roll my own code? I think Chef can monitor URLs, but how would be the best way of getting it to load that URL from simpleDB?

share|improve this question

No problem. The database is not strictly necessary for this (as I propose you store those settings as node attributes... that way you can change the node settings any time you want to and chef will ensure compliance), however, I'll assume you are using the db for other things and leave it in the basic architecture. Here's my proposed flow:

  1. Store [:deploy][:configurl] and [:deploy][:codeurl] as attributes on the node
  2. Have chef execute two separate SQL queries to retrieve each URL from your database
  3. Compare the url results from the database to the node attributes
  4. The rest of the items are wrapped in not_if the results match
  5. remote_file the urls if the local tarball does not exist
  6. untar
  7. do all the things necessary to utilize the tar'd files
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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