Table of Contents

Spacewalk

General Information

Spacewalk is a centralized system update and config server.

Checklist


Spacecmd

Spacecmd is the command line interface to Spacewalk.
Details here: Spacecmd


Register System with Spacewalk

A Spacewalk registration script has been created to ease registration.


Re-Register

If you need to re-register a client for any reason, you need the “–force” option when executing rhnreg_ks.


Client Check Ins

If you do not want to wait for the next automatic check in (via rhnsd or cron), you can force a group of systems to check in by running the “rhn_check” command locally on that system.
To loop through a group of systems and have them check in:

Example: Loop through the dev system group and have them check in

for NODE in $(spacecmd group_listsystems dev); do echo "=>${NODE}"; ssh -qt ${NODE} "sudo /usr/sbin/rhn_check"; done

rhnsd config

rhnsd is a daemon that will run rhn_check every 240 mins (by default).

Configure: /etc/sysconfig/rhn/rhnsd

INTERVAL=240

Ensure it is enabled and started


rhn_check Cron Job

The alternative to using rhnsd (if you do not want a daemon running or desire more frequent check ins) is a cron job.

Configure: /etc/cron.d/spacewalk-checkin

# Do not e-mail root/anyone about this job
MAILTO=""
 
# .---------------- minute (0 - 59)
# |  .------------- hour (0 - 23)
# |  |  .---------- day of month (1 - 31)
# |  |  |  .------- month (1 - 12) OR jan,feb,mar,apr ...
# |  |  |  |  .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# |  |  |  |  |
# *  *  *  *  * user-name  command to be executed
# Check in every 30 mins
*/30 * * * * root /usr/sbin/rhn_check

Optional: Disable rhnsd


osad

Another option for client communication is using the osad daemon (xmpp/jabber) on the client and osa-dispatcher on the server.


Channel Management

About Channels


Channel Freezing/Snapshots

In order to facilitate the same updates being applied to the Development, System Test, and the Production environments, it is necessary to clone the original Channels.
This creates a “snapshot in time” of the available packages/errata on the date of clone.
Note: This copies metadata of the Channel and does not duplicate repo packages

To Clone an entire Channel tree:


Errata Setup

As of 12/15/2015, CentOS does not generate an “updateinfo.xml” file in their repodata directories. This file is responsible for the package to errata mappings. (RHEL, Fedora, EPEL, and Oracle all do this)

For a workaround, use a script to scrape the CentOS mailing archive lists for the errata.

The “spacewalk-centos-errata” project is installed to:


Config Management

A system is automatically subscribed to the proper configuration channels when it is registered via its Activation Key.


Compare Configs

To compare the centrally managed files to a system's local config files:


Download (Pull) Configs

The various ways to download config files while on the client system.

Download all config files, from all subscribed config channels

rhncfg-client get

Download a specific managed config file

rhncfg-client get /etc/resolv.conf

Download all config files from a specific Config Channel ID

for FILE in $(rhncfg-client list | awk /config-channel-id/'{print $3}'); do rhncfg-client get ${FILE}; done

Deploy (Push) Configs

To deploy configs from the server to a client.

Portal Deploy

Spacecmd Deploy

List config channels a system is subscribed to

spacecmd system_listconfigchannels

List config files that a system is subscribed to

spacecmd system_listconfigfiles

Deploy all of those config files

spacecmd system_deployconfigfiles <SYSTEMS>

Create a Local Managed File Override

Some systems will need to have different config files than the centrally managed ones.

To create exceptions, or local managed overrides:

On the system's Details > Overview page:


Server Services

Spacewalk server services.

Removing osa/jabber

We won't be using osa-dispatcher or jabberd services, so these can safely be disabled.

Remove osa and jabber from the main spacewalk-service script.


Normal Status of Spacewalk Services

After removing osa-dispatcher and jabberd, the status output looks like this:

/usr/sbin/spacewalk-service status
 
postmaster (pid  29875) is running...
tomcat6 (pid 29992) is running...                          [  OK  ]
httpd (pid  30115) is running...
rhn-search is running (30168).
cobblerd (pid 30204) is running...
RHN Taskomatic is running (30236).

Spacewalk SSL Certificates

The SSL Certificates on the Spacewalk server is used for:

Before manipulating either client or CA cert


Client Certificate

Client Certificate default locations:

Client Certificate Update Procedure


CA Certificate

CA Chain Certificate locations

Updating the CA certificate will not have to be done very often; only when:

WARNING

CA Certificate Update Procedure