Adding Fedora to Red Hat Satellite / Spacewalk

Anyone who has used Red Hat Satellite, or even the upsteam Spacewalk project will know just how great an asset it is in managing very large scale environments on Red Hat based Linuxes.

For someone like me who spends a large amount of time testing Red Hat’s upstream release “Fedora” it is advantageous to be able to provision and manage Fedora in the exact same way I manage Red Hat in commercial environments.

In this article I will cover extending your Red Hat Satellite solution to accommodate Fedora.

As Red Hat Satellite is such an extensive product, and Fedora is not provided by the “satellite-sync” utility, we will need to add Fedora to multiple different areas.

The areas include:

  1. Software Channels:
    Here we will sync the two major software repositories that are useful in any Fedora environment;  Fedora release, and Fedora Updates.
  2. Distribution Trees:
    Distribution trees are required if you intend to provision Fedora based systems via Cobbler and PXE network booting.
  3. Kickstart Profiles:
    Just like normal kickstart profiles for Red Hat, its always handy to have a generic kickstart profile for Fedora as well, so we will create a quick kickstart profile to compare what we will see different to Red Hat based kickstarts.

 

I will be covering this walk through on a Red Hat Satellite 5.5 based server running on Red Hat Enterprise Linux 6 and will be adding Fedora 19 using the x86_64 architecture.


1. Software Channels:

Software channels are used to provide integration with yum and are used to replace the normal everyday yum repositories.

Although I will only be showing how to sync the Fedora release and Fedora updates channels, if you are wishing to add addition repositories to your Satellite server, I’d recommend you look into RpmFusion.org as well as you will find many other useful packages there which, due to licensing, are not provided directly by Fedora.

 

Software channels can either be created with the Satellite WebUI or using the “spacecmd” utility on the command line.
Note: spacecmd can be used locally or from remote linux systems. It can be found in the official Fedora yum repos or in EPEL for RHEL.

 

To create a software channel via the  Satellite WebUI, select the channels tab and on the left, click “Manage Software Channels”.
In the top right hand corner, click “create new channel”.

Here you will be presented with quite a detailed page to cover all requirements for your new channel.

We will need to create a parent software channel for our GA release of Fedora.

Use the below details for Fedora 19 GA release. (Any fields that are not mentioned, feel free to leave blank).

Basic Channel Details:
 *Channel Name:        Fedora Linux (v. 19 for 64-bit x86_64)
 *Channel Label:       fedora-19-x86_64
 *Parent Channel:      None
 *Architecture:        x86_64
 *Channel Summary:     Fedora Linux (v. 19 for 64-bit x86_64)

See below screenshot.

Create software channel - Basic

Security: GPG
 *GPG Key URL:         https://fedoraproject.org/static/FB4B18E6.txt
 *GPG Key ID:          FB4B18E6
 *GPG Key Fingerprint: CA81 B2C8 5E4F 4D4A 1A3F 7234 0747 7E65 FB4B 18E6

See below screenshot.

Create software channel - GPG

Once you have filled in all the above details, click the “create channel” button.

Next, create a child channel for Fedora 19 Updates using the below details. Again, any fields not mentioned, feel free to leave blank.

Basic Channel Details:
 *Channel Name:        Fedora Linux (v. 19 for 64-bit x86_64) - Updates
 *Channel Label:       fedora-19-x86_64-updates
 *Parent Channel:      fedora-19-x86_64
 *Architecture:        x86_64
 *Channel Summary:     Fedora Linux (v. 19 for 64-bit x86_64) - Updates
Security: GPG
 *GPG Key URL:         https://fedoraproject.org/static/FB4B18E6.txt
 *GPG Key ID:          FB4B18E6
 *GPG Key Fingerprint: CA81 B2C8 5E4F 4D4A 1A3F 7234 0747 7E65 FB4B 18E6

Use the above screenshots if you need a refresher on any details.

When ready click the “create channel” button.

 

Now that we have the channels created, we need to sync the Fedora mirrors to our newly created channels.
We can do this from the Satellite WebUI, but chances are you are already using a cron job to regularly sync the official Red Hat channels. For simplicity lets use the command line option.

Use the following to sync the official Fedora 19 base channel.

[root@satellite ~]# spacewalk-repo-sync --channel fedora-19-x86_64 --url http://download.fedoraproject.org/pub/fedora/linux/releases/19/Everything/x86_64/os/ --type yum

Use the following to sync the Fedora 19 updates channel.

[root@satellite ~]# spacewalk-repo-sync --channel fedora-19-x86_64-updates --url http://download.fedoraproject.org/pub/fedora/linux/updates/19/x86_64/ --type yum

