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.

I have a system I need to duplicate over several systems and make minor changes like change less/css variables and configuration files.

Is there a best practice for these kind of problems?

I currently do:

git clone repo
cp ../default/config.js config.js
... for several files

or should I create different branches of the same repo

or should I create an repo for the changes?

It is currently doable but it will get annoying if I get more than 5 similar systems.

share|improve this question
add comment

2 Answers

Look into combining git and puppet for deployment model. While git can work directly it is painful (IMHO).

The templates in puppet work extremely well for configuration files that vary by system. The templates files option works well for static deployed content.

There are at least two often used models in this case. Git can be used to deploy most of your content from a single repository and a second configuration only git repository of puppet configuration files are used for per server content.

It is also possible to keep both the content and configuration files in the same repository but it might take some workflow changes for that to work well.

EDIT:

I'm most familiar with Puppet but my understanding is that Chef and cfengine both provide similar functionality.

When using git & puppet together files one extremely useful feature is mapping git branches to individual environments. It makes it easy to transition from QA to prod, even for your config files.

share|improve this answer
add comment

I'm in a similar situation, and I'd use different branches, as it would be easier if you wouldn't need to change anything from your code in the future. But it is not my case, and probably neither yours.

I recommend you to use a script to set up your configuration, and keep on using the same branch on the repository.

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.