Skip to content

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.
  • Labs icon Lab
  • A Cloud Guru
Google Cloud Platform icon
Labs

Advanced Container Management Using Podman on RHEL

Let’s take our container skills to the next level! In this lab, we’re going to step up our container management by adding storage, networking, monitoring, and more. Upon completion of this lab, you will be able to perform the foundational container management activities required for day-to-day container management.

Google Cloud Platform icon
Labs

Path Info

Level
Clock icon Intermediate
Duration
Clock icon 1h 0m
Published
Clock icon Apr 23, 2021

Contact sales

By filling out this form and clicking submit, you acknowledge our privacy policy.

Table of Contents

  1. Challenge

    Work with Container Storage

    You will first work with Podman container storage!

    Container Storage Using a Directory
    • Create a directory named ~/html.
    • Create 3 text files in your new ~/html directory:
      • Name these test1.txt, test2.txt, and test3.txt.
      • Make the contents "Test File 1", "Test File 2", and "Test File 3".
    • Start 3 nginx containers:
      • Name them web1, web2, and web3.
      • Attach the ~/html directory to the container at /usr/share/nginx/html/.
    • Run a curl command inside each container to test.
      • Try pulling each of your text files.
    • Stop and remove all 3 containers.
    Container Storage Using a Container Volume
    • Create a new container storage volume named webvol.
    • Start 3 nginx containers:
      • Name them web1, web2, and web3.
      • Attach the webvol volume to the container at /usr/share/nginx/html/.
    • Copy the 3 text files from ~/html into the web1 container to the /usr/share/nginx/html/ directory.
    • Run an ls command inside of each container to list the contents of the /usr/share/nginx/html/ directory.
      • You should see the 3 text files.
    • Run a curl command inside each container to test.
      • Try pulling each of your text files.
    • Stop and remove all 3 containers.

    You can now proceed to the next objective!

  2. Challenge

    Configure Container Networking

    Now you can make your nginx web servers available outside of their containers!

    Publish Your Web Servers' Ports
    • Start 3 nginx containers:
      • Name them web1, web2, and web3.
      • Attach the webvol volume to the container at /usr/share/nginx/html/.
      • Publish the containers' port 80:
        • 8081 (web1)
        • 8082 (web2)
        • 8083 (web3)
    • Check the published container ports.
    • Run curl commands on your host:
      • Pull the 3 test text files from the 3 web server containers.
    • Stop and remove all 3 containers.

    Now you can try setting up some container healthchecks!

  3. Challenge

    Use Container Healthchecks

    Now that you have your web server containers up and running with shared storage and networking, add a check that validates that nginx is available.

    Configure Healthchecks For Your Web Servers
    • Start 3 nginx containers:
      • Name them web1, web2, and web3.
      • Attach the webvol volume to the container at /usr/share/nginx/html/.
      • Publish the containers' port 80:
        • 8081 (web1)
        • 8082 (web2)
        • 8083 (web3)
      • Add a healthcheck for each server:
        • 'curl http://localhost || exit 1'
        • Set the healthcheck interval to 0
    • Run curl commands on your host.
      • Pull the 3 test text files from the 3 web server containers.
    • Run the healthchecks for all 3 servers.
      • Validate that the nginx service is healthy on all 3 servers.

    Your containers are looking great now! Now you can take a look at your Podman host.

  4. Challenge

    Manage Your Podman Environment

    With healthy containers, check out the host.

    Managing Your Podman System
    • Display system information for your Podman host.
    • Display Podman's disk space utilization.
      • Use regular and verbose modes.
    • Clean up unused data using prune.
    • Display Podman's disk space utilization again.

    All cleaned up!

    Monitoring Your Podman System
    • Take a look at events from the last 10 minutes.
    • Display all prune events for the past 15 minutes.

    Looks good!

The Cloud Content team comprises subject matter experts hyper focused on services offered by the leading cloud vendors (AWS, GCP, and Azure), as well as cloud-related technologies such as Linux and DevOps. The team is thrilled to share their knowledge to help you build modern tech solutions from the ground up, secure and optimize your environments, and so much more!

What's a lab?

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Provided environment for hands-on practice

We will provide the credentials and environment necessary for you to practice right within your browser.

Guided walkthrough

Follow along with the author’s guided walkthrough and build something new in your provided environment!

Did you know?

On average, you retain 75% more of your learning if you get time for practice.

Start learning by doing today

View Plans