Software & Configuration: Setting Up Spacewalk Channels
RedHat Satellite, and by extension Spacewalk, uses a system of channels to organize the software and configuration available to registered systems. In fact, those are the two main types of channel: software and configuration. Software channels contain a collection of repositories and packages that are made available to systems in that channel. Configuration channels contain a number of centrally-managed configuration files that can be deployed to systems registered in that channel.
In this guide, we'll look at basic setup of each type.
Creating Software Channels
Create a Base Channel
Sign in to the Spacewalk web portal. Then, navigate to Channels > Manage Software Channels > Create Channel. Fill in the channel name and label (these are usually the same) and the summary. Then, click Create Channel.
We're going to start off by creating a base channel for CentOS7 machines.
Add the Repositories
Next, we'll add the CentOS7 base repositories to our channel. Navigate to Manage Repositories > Create Repository. Fill in the repository label, repository URL, and select the repository type. For example, for the CentOS7
In this example, I repeated this process to add the CentOS7
Assign Repositories to the Channel
We need to tell the base channel we created to use the repositories we just added. To do this, navigate to Channels > Manage Software Channels > channel name > Repositories. Here, select the repositories we just added and click Update Repositories.
Create a Child Channel
We're also going to create a child channel. This channel will fall under the base CentOS7 channel we created, but it will provide additional repositories and software. As an example, we're going to create a channel that provides the MariaDB repositories for EL7. To do this, basically repeat the same process.
Add the Repository
In our example, we used the following:
Repository name: el7-mariadb
Repository URL: http://yum.mariadb.org/10.3/centos7-amd64/
Repository type: yum
Assign the Repository to the Channel
Syncing Repository Packages
Spacewalk caches local copies of all the packages for the repositories we add. This allows it to offer those packages to registered clients with lower internet bandwidth costs, especially across larger deployments. Since all of our CentOS7 clients will already have access to the main repositories, we won't bother caching the entirety of the CentOS mirror for this example. We will, however, sync the much smaller MariaDB repository so our clients can access its packages.
This will take a while, even if the repository is relatively small. One way to view the progress of the sync process is by navigating to
stagefolder is where Spacewalk downloads the packages to before it sorts them to other folders in the
1is the ID of the Spacewalk group in question). You can roughly gauge the sync process by seeing how many packages are in this folder.
When the sync process finishes, you should be able to view all the repository's packages by navigating to Channels > Manage Software Channels > MariaDB channel > Packages > List / Remove Packages.
Creating Configuration Channels
Similar to software channels, Spacewalk uses configuration channels to make custom configuration files available to clients subscribed to that channel. These configuration files can be pushed to the clients from the Spacewalk control panel. In this example, we'll create a configuration channel with a fake configuration file,
Create the Configuration Channel
Add the Configuration File
To add the /root/test.conf configuration file, navigate to Configuration > Configuration Channels > test channel > Add Files > Create File. Give the file a fully-qualified filename. You can change the file owner and permissions, then fill in the contents in the text field below.
Then click Create Configuration File. Spacewalk will save the configuration file. You'll notice that it drops you on a page called "Revision 1 of /root/test.conf." This is because Spacewalk will allow you to revise your configuration files and it will track the changes. You can deploy different revisions to different hosts.
Learn from my mistakes:
By default, adding an external repository to a channel (like the MariaDB repository) doesn't add its GPG key to the registered hosts. This means that, without providing the GPG key to the clients, they will be unable to install the software. We'll cover this in the Registering Clients section, but this can be done by pushing the GPG key via a configuration channel to
/etc/pki/rpm-gpgand importing it via