Spacewalk Red Hat Satellite v5 in a Docker container PoC
Spacewalk was the upstream project to provide a Linux systems management layer on which Red Hat Satellite was based, was based at least until RH Satellite version 5. Newer versions are not anymore based on Spacewalk, instead Satellite is a federation of several upstream open source projects, including Katello, Foreman, Pulp, and Candlepin.
Some weeks ago, a friend asked me if I knew a Docker container image for Satellite. | I have not found any image. What I found was some Spacewalk images, but sadly none of them worked for me. | I decided to create an image for this purpose.
While developing the image, I found serious troubles to make it run with systemd (I\'m a fan of systemd, but not inside containers yet). | The result was a semi functional working image. I said semi functional because some Spacewalk features are not working (probably an issue with systemd again). | The main problem was that spacewalk-setup script starts and uses systemd to configure the database and the other needed services, that\'s OK in a VM but not in a container. | So i needed to hack into postgres setup and start the services with the typical command --config-file file.conf
executed from supervisord as Docker entrypoint. Currently there is an issue with osa-dispatcher
, on which I can\'t find a fix to make it run.
This image is primarily created just for test Spacewalk interface and be more comfortable with it aka testing/development purposes, or just to have fun hacking with Docker containers.
Now, I\'m going to make a short description of what the Dockerfile makes and then start the container. | Have fun.
I used centos as image base for this PoC
Typical Maintainer line
Add jpackage repo which provides Java packages for Linux
Install EPEL and Spacewalk repositories, after install, clean all stored cache to minimize image size
Import Keys to allow installation from these repositories
Install spacewalk and supervisord packages
Copy the example file used to sync spacewalk database in a later step
Open necessary ports
Change to postgres user
Initialize the database
Create spacewalk database, user, role and create pltclu language
Change to root user
Start the database and execute spacewalk configuration script
Copy supervisord configuration
Use supervisord command to start all services at container launch time
You can check or download the source code at GitHub https://github.com/egonzalez90/docker-spacewalk
I uploaded the image to DockerHub, which is auto-build from my GitHub repository, you can find it with the following command.
To start the container use the following command. If you don\'t have the image locally, it will download the image from DockerHub
Now you have the container running, check if all the ports are properly exposed
Get the container IP address in order to enter from a Web Browser
| Open A browser and go to the container IP address, if you use HTTP, by default it will redirect you to HTTPS. | The container uses an auto-signed SSL certificate, you have to add an exception in the Browser you use to allow connections to Spacewalk. | Once in the Welcome page, create an Organization.
| Now you are in Spacewalk and can play/test some features.
| There is an issue I was not able to fix, so osa-dispatcher and some other features will not work with this image. | If someone can give me an input to fix the issue it will appreciated.
Thanks for your time and hopes this image at least serves you to learn and play with the interface.
Regards, Eduardo Gonzalez
Last updated