Cobbler-externals!
by Michael DeHaan
Note: this is a rather programming-intensive and theoretical email.
However, for those that grok it, I promise it's at least conceptually
interesting. I am not sure I understand all the potential uses for it,
yet, but it opens up a way to add functionality to cobbler that
effectively rewires the core, which I think is pretty darn powerful :)
Ok, so here we go.
I ate lunch with Dan Radez today and we were talking about a way to
integrate his own custom repo management thingy (TM) with Cobbler.
We came up with an idea.
This would add a new cobbler setting, defaulted to not being enabled:
blender_filter = /usr/bin/path/to/external_blender
Those familiar with Puppet's external nodes will understand this concept
somewhat -- it's about injecting data from another program directly into
a program
using programs that work by exchanging data over stdin/stdout.
The idea is that it will be possible to mix in the evaluation of Cobbler
fields easily with the data from an external program -- whether that be
an API, LDAP,
a custom database, whatever you want.
For instance, in Dan's case, assume that he has a list of extra repos
(not defined in Cobbler) that he wants to dynamically assign to certain
profiles from an external source. (One catch, see postscript)
Every time cobbler evaluates an object with blender, cobbler, if
configured, can execute /usr/bin/path/to/external_blender.
This script passes as standard input the JSON file from cobbler as it
blended the object. The script returns JSON as it /modified/ the
object. The result is that
arbitrary manipulation of cobbler is possible from the script with
systems, without using the cobbler API, and without storing things in
Cobbler.
Another example might be (warning -- this is crazy arbitrary!) that you
want to write a kickstart metadata variable into Cobbler that writes the
current stock price of a company into /etc/motd every time kickstart is
evaluated. This script might then, in this case, tweak ks_meta to
perform that manipulation of the data.
--Michael
P.S. -- so, the catch. For Dan's theory to work with repos, it helps
if all of his repos were actually in Cobbler due to the way repogen.py
works. However in his case, he'd most likely just generate an
additional templating variable that contains the text of his repo
information, and bypass repogen.py. Effectively he would have
$yum_repo_stanza (from Cobbler) and $dan_repo_stanza. What this would
allow is for him to generate $dan_repo_stanza from an arbitrary external
program.
14 years, 8 months
Re: Cobbler-externals!
by Dave Thomas
I'm new to cobbler (hi all!) but I've been putting a lot of thought into
something along these lines. What would be great would be to use a
general-purpose mediator like Apache Synapse. That could decouple systems
from data sources and be lightweight enough to reduce the glue code you need
to write to another system.
>it's about injecting data from another program directly into
> a program
> using programs that work by exchanging data over stdin/stdout.
I've started learning what it would take to write a plugin that convert a
general purpose message to something you can exchange over stdin/stdout, but
IMO the bridge itself should be straightforward.
14 years, 8 months
[PATCH] Removed references to acls.conf from Makefile
by Leonid Flaks
I pushed this patch to my git clone at github http://github/lflaks/cobbler
--
Leon
diff --git a/Makefile b/Makefile
index fe80d32..17f8192 100644
--- a/Makefile
+++ b/Makefile
@@ -59,7 +59,6 @@ savestate:
cp /etc/cobbler/settings $(statepath)/settings
cp /etc/cobbler/modules.conf $(statepath)/modules.conf
cp /etc/httpd/conf.d/cobbler.conf $(statepath)/http.conf
- cp /etc/cobbler/acls.conf $(statepath)/acls.conf
cp /etc/cobbler/users.conf $(statepath)/users.conf
cp /etc/cobbler/users.digest $(statepath)/users.digest
cp /etc/cobbler/dhcp.template $(statepath)/dhcp.template
@@ -71,7 +70,6 @@ restorestate:
cp $(statepath)/settings /etc/cobbler/settings
cp $(statepath)/modules.conf /etc/cobbler/modules.conf
cp $(statepath)/users.conf /etc/cobbler/users.conf
- cp $(statepath)/acls.conf /etc/cobbler/acls.conf
cp $(statepath)/users.digest /etc/cobbler/users.digest
cp $(statepath)/http.conf /etc/httpd/conf.d/cobbler.conf
cp $(statepath)/dhcp.template /etc/cobbler/dhcp.template
14 years, 8 months
events and tasks logging improvements
by Vreman, Peter
I have started a branch to refactor the tasks registration and events logging. The events will now be logged in a csv file and in the future can be read and filtered per task_id, user or system.
The core of the system is implemented and the background tasks work already with the new code. The WebUI needs some modifications to present the new events structure. I hope to get that implemented soon.
The code is available from: http://github.com/pvreman/cobbler/tree/systemlog
Regards,
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 8 months
[cobbler 2.0] replication from 1.6 version
by Martial Paupe
Hi all,
I wanted to replicate my setup over cobbler 1.7 from cobbler 1.6.8 but it
seems that it doesn't work. I don't know if the figure have been done to work
between different major release.
Here is the command and the error message have got.
cobbler replicate --master=cobbler.xyz.com
task started: 2009-08-26_142043_replicate
task started (id=Replicate, time=Wed Aug 26 14:20:43 2009)
cobbler_master = cobbler.met.co.nz
profile_patterns = []
system_patterns = []
omit_data = False
using CLI defined master
XMLRPC endpoint: http://cobbler.xyz.com/cobbler_api
test ALPHA
test BETA
Querying Both Servers
Exception occured: xmlrpclib.Fault
Exception value: <Fault 1: "cobbler.cexceptions.CX:'Unknown remote method'">
Exception Info:
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 92, in run
rc = self._run(self)
File "/usr/lib/python2.4/site-packages/cobbler/remote.py", line 206, in
runner
self.logger
File "/usr/lib/python2.4/site-packages/cobbler/api.py", line 769, in
replicate
omit_data = omit_data
File "/usr/lib/python2.4/site-packages/cobbler/action_replicate.py", line
296, in run
self.replicate_data()
File "/usr/lib/python2.4/site-packages/cobbler/action_replicate.py", line
132, in replicate_data
self.remote_data[what] = self.remote.get_items(what)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1096, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1383, in __request
verbose=self.__verbose
File "/usr/lib64/python2.4/xmlrpclib.py", line 1147, in request
return self._parse_response(h.getfile(), sock)
File "/usr/lib64/python2.4/xmlrpclib.py", line 1286, in _parse_response
return u.close()
File "/usr/lib64/python2.4/xmlrpclib.py", line 744, in close
raise Fault(**self._stack[0])
!!! TASK FAILED !!!
here is the log from cobblerd.log version 1.6.8
2009-08-26 02:05:36,067 - api - remote:unknown method get_items
If I've done some thing wrong I will be please to know my mistake and if it's
a bug, I'm keen to fill up the form.
babatoko
14 years, 8 months
2.0 feature frozen, time table on getting things out the door
by Michael DeHaan
In case it wasn't already apparent, I'm trying to get 2.0 out the door.
All new features submitted now will be merged in on a future branch once
that is created (feel free to go ahead and submit things)
I know of a couple things in progress that we'll accept upgrades on:
** rsync config generation (shenson) for use with cobbler replicate
** webui CSS tweaks for Peter's recent additions (imeyer?)
We'll take those into 2.0. If we can get the code in for those this
week that would be helpful.
Everyone that is doing 2.0 testing, please continue, and I plan to get
this release together -- due to Red Hat Summit coming up -- during the
week of
September 7th (hopefully early that week). We'll submit to the build
system then.
Someone pointed out that in a common specfile our build system doesn't
like noarch and arch packages, in which case this will make cobbler
noarch again.
In which case, also be sure to test "cobbler get-loaders" and see that
cobbler check reports on missing loaders properly.
I'm not entirely sure if EPEL is using the new update system yet, so at
that time I may just submit to fedora testing for the first week or so,
before dropping
it into EPEL-testing (need to research this) and Fedora-stable.
Thanks to everyone that works on, helped test, or otherwise contributed
to this release... and especially thanks in advance to everyone
testing 2.0 this week and next!
--Michael
14 years, 8 months
[PATCH] WebUI List netboot fix and sorting
by Vreman, Peter
Please find attached 2 patches for the following features:
- Fix the showing of Netboot enabled and make it a checkbox. Read-only currently, might be changed in the future to attach an action
- Enable the sorting of the tables
- Show arrows on which column is sorted
Currently headers of the tables don't show nice with the colors of the links. My CSS knowledge is too little to fix this.
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 8 months
[PATCH] cobbler web actions fixes
by Vreman, Peter
- In the Web UI the system actions don't work. The ";" in the href generates urls like " /cobbler_web/system/;" that is invalid. Changed this to be always /cobbler_web/{{ what }}/list
- Remove the invalid system actions from the repo actions
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 8 months
Cobbler 2.0 webui changes
by Ian Meyer
All,
I committed the last of the webui overhaul changes a few minutes ago.
* Background actions are denoted with a ☼ sign after them (there were
mixed placements of the ☼)
* System and Repo names are now links which direct you to the
respective edit page. This reflects how the distro/profile pages work.
You can clone git://github.com/imeyer/cobbler.git and make webtest to
try it out.
- Ian
--
This was not sent from my iPhone
14 years, 8 months
Web UI item actions View Kickstart
by Vreman, Peter
A minor cosmetic issue. Is it possible to add a box around the actions per item. The current list for systems is "Edit Copy Rename Delete View Kickstart". But the "View Kickstart" is a single action. In the presentation it looks like 2 independent actions.
Peter
This e-mail and any attachment is for authorised use by the intended recipient(s) only. It may contain proprietary material, confidential information and/or be subject to legal privilege. It should not be copied, disclosed to, retained or used by, any other party. If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender. Thank you.
14 years, 8 months