Spacewalk 2.4 installation on CentOS 7

Spacewalk logo

Spacewalk (not the EVA kind) is an open source (GPLv2) Linux systems management solution and is the upstream project for Red Hat Satellite. The main feature I wished to experiment with was the ability to manage multiple systems packages (upgrades) concurrently. The project also has several other main features, including;

  • Inventory your systems (hardware and software information)
  • Install and update software on your systems
  • Collect and distribute your custom software packages into manageable groups
  • Provision (kickstart) your systems
  • Manage and deploy configuration files to your systems
  • Provision and start/stop/configure virtual guests
  • Distribute content across multiple geographical sites in an efficient manner

Prerequisites

Taken directly from the official Spacewalk docs:

  • Open outbound firewall ports 80, 443
  • Inbound open ports 80, 443, 5222 (covered below later on)
  • Storage for database: 250 KiB per client system + 500 KiB per channel + 230 KiB per package in channel (i.e. 1.1GiB for channel with 5000 packages)
  • Storage for packages (default /var/satellite): Red Hat recommend 6GB per channel for their channels, I used 20GB for storage, as 10GB wasn’t enough
  • 2GB RAM minimum, 4GB recommended
  • Fully up-to-date underlying operating system running a vanilla installation (no user customisation performed yet, fresh system install)

Setup Repos

There are 3 main repos to setup.

Spacewalk repo

rpm -Uvh http://yum.spacewalkproject.org/2.4/RHEL/7/x86_64/spacewalk-repo-2.4-3.el7.noarch.rpm

JPackage

cat > /etc/yum.repos.d/jpackage-generic.repo << EOF
[jpackage-generic]
name=JPackage generic
#baseurl=http://mirrors.dotsrc.org/pub/jpackage/5.0/generic/free/
mirrorlist=http://www.jpackage.org/mirrorlist.php?dist=generic&type=free&release=5.0
enabled=1
gpgcheck=1
gpgkey=http://www.jpackage.org/jpackage.asc
EOF

EPEL

Spacewalk requires Java Virtual Machine 1.6.0 or greater which is available in the EPEL repo.

rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Installation

Time to get on with the install 🙂

Database backend

Spacewalk uses database server to store its primary data. It supports either PostgreSQL (version 8.4 and higher) or Oracle RDBMS. Lets install PostgreSQL and let Spacewalk configure the database for us.

yum install spacewalk-setup-postgresql

Install Spacewalk

Install the Spacewalk package with support for PostgreSQL.

yum install spacewalk-postgresql 

Configure the firewall

Enable inbound firewall (firewalld) ports 80 (http) and 443 (https).

firewall-cmd --add-service=http
firewall-cmd --add-service=https

Configure Spacewalk

Last step.

spacewalk-setup --disconnected

Afterwards we should be able to visit: https://hostname.yourdomain.com to create the Spacewalk admin account and finish the installation.