From: Jon Seymour <jon.seymour@gmail.com>
To: Git Mailing List <git@vger.kernel.org>
Subject: Re: Handling non-git config files
Date: Thu, 25 Feb 2010 08:37:53 +1100 [thread overview]
Message-ID: <2cfc40321002241337q6b437803m82d05fb272cca6b2@mail.gmail.com> (raw)
In-Reply-To: <8440EA2C12E50645A68C4AA9887166513FC19C@SERVER.webdezign.local>
[ Richard sent his own copy ]
I have used git in a deployment scenario and found it to be very useful.
The way I dealt with this problem was to treat the variants as a build
problem. During the build, I create a version of the deployment
artifacts that reflect a generic, uncustomized server. This gets
checked into a branch. To build the an environment specific variant, I
checkout the build result for the uncustomized server on a new branch,
customize it and commit that to the tip of the environment specfic
branch. The process continues down the hierarchy, so I take the
environment specific variant, customize it for particular servers and
commit that to a new branch. Each branch is represented in git as a
merge of the current build with the results of the previous build for
the previous for the same branch. [ Thereby allowing FF merges during
deployment ]
The end result is that I have a git repo with one branch for the
abstract server, one for each environment (all uncustomized or
partially customized) and one full customized branch for each physical
server. The whole repo can then be pushed to all environments (but not
checkout there). Deployment is then simply a question of pulling (or
checking out) the right tag of the right branch on each server at the
right time (e.g. after testing, during change windows etc).
Pulling has the advantage of preserving adhoc configuration changes in
deployed environments that have not been folded back into the build
process, though at some risk of merge conflicts &/or inconsistency. My
approach in the case of merge conflicts was to report the problem,
save the current state (in the git history) and resolve in favour of
the build product. Alternative strategies might be to abort the
deployment until the conflict is resolved, etc.
(I also used a separate aggregation technique to aggregate several
distinct repo into a single hub repo so that as to minimise the number
of git operations required to sync two nodes in the deployment
topology.)
Using git in this way was great - deployment of an incremental release
was super quick because the repos could be pre-deployed and transfers
typically only included files that had changed for the release - gone
are the big tar balls being transferred that contain mostly unchanged
stuff.
next prev parent reply other threads:[~2010-02-24 21:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-23 22:37 Handling non-git config files Richard Lee
2010-02-24 1:46 ` Tim Mazid
2010-02-24 18:27 ` Ian Hobson
2010-02-24 21:37 ` Jon Seymour [this message]
2010-03-09 10:50 ` rhlee
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2cfc40321002241337q6b437803m82d05fb272cca6b2@mail.gmail.com \
--to=jon.seymour@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).