[Et-mgmt-commits-list] [SCM] cobbler branch, master now at v0.4.5-24-g1318f30

Michael DeHaan mdehaan at redhat.com
Thu Apr 5 19:33:24 UTC 2007


Hello,

This is an automated email from the git hooks/update script, it was
generated because a ref change was pushed to the repository.

Updating branch, master,
       via  1318f30542d8d5828577e0b5b5645457e2743d65 (commit)
      from  8962f0761a0a0962afd1efdcb4928de29e658ebf (commit)

- Log -----------------------------------------------------------------
commit 1318f30542d8d5828577e0b5b5645457e2743d65
Author: Michael DeHaan <mdehaan at mdehaan.rdu.redhat.com>
Date:   Thu Apr 5 15:34:11 2007 -0400

    Doc cleanup.
-----------------------------------------------------------------------

Diffstat:
 CHANGELOG              |    2 +
 TODO                   |    1 +
 cobbler.spec           |    1 +
 cobbler/action_sync.py |   19 ++++++++-------
 cobbler/settings.py    |   43 +++++++++++++++++----------------
 docs/cobbler.pod       |   61 ++++++++++++++++++++++++-----------------------
 6 files changed, 67 insertions(+), 60 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index a3f57f3..7b2e2c0 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -7,6 +7,8 @@ Cobbler CHANGELOG
 - Fix traceback in cobbler_sync with older configurations (pre-kickstart tracking)
 - Make cobbler import feature better understand older RHEL and in-between builds of Fedora.
 - Make cobbler repo add/reposync understand http://, ftp://, and some limited support for RHN.
+- Add settings parameter to toggle core repo mirror behavior on/off.
+- Manpage cleanup.
 
 * Fri Mar 23 2007 - 0.4.5
 - Removed legacy --virt-name parameter, requires koan upgrade to 0.2.8
diff --git a/TODO b/TODO
index 7fafb16..b5ee69f 100644
--- a/TODO
+++ b/TODO
@@ -3,6 +3,7 @@ now with 1-5 priority ratings
 
 always:
 2  -  better documentation (particularly online articles)
+5  -  switch to asciidoc?
 
 core:
 5 -  "check" should check if services (esp httpd) are started
diff --git a/cobbler.spec b/cobbler.spec
index 70bef35..6a095b0 100644
--- a/cobbler.spec
+++ b/cobbler.spec
@@ -113,6 +113,7 @@ test "x$RPM_BUILD_ROOT" != "x" && rm -rf $RPM_BUILD_ROOT
 %changelog
 * Mon Apr 23 2007 Michael DeHaan <mdehaan at redhat.com> - 0.4.6-0
 - Upstream changes (see CHANGELOG)
+- Packaged 'config' directory under ks_mirror
 
 * Fri Mar 23 2007 Michael DeHaan <mdehaan at redhat.com> - 0.4.5-3
 - Upstream changes (see CHANGELOG)
diff --git a/cobbler/action_sync.py b/cobbler/action_sync.py
index 4203da8..55c558f 100644
--- a/cobbler/action_sync.py
+++ b/cobbler/action_sync.py
@@ -415,15 +415,16 @@ class BootSync:
 
         # now install the core repos
         distro = self.distros.find(profile.distro)
-        for r in distro.source_repos:
-             short = r[0].split("/")[-1]
-             buf = buf + "wget %s --output-document=/etc/yum.repos.d/%s\n" % (r[0], short)
-
-        # if there were any core repos, install the voodoo to disable the OS public core
-        # location -- FIXME: should probably run sed on the files, rather than rename them.
-        if len(distro.source_repos) > 0:
-             for x in ["fedora-core", "Centos-Base", "rhel-core"] :
-                  buf = buf + "mv /etc/yum.repos.d/%s.repo /etc/yum.repos.d/disabled-%s\n" % (x,x)
+        if self.settings.yum_core_mirror_from_server:
+            for r in distro.source_repos:
+                short = r[0].split("/")[-1]
+                buf = buf + "wget %s --output-document=/etc/yum.repos.d/%s\n" % (r[0], short)
+
+            # if there were any core repos, install the voodoo to disable the OS public core
+            # location -- FIXME: should probably run sed on the files, rather than rename them.
+            if len(distro.source_repos) > 0:
+                for x in ["fedora-core", "Centos-Base"] :
+                    buf = buf + "test -e /etc/yum.repos.d/%s.repo && mv /etc/yum.repos.d/%s.repo /etc/yum.repos.d/disabled-%s\n" % (x,x,x)
 
         return buf
 
