Msquared wrote:
Thanks for the patch, that fixed cobbler for me, which allowed me to retry
some of the things that had failed for me before.
Good deal, I will include it in the next release after I look over the
files you sent me (thanks!).
On Thu, Feb 22, 2007 at 10:57:03AM -0500, Michael DeHaan wrote:
If I use 'cobbler import' or 'cobbler distro add', do I put the files
somewhere in /var/www/cobbler first?
Cobbler will do this for you.
I think I'm confused about what belongs where.
I thought the import command would import the contents of the repository
(in this case, my CD) into somewhere that cobbler managed. It didn't seem
to do that, so I put the files somewhere that I thought should be
accessible to the machine being provisioned (ie: inside Cobbler's web
space).
The first thing I noticed was that cobbler import would not work when I
gave it the mounted DVD: cobbler wanted the area to be writeable.
So if I put the contents of my Fedora 6 DVD into /opt/dist/fc6 and then run
cobbler import --path=/opt/dist/fc6
cobbler sync
Do I have to leave my Fedora 6 files in /opt/dist/fc6?
Ah, you're trying to do DVD imports. Well, it depends on what you
want to do. Probably you're going to want to use the entire kickstart
tree from that DVD, so that's as good as a place to leave them as any.
What I normally do in this situation is add a symlink, like
/var/www/cobbler/local_mirror/fc6tree -> /opt/dist/fc6
And then, you can use the following parameter in your kickstart files
for the "--url"
url --url http://servername/cobbler_track/local_mirror/fc6tree/restofpath
Note that you want to include the full path to the "os" or "tree"
directory, and don't want to stop at the root. That's what I mean by
"restofpath".
If you are passing in an rsync mirror to "cobbler import", cobbler
_does_ copy files for the rest of the tree (not just the kernel/initrd),
and this is actually a pretty powerful way to start off.
But I already have a copy of the files on a DVD, and so I just want to
have cobbler import that instead. Firstly, I don't even know what rsync
URL I should provide, and secondly I'm sure it would be faster from the
DVD than across my internet connection. :-)
You're right, it's not faster :) It just puts files in the right
place, and allows them to update if they ever change remotely.
The DVD case can still work just fine.
I think you've given an excellent reason to add "how to import a
kickstart tree from a DVD" to the manpage.
However, if you already have the operating system tree locally, that's
not as important.
I still want cobbler to copy the contents of the DVD into somewhere that
it manages, though. I managed to do it like so:
cobbler import --mirror=root@localhost:/media/cdrom --mirror-name=testimport
Actually that will work. Creative workaround! :)
This will file the results of the import in /var/www/cobbler/ks_mirror
and is a really smart way to go about it.
However, will this cause me grief in future? What happens when I 'cobbler
sync'? Will it try to re-mirror based on whatever is in /media/cdrom?
Can I stop it from doing that?
Cobbler sync won't try to re-mirror that, because cobbler knows
kickstart trees really don't change. Sync will build
out a lot of other interestingness in /var/lib/cobbler and /tftpboot,
but it will leave the contents of /var/lib/cobbler/ks_mirror
untouched.
Also, should I make the mirror-name something that is related to where I'm
getting the files from (eg: fc6dvd or fc6public), related to what the
files are for (eg: fc6), or related to my provisioning server (eg:
localprovserver; ie: the machine I am running cobbler on)?
The mirror name is basically just to pick something you can remember
later.
Of course, my next question would be how do I update my local copy of the
DVD from updates provided to the distribution(s). Can I change the URL it
uses from root@localhost:/media/cdrom to one of the official Fedora 6
mirrors?
Nah, not quite.
Look at the manpage for "cobbler repo add" for adding a repository.
You'll add the updates repository this way
and then reference them in the profile.
Since you've actually imported the profile, you're going to need to go
into /var/lib/cobbler/profiles to list the repos you use.
This isn't really as scary as it sounds, but if you're concerned, you
can back up the profiles file first.
Ah, distro and profile names. :)
When I ran my cobbler import with the ssh mirror, I ended up with a distro
and a profile named thus:
var_www_cobbler_ks_mirror_testimport_cdrom_images_xen
Is there a way of making this shorter, or more meaningful (without editing
config files)?
Import uses the paths because they are safely namespaced. I probably
should consider making them auto-shorten themselves in a future
release. In the meantime, it's pretty safe to edit
/var/lib/cobbler/profiles and change the "name:" fields. You can do
the same for the distros if you like, just make sure the "distro" fields
in the profile match the distro names. Really though, you could just
edit the profiles and leave it at that.
Also, if I use 'cobbler distro add', how does it know where to get the
rest of the files from? (ie: how does it know where the repository is?)
I've tried to import from the DVD with these, but none of them work:
cobbler import --mirror=root@localhost
I thought you said you just got that working earlier? Anyhow, import
also requires a "--mirror-name".
Distro add is a way to manually add distros without using the "import"
shortcut, and requires full paths to the kernel and initrd files.
The walkthrough at
http://wiki.xdroop.com/space/RedHat/kickstart/Cobbler doesn't seem to
help me, as it doesn't tell me what I need to put where.
First off, I do have to thank Dave a lot for making Cobbler posts on his
site.
It's definitely a step in the right direction. It encouraged me to take
the plunge and experiment anyway. However, I would like to see a lot more
higher-level documentation, plus documentation of the level Dave provided,
but with more explanations about what values you should use, or at least
sensible suggestions.
+1. The easiest way for this to happen is for you to write up
something, put it up on the web, and I can link it from
the Cobbler webpage. All of that material can be potentially merged to
generate a bit of a user manual later, and that's an excellent idea.
As with the DVD import, folks using cobbler often think of things I
don't think of, and it's great to see what the things they want to do
with provisioning are.
I'm willing to help write that documentation, if that helps. I think
tools like cobbler/koan could make a huge difference in the uptake of Xen,
and while Xen works wonderfully when running, I've found that setting it
up is the hardest part.
Great!
I can't seem to get 'cobbler distro add' to work either, not that I'm
entirely sure what it does. Where does it get the repository files
from? Do I need to do some preparation of the files from the DVD, or
download a mirror first?
Cobbler has a tiered concepts of Distributions, Profiles, and Systems.
Distributions contain kernel and initrd information. Profiles take
Distributions and add kickstarts to them. Systems contain Profile
information and potentially some system specific information. Whenever
you run these commands, it updates the cobbler "database" in
/var/lib/cobbler/* -- and will copy files needed around to locations in
/tftpboot and /var/www/cobbler. So these commands are doing something :)
Ah, I guess I assumed that the cobbler 'database' included the actual
repositories of files, too. Although most of the documentation discusses
Distributions, Profiles, and Systems (as you mention above), the output of
'cobbler list' includes 'Repos'. I guess this is one part that I'm not
sure how it all works together. I'll go and review the updated
documentation you listed.
Yeah, repos are a relatively new concept, and are used for attaching
things like "fc6updatesi386" to a profile, so that they can
automatically install and configure a yum mirror when they provision it,
as well as using a yum mirror at install time to install packages. For
instance, an ISV software repository or a college with special software
in a yum repository that was not included in Fedora Extras.
If you want to download from a mirror, the best way to do that is to
skip "distro add" altogether and just do:
cobbler import --mirror=rsync://blah --mirror-name=blah
as mentioned in the manpage.
I couldn't just mirror 3-4G without explaining it to someone. :-) Since
I had the files on CD, I've been trying to work out how to use them
instead.
Yeah, usage of the ssh parameters from the DVD will make a mirrored copy
of what's on the CD, but that's better than leaving it mounted. Good
work there.
I should have explicitly asked "how to I get cobbler to mirror from my
CD", so that you could have answered with an SSH URL example, rather than
trying to convince me to use an RSYNC URL, which I didn't want to have to
set up. :-)
Yeah. Given that the way to make rsync work locally seems to work, I'll
include a section on that in the documentation. I like that a lot.
On Thu, Feb 22, 2007 at 12:39:42PM -0500, Michael DeHaan wrote:
Let me retract that. That means import worked, though the directory you
copied files to will likely be destroyed by cobbler, since that's a
directory cobbler uses for it's own purposes. If you had importanted
into another directory, like, say, /opt/kickstarts, you'd be a lot
better off. Again, the rsync:// import works very well and is a good way
to go.
Thanks for the tip. I've stopped poking around in /var/www/cobbler. :-)
Regards, Msquared...
_______________________________________________
et-mgmt-tools mailing list
et-mgmt-tools@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/et-mgmt-tools