RHEL Subscription Entitlement for bootc in OCI image

Subscription entitlement bootc details. Picture of container with whale tale and paper money

Building a bootc image for Red Hat Enterprise Linux (RHEL) “Image Mode” requires Red Hat Subscription Entitlement details. This can be tricky to get from the build server. Let’s fix that.

Ansible and bootc

Ansible Logo

Ansible is not ideal for use with bootc, but for anyone with a lot of Ansible automation it’s hard to pivot to “the next thing”. Let’s use Ansible anyway..

Get bootc package version changes from SBOM

syft logo

To know what’s changing in a new bootc (Bootable Container) image use container tooling to generate a Software Bill of Materials (SBOM).

Bootstrapping bootc using Fedora CoreOS

Ansible Logo

Getting bootc initially installed is a little different since it needs an ostree based OS. You could install a bootc image into any running Linux host, but I’ve been playing with Fedora CoreOS and using Ignition/Butane to configure Fedora CoreOS. So let’s use Fedora CoreOS on the host for bootstrapping bootc.

Build RHEL UBI containers with previous package versions

Red Hat UBI (Universal Base Images) are great. Except when you need to install a pervious package version, you can’t. By default RHEL Universal Base Images ship with only the latest version of packages. So how can you “rollback” if one of the package apps has a problem?

heredoc in Dockerfile

Writing a Dockerfile with long scripts inside can be very annoying. Instead use a heredoc. Please no “&& \” over and over.
 

bootc (Bootable Containers): One Container Image to rule them all

bootc logo

bootc has the potential to be groundbreaking (for Enterprise server Linux). A scalable and immutable OS for servers. (Although I like the term Atomic better).

Goodbye Ansible 2.9 – Hello Ansible 2.16

Ansible 2.9, or maybe just this time in history, was a great time for simple configuration management that (mostly) just worked.

Use Ansible to get OS package version (even with a dash)

ansible package version
Get the OS package versions using Ansible, addressing challenges with package names containing dashes. The process involves using the package_facts module. Despite complexities, the approach ensures accurate version retrieval, even with dashes in package names.

Run different Linux program based on current directory (using Bash shell)

This provides a way for using different versions of a program based on the current directory name. By adding this example code to the .bashrc file, users can run a unique terraform version based on the directory name.