diff --git a/cobbler/settings.py b/cobbler/settings.py
index 9a215c4..4af8f65 100644
--- a/cobbler/settings.py
+++ b/cobbler/settings.py
@@ -18,29 +18,30 @@ import utils
 TESTMODE = False
 
 DEFAULTS = {
-    "httpd_bin"         : "/usr/sbin/httpd",
-    "dhcpd_conf"        : "/etc/dhcpd.conf",
-    "tftpd_bin"         : "/usr/sbin/in.tftpd",
-    "server"            : "127.0.0.1",
-    "next_server"       : "127.0.0.1",
-    "dhcpd_bin"         : "/usr/sbin/dhcpd",
-    "kernel_options"    : {
-        "lang"          : " ",
-        "text"          : None,
-        "ksdevice"      : "eth0",
+    "httpd_bin"          : "/usr/sbin/httpd",
+    "dhcpd_conf"         : "/etc/dhcpd.conf",
+    "tftpd_bin"          : "/usr/sbin/in.tftpd",
+    "server"             : "127.0.0.1",
+    "next_server"        : "127.0.0.1",
+    "dhcpd_bin"          : "/usr/sbin/dhcpd",
+    "kernel_options"     : {
+        "lang"           : " ",
+        "text"           : None,
+        "ksdevice"       : "eth0",
     },
-    "tftpd_conf"        : "/etc/xinetd.d/tftp",
-    "tftpboot"          : "/tftpboot",
-    "webdir"            : "/var/www/cobbler",
-    "default_kickstart" : "/etc/cobbler/default.ks",
-    "manage_dhcp"       : 0,
-    "koan_path"         : "",
-    "bootloaders"       : {
-        "standard"      : "/usr/lib/syslinux/pxelinux.0",
-        "ia64"          : "/var/lib/cobbler/elilo-3.6-ia64.efi"
+    "tftpd_conf"         : "/etc/xinetd.d/tftp",
+    "tftpboot"           : "/tftpboot",
+    "webdir"             : "/var/www/cobbler",
+    "default_kickstart"  : "/etc/cobbler/default.ks",
+    "manage_dhcp"        : 0,
+    "koan_path"          : "",
+    "bootloaders"        : {
+        "standard"       : "/usr/lib/syslinux/pxelinux.0",
+        "ia64"           : "/var/lib/cobbler/elilo-3.6-ia64.efi"
     },
-    "syslog_port"       : 25150,
-    "minimize_syncs"    : 1
+    "syslog_port"                 : 25150,
+    "minimize_syncs"              : 1,
+    "yum_core_mirror_from_server" : 1
 }
 
 
diff --git a/docs/cobbler.pod b/docs/cobbler.pod
index 6b2d63f..5bc8021 100644
--- a/docs/cobbler.pod
+++ b/docs/cobbler.pod
@@ -94,7 +94,7 @@ See the section below on templating.
 
 Defaults to "redhat", which is a suitable value for Fedora and Centos as well.  Specifying "suse" allows the kickstart file parameters to be treated instead like AutoYaST answer files, such that the proper parameters for SuSE answer files
 are put on the kernel command line.  Support for other types of distributions is possible in the future.  The file used for the answer file, regardless of
-distro breed, is the value used for --kickstart when creating the profile.  See the profile add commands for further information.
+distro breed, is the value used for --kickstart when creating the profile.  See the profile add commands for further information.  This feature is still rather experimental.
 
 =back
 
@@ -104,10 +104,10 @@ A profile associates a distribution to additional specialized options, such as a
 
 B<cobbler profile add --name=string --distro=string [--kickstart=url] [--kopts=string] [--ksmeta=string] [--virt-file-size=gigabytes] [--virt-ram=megabytes]>
 
-=over
-
 Arguments are as listed for distributions, except for the "arch" parameter, and with the additions listed below:
 
+=over
+
 =item name
 
 a descriptive name.  This could be something like "rhel4webservers" or "fc6desktops".
@@ -118,12 +118,10 @@ the name of a previously defined cobbler distribution
 
 =item kickstart
 
-(optional) an HTTP URL, NFS URL, or local filesystem path to a kickstart file.  Filesystem paths are needed to take advantage of cobbler's kickstart templating features and are therefore recommended.  Kickstart templating is covered in a later section.  
+Local filesystem path to a kickstart file.  
 
 If this parameter is not provided, the kickstart file will default to /etc/cobbler/default.ks (or whatever is set in /var/lib/cobbler/settings).  This file is initially blank, meaning default kickstarts are not automated.  Admins can change the default.ks or can leave it blank.
 
-Note:  For other breeds of distros (see --breed argument to "distro add") that do not use "kickstarts", the kickstart in this case is just the distro specific answer file (such as an AutoYAST file).  koan doesn't work for those other distros (like SuSE), but cobbler should be perfectly usable as a stand-alone solution for automated multi-distro-breed PXE control.
-
 =item virt-file-size
 
 (optional) (Virt-only) how large the disk image should be in gigabytes.  The default is "5".
@@ -134,7 +132,7 @@ Note:  For other breeds of distros (see --breed argument to "distro add") that d
 
 =item repos
 
-(optional) a space delimited list of all the repos (created with "cobbler repo add" and "cobbler repo sync") that this profile
+(optional) a space delimited list of all the repos (created with "cobbler repo add" and "cobbler reposync") that this profile
 can make use of during kickstart installation.  For example, an example might be --repos="fc6i386updates fc6i386extras".
 
 =back
@@ -145,11 +143,11 @@ Systems assign a piece of hardware with the cobbler profile to be assigned to it
 
 B<cobbler system add --name=ip|mac|hostname --profile=string [--kopts=string] [--pxe-address=string] [--ksmeta=string]>
 
-=over
-
 Adds a cobbler System to the configuration.  Arguments are specified as per "profile add" with
 the following changes:
 
+=over
+
 =item name
 
 The system name must be either a currently-resolvable hostname, an IP address, or a MAC address.
@@ -191,7 +189,7 @@ B<cobbler repo add --mirror=url --name=string [--local-filename=string]>
 =item mirror
 
 The addresss of the yum mirror.  This can be an rsync:// URL, an ssh location, or
-a http:// or ftp:// mirror location.
+a http:// or ftp:// mirror location.  
 
 The mirror address should specify an exact repository to mirror -- just one architecture
 and just one distribution.  If you have a seperate repo to mirror for a different arch, add that
@@ -203,10 +201,9 @@ rsync://yourmirror.example.com/fedora-linux-core/updates/6/i386 (for rsync proto
 http://mirrors.kernel.org/fedora/extras/6/i386/ (for http://)
 user at yourmirror.example.com/fedora-linux-core/updates/6/i386  (for SSH)
 
-To put it more simply, if the content you are mirroring doesn't contain rpm's
-at the top level of the URL, this is bad, and you need to specify a different value.  Using the
-wrong mirror value here will rsync over too much data, and also the provisioning integration code
-simply won't work.  Be specific.
+Experimental support is also provided for mirroring (RHEL5) and later RHN content when you need
+a fast local mirror.  The mirror syntax for this is --mirror=rhn://channel-name and you must
+have entitlements for this to work.
 
 =item name
 
@@ -283,8 +280,6 @@ a fully automated install process for that distribution.
 
 You can use a network rsync mirror or a mounted DVD location.
 
-=over
-
 B<cobbler check>
 
 B<cobbler import --mirror=rsync://yourfavoritemirror.com/foo --mirror-name=anyname>
@@ -303,16 +298,12 @@ B<cobbler system add --name=AA:BB:CC:DD:EE:FF --profile=name_of_a_profile2>
 
 B<cobbler sync>
 
-=back
-
 =head2 NORMAL WORKFLOW
 
 The following example uses a local kernel and initrd file (already downloaded), and 
 shows how profiles would be created using two different kickstarts -- one for a web server
 configuration and one for a database server.  Then, a machine is assigned to each profile.
 
-=over
-
 B<cobbler check>
 
 B<cobbler distro add --name=rhel4u3 --kernel=/dir1/vmlinuz --initrd=/dir1/initrd.img>
@@ -346,16 +337,10 @@ B<cobbler reposync>
 
 B<cobbler profile add --name=p1 --distro=existing_distro_name --kickstart=/etc/cobbler/kickstart_fc6.ks --repos="fc6i386updates fc6i386extras">
 
-=over
-
-=back
-
 =head2 XEN
 
 For Virt, be sure the distro uses a Virt kernel and initrd and follow similar steps as above, adding additional parameters as desired:
 
-=over
-
 B<cobbler distro add --name=fc5virt --kernel=/dir3/vmlinuz --initrd=/dir6/initrd.img>
 
 Specify reasonable values for the Virt image size (in GB) and RAM requirements:
@@ -366,8 +351,6 @@ And define systems (if desired) using MAC addresses, not IP's or hostnames:
 
 B<cobbler system add --name=AA:BB:CC:DD:EE:FE --profile=virtwebservers>
 
-=back
-
 =head1 ADVANCED TOPICS
 
 =head2 PXE MENUS
@@ -444,6 +427,9 @@ the remote machine.   The default behavior is machine (not virtual) re-provision
 
 Example:  B<cobbler enchant --virt=yes --address=192.168.10.10 --profile=fc6xen>
 
+Before using enchant, configure the location of the koan noarch RPM in /var/lib/cobbler/settings (a local path) and re-run "cobbler sync".
+
+
 =head2 IMPORTING TREES
 
 Cobbler can auto-add distributions and profiles from remote sources, whether this is an NFS path or an rsync mirror.  This can save a lot of time when setting up a new provisioning environment.  
@@ -513,6 +499,12 @@ use "cobbler reposync" to update cobbler mirrors, as reposync does not perform a
 cobbler adds support for rsync and SSH locations, where as yum's reposync only supports what yum supports
 (http/ftp).
 
+Note that if a cobbler import provides enough information to use the boot server as a yum mirror for
+core packages, cobbler will set up kickstarts to use the cobbler server as a mirror instead of the 
+outside world.  If this feature is undesirable, it can be turned off by setting yum_core_mirror_from_server
+to 0 in /var/lib/cobbler/settings (and rerunning "cobbler sync").  You may want to disable this feature
+if machines are provisioned on a different VLAN/network than production.
+
 =head2 KICKSTART TRACKING
 
 Cobbler knows how to keep track of the status of kickstarting machines.   
@@ -523,11 +515,16 @@ Using the status command will show when cobbler thinks a machine started kicksta
 This is a good way to track machines that may have gone interactive during kickstarts.  Cobbler will also make a special
 request in the post section of the kickstart to signal when a machine is finished kickstarting.
 
-To use this feature, the kickstart tree files need to be served via a http://server/cobbler_track/... URL, which happens
+To use this feature, the kickstart tree files need to be served via a http://server/cblr/... URL, which happens
 automatically when using the "cobbler import" command to pull in a kickstart tree from an rsync mirror.
 
 If kickstart trees are somewhere else, one can still benefit from the kickstart tracking feature by adding a symlink to 
-/var/www/cobbler/localmirror/distroname will allow the kickstarts to be served through the tracking URL mentioned above.   Be sure to use the http://server/cobbler_track/ URL to point to the kickstart tree for each distro you want to track.
+/var/www/cobbler/localmirror/distroname will allow the kickstarts to be served through the tracking URL mentioned above.   Be sure to use the http://server/cblr/ URL to point to the kickstart tree for each distro you want to track.
+
+Note that kickstart tracking support using syslog requires an Anaconda that supports syslog forwarding.
+RHEL5 is good, as is FC6 and later.  URL tracking currently requires python2.3 or higher on the server
+for the mod_python piece to work.  This will likely be improved later to better support older distros acting
+as a cobbler server.
 
 =head2 TWEAKING
 
@@ -545,6 +542,10 @@ Cobbler also makes itself available as a Python API for use by higher level mana
 
 cobbler's command line returns a zero for success and non-zero for failure.
 
+=head1 MAILING LIST
+
+Cobbler has a mailing list for user and development-related questions/comments at et-mgmt-tools at redhat.com.
+
 =head1 AUTHOR
 
 Michael DeHaan <mdehaan at redhat.com>

hooks/update
---
Git Source Code Management System
hooks/update refs/heads/master \
  8962f0761a0a0962afd1efdcb4928de29e658ebf \
  1318f30542d8d5828577e0b5b5645457e2743d65




More information about the Et-mgmt-commits-list mailing list