Enhancements to cobbler replicate in git (Running multiple cobbler servers? This is for you)
I've added some things to the "cobbler replicate" command (thanks again
to Scott Henson for coding that up). Now, in addition to syncing
metadata for distributions and profiles, it also does repos, and
optionally can do systems as well. It also has flags for being able to
rsync tree and repo data, as well as the snippets and kickstart files
that are used. Other content like the settings file, that needs to be
set up specifically for each server, is not included in "replicate".
So, why would you want this? Suppose you want to manage a cobbler
server at several sites to have them be as fast as possible. However,
you really don't want to have to make sure you send the same edits to
every server -- you really just want to edit the items at the central
server and have the remote cobbler servers clone them from that.
There are some limitations to this -- currently it will override objects
with the copy from the master when you use this... there's no "merge"
kind of functionality because we don't keep "last modified" data on each
field. Also, since we don't know if something from central is used
remotely, we don't delete things that are removed on the central
server. However, you can make this happen by just deleting the
/var/lib/cobbler/(distros|profiles|systems|repos) files on the remote
prior to running the replicate command.
-h, --help show this help message and exit
--master=MASTER Cobbler server to replicate from.
--include-systems include systems in addition to distros, profiles, and
--full-data-sync rsync everything
--sync-kickstarts rsync kickstart templates
--sync-trees rsync imported trees
--sync-triggers rsync trigger scripts
--sync-repos rsync mirrored repo data
So, for example, to replicate as much as possible, it's just:
The additional options just provide some of the things that
"--full-data-sync" provides, for intance, you might want to sync the
repos and trees, but not the triggers, so that's why there are seperate
options for those.
I'll put this up on the Wiki after getting some comments on what else
might need to be added and whether this covers the potential use cases.
Thoughts on whether this solves the needs of maintaing multiple cobbler
servers centrally? Testing is welcome of course, this is in the
development branch of git at the moment (1.1.X) and the code is
relatively simple -- action_replicate.py.
et-mgmt-tools mailing list