Note: Please be aware that these channels are substantially larger than the RHEL6 channels. At the time of writing this article, the Fedora GA release repo has 37658 packages whilst the Updates repo contains 17003.  This is substantially larger than the 10874 packages that is available in the RHEL6 base channel. Expect this initial sync to take quite a while.

 

2. Distribution Trees

If you intend on PXE network booting with Cobbler, this step is quite crucial as it  involves loading all the bootable requirements into Satellite.

You will need to obtain a DVD release / ISO image of the Fedora 19 installation media.

On your satellite server, mount your installation media. I have mounted mine to /media

Next, create a new directory specifically to be used for the Fedora 19 Distribution tree.

[root@satellite ~]# mkdir -p /var/satellite/custom-distros/ks-fedora-19-x86_64/

Now copy the content from the installation media to your newly created directory excluding all rpm files (These will be provided by the Software channels).

[root@satellite ~]# rsync -avP /media/ /var/satellite/custom-distros/ks-fedora-19-x86_64/ --exclude "*.rpm"

Once you have finished placing the files locally on your server, its time to add the Distribution Tree via the Satellite WebUI.

In the WebUI, click on the Systems tab, and on the left menu, select “kickstart”  and then “Distributions”. Finally, click “create new distribution”.

Create your new distribution tree using the below values.

Distribution Label:   ks-fedora-19-x86_64
Tree Path:            /var/satellite/custom-distros/ks-fedora-19-x86_64/
Base Channel:         Fedora 19 (v. 19 for 64 Bit x86_84)
Installer Generation: Fedora

See the below screenshot.

Kickstart DistributionWhen you’re ready, click the “Create Kickstart Distribution” button.

3. Kickstart Profiles

Lastly, we need to create a kickstart profile to make use of our new software channels and distribution tree. Create a new kickstart profile by selecting the “Systems” tab, then on the left column, select “Kickstart” and then “Profiles”. You will see the “create new kickstart profile” link in the top right corner.

Create a new kickstart profile and ensure you chose your newly created software channel and distribution tree.

See below screenshot.

Kickstart - create

I won’t walk through the entire process to create a full kickstart profile as I am sure you are already familiar with this, so I will just jump to the relevant bits.

Once you have created your new kickstart profile, jump across to the “Operating System” tab and select all the necessary channels you wish to appear inside the Anaconda installation environment.

Note: You can see in my example that I have added addition channels, including RpmFusion which I mentioned earlier.

See below screenshot.

Kickstart - software channels

Lastly, jump across to the “Software” tab. Here is where you will need to specify all software to be installed as part of the kickstart.
Don’t forget to add the rhn-setup package as that is what’s required to subscribe new systems into a Satellite Server.

Note: Be aware that the @Base package group is only available in RHEL. For all your Fedora installations, you must have the “Don’t install @Base package group” tickbox selected otherwise your kickstarts will fail.

See below screenshot.

Kickstart - software

The last thing to do is to verify that the above steps have succeeded. The best way to check would be to deploy a new system. This might be a physical system or a VM. Alternatively, you can use the below commands to verify.

To verify your new Distribution Tree, run the following. You can see that the new Fedora 19 Distribution Tree is now at the top.

[root@satellite ~]# cobbler distro list
   ks-fedora-19-x86_64:1:YOURORGANISATION
   ks-rhel-x86_64-server-6-60
   ks-rhel-x86_64-server-6-61
   ks-rhel-x86_64-server-6-61-beta
   ks-rhel-x86_64-server-6-62
   ks-rhel-x86_64-server-6-63
   ks-rhel-x86_64-server-6-64
   ks-rhel-x86_64-workstation-6-60
   ks-rhel-x86_64-workstation-6-61
   ks-rhel-x86_64-workstation-6-61-beta
   ks-rhel-x86_64-workstation-6-62
   ks-rhel-x86_64-workstation-6-63
   ks-rhel-x86_64-workstation-6-64
[root@satellite ~]#

To verify your new kickstart profile, run the following.

[root@satellite ~]# cobbler profile list
   fedora-19-x86_64-base:1:YOURORGANISATION
   rhel-6-server-base:1:YOURORGANISATION
[root@satellite ~]#

One comment on “Adding Fedora to Red Hat Satellite / Spacewalk

  1. Brent April 29, 2014 16:41

    Excellent post. I just finish syncing up my Satellite with Fedora 20. Only needed to change the names and key info (which is availalbe at https://fedoraproject.org/keys.

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>