using git to track (gentoo) server configs ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

using git to track (gentoo) server configs ?

Stefan G. Weichinger-3

I happily use git for local repositories to track configs in /etc or for
example, /root/bin or /usr/local/bin (scripts ..)

There is also etckeeper, yes, useful as well.

But I would like to have some kind of meta-repo for all the
gentoo-servers I am responsible for ... some remote repo to pull from.

Most files in /etc might be rather identical so it would make sense to
only track the individual changes (saves space and bandwidth)

Maybe it would be possible to use git-branches for each server?
Does anyone of you already use something like that?
What would be a proper and clever way to do that?

Yes, I know, there is puppet and stuff ... but as far as I see this is
overkill for my needs.

I'd like to maintain some good and basic /etc, maybe plus
/var/lib/portage/world and /root/.alias (etc etc ..) to be able to
deploy a good and nice standardized gentoo server. Then adjust config at
the customer (network, fstab, ...) and commit this to a central repo (on
my main server at my office or so).

Yes, rsyncing that stuff also works in a way ... but ... versioning is
better.

How do you guys manage this?

Looking forward to your good ideas ;-)

Regards, Stefan

Reply | Threaded
Open this post in threaded view
|

Re: using git to track (gentoo) server configs ?

Tom Wijsman-2
On Thu, 13 Feb 2014 17:01:47 +0100
"Stefan G. Weichinger" <[hidden email]> wrote:

> I happily use git for local repositories to track configs in /etc or
> for example, /root/bin or /usr/local/bin (scripts ..)
>
> There is also etckeeper, yes, useful as well.
>
> But I would like to have some kind of meta-repo for all the
> gentoo-servers I am responsible for ... some remote repo to pull from.
>
> Most files in /etc might be rather identical so it would make sense to
> only track the individual changes (saves space and bandwidth)
>
> Maybe it would be possible to use git-branches for each server?

Yes.

> Does anyone of you already use something like that?

No idea.

> What would be a proper and clever way to do that?

Just do it.

> How do you guys manage this?

Do as you have described, make the most general thing (a master branch)
and the most specific things (customer branches); when you have that,
and you daily (or so) sync the customers with the customer branches you
can proceed with merging (git merge, not an actual join) the customer
branches with the master branch.

If you come up with a different branching model, you'll still be able
to do that; given it is completely on the server, anything between the
most general and the most specific things is entirely in your control.

--
With kind regards,

Tom Wijsman (TomWij)
Gentoo Developer

E-mail address  : [hidden email]
GPG Public Key  : 6D34E57D
GPG Fingerprint : C165 AF18 AB4C 400B C3D2  ABF0 95B2 1FCD 6D34 E57D

yac
Reply | Threaded
Open this post in threaded view
|

Re: using git to track (gentoo) server configs ?

yac
In reply to this post by Stefan G. Weichinger-3
On Thu, 13 Feb 2014 17:01:47 +0100
"Stefan G. Weichinger" <[hidden email]> wrote:

>
> I happily use git for local repositories to track configs in /etc or
> for example, /root/bin or /usr/local/bin (scripts ..)
>
> There is also etckeeper, yes, useful as well.
>
> But I would like to have some kind of meta-repo for all the
> gentoo-servers I am responsible for ... some remote repo to pull from.
>
> Most files in /etc might be rather identical so it would make sense to
> only track the individual changes (saves space and bandwidth)
>
> Maybe it would be possible to use git-branches for each server?
> Does anyone of you already use something like that?
> What would be a proper and clever way to do that?
>
> Yes, I know, there is puppet and stuff ... but as far as I see this is
> overkill for my needs.
>
> I'd like to maintain some good and basic /etc, maybe plus
> /var/lib/portage/world and /root/.alias (etc etc ..) to be able to
> deploy a good and nice standardized gentoo server. Then adjust config
> at the customer (network, fstab, ...) and commit this to a central
> repo (on my main server at my office or so).
>
> Yes, rsyncing that stuff also works in a way ... but ... versioning is
> better.
>
> How do you guys manage this?
>
> Looking forward to your good ideas ;-)
>
> Regards, Stefan
>
You are probably looking for cfengine or puppet

---
Jan Matějka        | Gentoo Developer
https://gentoo.org | Gentoo Linux
GPG: A33E F5BC A9F6 DAFD 2021  6FB6 3EBF D45B EEB6 CA8B

signature.asc (501 bytes) Download Attachment