Preparing Container Runtime Environment

Setting up the correct container runtime environment is essential for running containerized applications efficiently. This guide provides detailed instructions for preparing a container runtime environment on RHEL 8 and RHEL 9, including prerequisites, installation steps, considerations, and troubleshooting tips.

Container Runtime Requirements

  • New installations:
    • Podman is the default container runtime for RHEL 8 and RHEL 9. However, before proceeding with the BigFix MCM and BigFix Mobile installation, verify that Podman is installed and running.
    • On RHEL 8, using Podman Compose requires additional setup, as the default Python version does not include support for certain necessary libraries.
      Note: Recommendation: If you're starting fresh or looking for minimal setup, choose RHEL 9 for seamless Podman Compose support.
  • Upgrade: Before upgrading, remove Docker and install Podman. For instructions, refer to Migrating from Docker to Podman

Setting up Podman

  1. Check Podman Version

    Podman is included by default in RHEL 8 and RHEL 9. Check Podman version using the following command.

    podman --version
    It displays the installed version of Podman and ensures Podman is installed and available on the system. If it is not available, install it manually.
    sudo dnf install -y podman
  2. Check Python Version and install the required version If Necessary
    python3 --version
    • Displays the installed version of Python 3.

    • If Python 3.9+ is installed, proceed to step #3.

    • If installed Python version is older than 3.9, complete the following steps:
      1. Install Python 3.9
        dnf install python39
        This installs Python 3.9 alongside the existing system version.
      2. Check Current Python 3 Version
        python3 --version
        Output will likely show: Python 3.6.x (or whatever version was previously set as default).
      3. Configure the Default Python Version
        alternatives --config python3
        To change the default version to 3.9, when prompted, select Python 3.9 by using "+" and "Enter".
      4. Verify the Change
        python3 --version
        Now, the python version will be changed to v3.9
  3. Install pip (Python Package Manager)
    sudo dnf install -y python3-pip
    • Installs pip3, the package manager for Python, using dnf (the package manager for RHEL-based systems).
    • The -y flag automatically confirms the installation.
  4. Verify pip Installation
    pip3 --version
    Displays the installed version of pip3, ensuring it's installed and functional.
  5. Install Podman Compose using pip
    pip3 install podman-compose
    Installs Podman Compose, allowing users to manage multiple Podman containers using a docker-compose.yml file.
  6. Verify Podman Compose Installation
    ls /usr/local/bin/podman-compose
    Checks if podman-compose is present in /usr/local/bin/, which is a common location for executables installed via pip.
  7. Create a Symlink for Podman
    ln -s /usr/bin/podman /usr/local/bin/podman
    Ensures podman is accessible in /usr/local/bin/ by linking it to /usr/bin/podman.
  8. Create a Symlink for Podman Compose
    ln -s /usr/local/bin/podman-compose /usr/bin/podman-compose
    Creates a symbolic link (ln -s) so that podman-compose can be executed from /usr/bin/, making it accessible system-wide.
  9. Verify Podman Compose Again
    podman-compose --version
    Confirms that podman-compose is correctly installed and available after the symlink.
  10. Verify if Podman is installed and executable
    podman ps
    podman images
  11. Install MDM server
  12. Verify if Podman containers are running as expected
    podman ps
    Similar to docker ps, it displays all currently running Podman containers.
  13. Verify if Podman images are downloaded
    podman images

    Shows all locally available container images, including their repository names, tags, and sizes.

Troubleshooting

Podman Issues

  1. Podman command not recognized:
    podman --version
    If missing, ensure Podman is installed:
    sudo dnf install -y podman
  2. Podman unable to pull images:
    podman pull registry.fedoraproject.org/fedora:latest
    Check network connectivity and repository access.

Frequently Asked Questions (FAQ)

Q1: Can I run Docker and Podman together?
A: No. It may lead to conflicts due to differences in how they manage containers, images, and storage.
Q2: How can I migrate from Docker to Podman?
A: Uninstall Docker, install and set up Podman, and upgrade MCM to the latest version through WebUI.

Next Steps

Once all prerequisites are met along with setting up Podman, follow the installation instructions Installing MDM services to complete the setup.