Red Hat Satellite Cheat Sheet

- By: Toni Schmidbauer ( Lastmod: 2021-08-14 ) - 2 min read

Cheat sheet for various Red Hat Satellite tasks from a newbie to a newbie.

Requirements

  • up to Satellite 6.7 RHEL 7.X

  • 4 CPU Cores

  • 20 GB of RAM

  • 300 GB disk space

for more info see the prerequistes guide

Installation

Satellite up to version 6.7 uses puppet for installation. You can use

puppet filebucket

to restore files modified by puppet.

Satellite requires the Red Hat Satellite Infrastructure Subscription, check if it’s available with

subscription-manager list --all --available --matches 'Red Hat Satellite Infrastructure Subscription'

If not attach it with

subscription-manager attach --pool=pool_id

Next disable all repos and enable only supported repostories via

subscription-manager repos --disable "*"

and enable required repositories

subscription-manager repos --enable=rhel-7-server-rpms \
--enable=rhel-7-server-satellite-6.6-rpms \
--enable=rhel-7-server-satellite-maintenance-6-rpms \
--enable=rhel-server-rhscl-7-rpms \
--enable=rhel-7-server-ansible-2.8-rpms

then clean cached all repo data via

 yum clean all

and install satellite packages via

yum install satellite

Install satellite with

satellite-installer --scenario satellite \
--foreman-initial-organization "initial_organization_name" \
--foreman-initial-location "initial_location_name" \
--foreman-initial-admin-username admin_user_name \
--foreman-initial-admin-password admin_password

Backup / Restore / Cloning

Use satellite-maintain for doing offline and online backups

satellite-maintain backup offline /backup/

when using the online option make sure that no new content view or content view versions should be created while the backup is running. basically satellite should be idle.

Cloning Satellite

The online/offline options also backup /var/lib/pulp, which contains all downloaded packages. This could be huge. There’s an option to skip this so

satellite-maintain backup offline --skip-pulp-tar /backup/
For a restore you always need the content of /var/lib/pulp.

This is mainly usefull for cloning satellite. You backup everything except /var/lib/pulp, copy the backup to a second system and rsync /var/lib/pulp to the new system. Then restore the backup and satellite should work as normal on the clone.

Snaphot backups

Satellite also supports backups via LVM snapshots. For more information see Snapshot backup

Upgrades

  1. Read the Satellite release notes

  2. Do a offline backup see [Backup / Restore]

  3. You could clone satellite to a other system

  4. If there are local changes to dhcpd or dns configurations use

    satellite-installer --foreman-proxy-dns-managed=false --foreman-proxy-dhcp-managed=false

    to stop satellite-install from overwriting those files.

  5. install the latest version of satellite-maintain via

    yum install rubygem-foreman_maintain
  6. check for available satellite versions with

    satellite-maintain upgrade list-versions
  7. test the possible upgrade with

    satellite-maintain upgrade check --target-version 6.7
  8. and finally run the upgrade and PRAY!

    satellite-maintain upgrade run --target-version 6.7

Various tips and tricks

Installing packages via yum

Satellite installs a yum plugin called foreman-protector. If you try to install a package via yum you get the following message

WARNING: Excluding 12190 packages due to foreman-protector.
Use foreman-maintain packages install/update <package>
to safely install packages without restrictions.
Use foreman-maintain upgrade run for full upgrade.

so use

satellite-maintain install <package name>

OS package upgrade

This should be done via satellite-maintain because all packages are locked by default (see Installing packages via yum).

This basically comes down to running

oreman-maintain upgrade run --target-version 6.6.z

for upgrading OS packages if you have satellite 6.6 installed.