Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.