Setting Up Multi-Container Applications in OpenShift

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

For this lab, we will be creating an application that has multiple containers. You will learn to work with templates to create a multi-container application.

Due to limitations in the A Cloud Guru Cloud Playground environment, we are unable to provide a hands-on experience for this lab.

1. To complete this lab, you must first register for a Red Hat Developer login on the ***[Red Hat login page](https://developers.redhat.com/login)***.
2. Once registered, you may complete the lab steps using ***[Red Hat’s CodeReady Containers](https://cloud.redhat.com/openshift/install/crc/installer-provisioned)*** or the ***[Red Hat-provided OpenShift sandbox](https://developers.redhat.com/products/codeready-containers/overview)***.

Solutions for using CodeReady Containers and the Red Hat OpenShift sandbox are available in this lab.

*This lab is not approved or sponsored by Red Hat.*

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Log In to the Cluster and Create a New Project
  1. Log in to the OpenShift cluster using oc login and/or the web UI.

  2. Create a new project called multi-test with a display name of Multi-Container Test (skip if using Red Hat OpenShift sandbox).

Download the OpenShift Template and Publish It
  1. Download the template file from this Git repo (here) and save it as a file named multi_test.yaml.

  2. Publish this template to your local project.

Process the Template and Create the Application
  1. Process the template with the following custom parameters and then create the application using the processed template.

NAME=fruit-stand

DATABASE_NAME=fruit_stand

DATABASE_USER=guru

DATABASE_PASSWORD=badpass

DATABASE_ADMIN_PASSWORD=badidea

Verify the Application Is Working
  1. Open the application in a web browser and add a test entry into the inventory page.

Additional Resources

Logging in to the Lab Environment

Due to limitations in the A Cloud Guru Cloud Playground environment, we are unable to provide a hands-on experience for this lab.

  1. To complete this lab, you must first register for a Red Hat Developer login on the Red Hat login page.
  2. Once registered, you may complete the lab steps using Red Hat's CodeReady Containers or the Red Hat-provided OpenShift sandbox.

Scenario

In this lab scenario, you have been approached by a client who would like you to test a new multi-container application template using their new development Red Hat OpenShift Container Platform. The client would like you to complete the following tasks:

  1. Create a new project.
  2. Download the template file from this Git repo and publish it to your new project.
  3. Process the template with custom parameters and use this to create the application.
  4. Enter a test value into the web application to verify it is working properly.

What are Hands-on Labs

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.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?