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

We use Chef to set up our servers, but I'm looking for a way to consolidate our server dependencies into a single config file that lives in source control.

We use capistrano for deployments, a custom build script for continuous integration, and now we want a Nagios poll to check that all dependencies are present (rvm installed, correct ruby version, gems installed, etc.)

This means that we would be duplicating the dependency config in 3 places, and I would like to refactor this. I want to be able to use the same code from both my deploy script and my build script, to handle the installation of packages and setting up the environment. We were thinking about using our capistrano scripts within the build script, but that seems too convoluted. I'm also looking for code that can inspect the environment and check that it meets the app's requirements.

I image that the configuration would be something like .environment.yml in the root directory of the application. The scripts could be something like './script/environment setup' and './script/environment check'.

I'm posting this as a question because I don't want to reinvent the wheel. I would like to ask if there is already a convention in place, or if anyone has any better suggestions.

share|improve this question
add comment

2 Answers 2

for the things that you mention, maintain a config in my repo, i use puppet http://puppetlabs.com/ ideal because puppet is configured not like capistrano, where you say how in puppet, you say what, and puppet do the work.

share|improve this answer
    
...That's fine, but the OP already said that they're already using Chef. Changing your Config Management is a lot of work. –  gWaldo Oct 31 '11 at 16:14
add comment

You could (and probably should) use include recipe statements in your Ruby apps.

If you're talking about mandatory gems, you could include a gemfile in your application.

One of the problems with Chef (and likely Puppet, too) is that there are many "right" ways of doing things, and it's hard to know which is "most right" for your situation.

share|improve this answer
add comment

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.