Hi folks,
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.
The syntax is:
[root@mdehaan cobbler]# cobbler replicate --help
Usage: cobbler replicate [ARGS]
Options:
-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
repos
--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:
cobbler replicate --master=centralserver.example.org
--include-systems --full-data-sync
If you don't want to pull down the system records (I imagine this is
usually true, as they are site specific)
cobbler replicate --master=centralserver.example.org --full-data-sync
If you are replicating via some other means (Net App mirroring, etc),
you can run your own update scrips first, and then do the following
to get the same features as before:
cobbler replicate --master=centralserver.example.org
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.
Thanks!
--Michael
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools