Preparing Channels and Repositories for CentOS Traditional Clients

This following section provides an example procedure for configuring CentOS channels and repositories and finally registering a CentOS client with Uyuni.

These steps will be identical for Scientific Linux and Fedora.

Procedure: Preparing Channels and Repositories
  1. As root install spacewalk-utils on your Uyuni server:

    zypper in spacewalk-utils
    Supported Tools
    The spacewalk-utils package contains a collection of upstream command line tools which provide assistance with spacewalk administrative operations. You will be using the spacewalk-common-channels tool. Keep in mind SUSE only provides support for spacewalk-clone-by-date and spacewalk-manage-channel-lifecycle tools.
  2. Run the spacewalk-common-channels script to add the CentOS7 base, updates, and Spacewalk client channels.

    spacewalk-common-channels -u admin -p`secret`-a x86_64 'centos7'
    spacewalk-common-channels -u admin -p`secret`-a x86_64 'centos7-updates'
    spacewalk-common-channels -u admin -p`secret`-a x86_64 'spacewalk26-client-centos7'
    Required Channel References
    The /etc/rhn/spacewalk-common-channels.ini must contain the channel references to be added. If a channel is not listed, check the latest version here for updates:
  3. From the Web UI select Main Menu  Software  Manage Software Channels  Overview. Select the base channel you want to synchronize, in this case CentOS7 (x86_64). Select Repositories  Sync. Check the channels you want to synchronize and then click the Sync Now button or, optionally, schedule a regular synchronization time.

  4. Copy all relevant GPG keys to /srv/www/htdocs/pub. Depending on what distribution you are interested in managing these could include an EPEL key, SUSE keys, Red Hat keys, and CentOS keys. After copying these you can reference them in a comma-delimited list within your bootstrap script (see Procedure: Preparing the Bootstrap Script).

  5. Install and setup a CentOS 7 client with the default installation packages.

  6. Ensure the client machine can resolve itself and your Uyuni server via DNS. Validate that there is an entry in /etc/hosts for the real IP address of the client.

  7. Create an activation key (centos7) on the Uyuni server that points to the correct parent/child channels, including the CentOS base repo, updates, and Spacewalk client.

Now prepare the bootstrap script.

Procedure: Preparing the Bootstrap Script
  1. Create/edit your bootstrap script to correctly reflect the following:

    # can be edited, but probably correct (unless created during initial install):
    # NOTE: ACTIVATION_KEYS *must* be used to bootstrap a client machine.
    yum clean all
    # Install the prerequisites
    yum -y install yum-rhn-plugin rhn-setup
  2. Add the following lines to the bottom of your script, (just before echo “-bootstrap complete -”):

    # This section is for commands to be executed after registration
    mv /etc/yum.repos.d/Cent* /root/
    yum clean all
    chkconfig rhnsd on
    chkconfig osad on
    service rhnsd restart
    service osad restart
  3. Continue by following normal bootstrap procedures to bootstrap the new client.

Registering CentOS Salt Clients with Uyuni

The following procedure will guide you through registering a CentOS client.

Support for CentOS Patches

CentOS uses patches originating from CentOS is not officially supported by SUSE . See the matrix of Uyuni clients on the main page of the Uyuni wiki, linked from the Quick Links section:

Procedure: Register a CentOS 7 Client
  1. Add the Open Build Service repo for Salt:

    yum-config-manager --add-repo
  2. Import the repo key:

    rpm --import
  3. Check if there is a different repository that contains Salt. If there is more than one repository listed disable the repository that contains Salt apart from the OBS one.

    yum list --showduplicates salt
  4. Install the Salt client:

    yum install salt salt-minion
  5. Change the Salt configuration to point to the Uyuni server:

    mkdir -p /etc/salt/minion.d
    echo "master:`server_fqdn`" > /etc/salt/minion.d/susemanager.conf
  6. Restart the client

    systemctl restart salt-minion
  7. Proceed to Main Menu  Salt  Keys from the Web UI and accept the client’s key.