SUSE Manager/Cobbler

From MicroFocusInternationalWiki
Jump to: navigation, search

SUSE Manager Main Page

Integration basics

Cobbler has an XMLRPC interface that SUSE Manager uses to edit distros, profiles and systems to reflect respectively Autoinstallable distributions/Kickstart trees, AutoYAST/Kickstart profiles and SUSE Manager systems. As long as those Cobbler objects have been created by SUSE Manager, they exists in both systems and are supposed to stay coherent (the cobbler-sync-default schedule reconciles any difference over time). If users create their own distros/profiles/systems/images in Cobbler, SUSE Manager will either ignore them or pick them up but show them as immutable.

The cobbler sync command

Cobbler stores most of its data (about distros, profiles, systems, images, etc.) internally in JSON format, which is perfectly OK to save and retrieve information but it is not a format that actually enables PXE booting. PXE booting, in fact, requires a certain tftpboot directory to be populated with special files which contain information from the JSON database plus other files gathered from the filesystem.

cobbler sync basically tells Cobbler to recompile the tftpboot directory from scratch reading contents from the JSON database. This is normally not needed because both Cobbler's JSON database, Cobbler's tftpboot directory and SUSE Manager's database are all supposed to stay in sync, but it can be useful for troubleshooting or in case of manual changes to Cobbler's configuration. cobbler sync can be used either from the commandline or through Admin -> SUSE Manager Configuration -> Cobbler in SUSE Manager. See also the official documentation for cobbler sync.

The spacewalk clear_caches command

All spacewalk/spacecmd commands use caches to be faster. Those caches comprise a list of current systems, current errata and current packages - they will all expire and be re-requested to SUSE Manager server after a certain amount of time (24 hours maximum). Thus, if any of those entities are added/removed/changed on the SUSE Manager server in the last 24 hours you are advised to run clear_caches before any other spacewalk/spacecmd command to ensure those caches are rebuilt.


How to create Cobbler profiles (corresponding to AutoYAST/Kickstart profiles in SUSE Manager)

There are various ways, each with its pros and cons.

Creating from scratch in WebUI

Use Autoinstallation -> Profiles -> Create new kickstart profile.

Notes:

  • in order to use this functionality you must have a properly setup a SUSE Manager Autoinstallable distribution, which corresponds to a Kickstartable tree and to a Cobbler distro object;
  • in order to setup a SUSE Manager Autoinstallable distribution, you need to have an autoinstallable channel. A channel is autoinstallable iff it

is a base channel and it is available to the current Org for the specified arch;

  • this will create a Cobbler profile with an "augmented name" such as ChannelName:OrgId:OrgName;
  • this will only work for Kickstart (Red Hat), not AutoYAST (SUSE).

"Augmented" Cobbler names are necessary to later sync to SUSE Manager, otherwise SUSE Manager would not be able to track those objects. So SUSE Manager will display short names in the WebUI and tools (spacecmd), while longer "augmented" names are to be expected in "lower-level" Cobbler and related tools.

Using spacecmd

Use a command like:

   kickstart_create -n sles11sp3-base-x86_64 -d sles11sp3-x86_64 -p suse123 -v none

Notes:

  • this command assumes you already have a Cobbler distribution (or, better, a SUSE Manager Atoinstallation tree) named sles11sp3-x86_64;
  • once created, the profile will be equivalent to one created by the WebUI and it will act in the same way.

Using the WebUI is recommended over spacecmd because the latter will just assume that the Cobbler distribution is there, and will not check that it corresponds to an Autoinstallation tree.

Uploading an existing Kickstart/AutoYAST file in WebUI

Use Autoinstallation -> Profiles -> Upload new Kickstart/AutoYAST file.

Notes:

  • this is supported and fully functional, but edits are currently limited to the raw XML file.

Using Cobbler directly

Use a command like:

   cobbler profile add --name 'testing-sles11sp3-x86_64-generic' --distro sles11sp3-x86_64:1:DemoOrg

Notes:

  • such objects created directly in Cobbler are not, by default, managed by SUSE Manager, so they will not be listed in spacecmd and shown as read-only (red icon) in the WebUI;

Summarizing the above: SUSE Manager manages its own Cobbler objects with special augmented names; other manually created objects are either ignored or, when possible, showed as read-only.