1. Home
  2. Training Library
  3. Containers
  4. Courses
  5. OpenShift 101 - Quick Start

Demonstrate S2I Project Scaffolding

play-arrow
Start course
Overview
DifficultyBeginner
Duration1h 42m
Students616
Ratings
5/5
starstarstarstarstar

Description

OpenShift is a rock solid platform engineered for the enterprise. It's built on top of Kubernetes and provides many value add features, tools, and services which help to streamline the complete end-to-end container development and deployment lifecycle.  

This introductory level training course is designed to bring you quickly up to speed with the key features that OpenShift provides. You'll then get to observe first hand how to launch a new OpenShift Container Platform 4.2 cluster on AWS and then deploy a real world cloud native application into it.

 

 

We’d love to get your feedback on this course, so please give it a rating when you’re finished. If you have any queries or suggestions, please contact us at support@cloudacademy.com.

Learning Objectives

By completing this course, you will:

  • Learn and understand what OpenShift is and what it brings to the table
  • Learn and understand how to provision a brand new OpenShift 4.2 cluster on AWS
  • Learn and understand the basic principles of deploying a cloud native application into OpenShift
  • Understand how to work with and configure many of the key OpenShift value add cluster resources
  • Learn how to work with the OpenShift web administration console to manage and administer OpenShift deployments
  • Learn how to work with the oc command line tool to manage and administer OpenShift deployments
  • And finally, you’ll learn how to manage deployments and OpenShift resources through their full lifecycle

Intended Audience

This course is intended for:

  • Anyone interested in learning OpenShift
  • Software Developers interested in OpenShift containerisation, orchestration, and scheduling
  • DevOps practitioners looking to learn how to provision and manage and maintain applications on OpenShift

Prerequisites

To get the most from this course, you should have at least:

  • A basic understanding of containers and containerisation
  • A basic understanding of Kubernetes - and container orchestration and scheduling
  • A basic understanding of software development and the software development life cycle
  • A basic understanding of networks and networking

Source Code

This course references the following CloudAcademy GitHub hosted repos:

 

Transcript

- [Jeremy] Okay, welcome back. Before we go ahead and create a purpose built builder image for our front end, let's first demonstrate the basic approach to working with the S2I command to scaffold out a new sample builder project. This is just to demonstrate functionality, we won't actually use it going forward. 

Okay, let's go to step 18 within our run book, and copy the first command. I'll then jump back into the terminal and execute it like so. Now, this command basically sets up and scaffolds a new directory structure within a folder called S2I XYZ builder, for our custom S2I container-based builder image. Let's now examine more closely the directory structure that has just been generated. I'll use the tree command like so. 

As you can see, this is the conventional layout that the S2I command works with. The main files that we need to customize when building a custom S2I container-based builder image are the following: the docker file, the assemble file, and the run file. Let's examine the contents of each of these files, including the make file. As you can see, the make file simply encapsulates performing a docker build over the local docker file. Next, the docker file is really where a lot of your customization is played. Again, this will become clearer in the next demo where I'll reuse an existing S2I build project, already created and stored on Get Up. Moving on, the assemble script is used to perform the code injection when a build takes place. 

The assemble script is mostly used to move files about during the build phase. Again, this will become clearer in the next demo. And, finally, the run script is used at run time to launch processes within the container, and will perform other arbitrary tasks when the container is started. Remembering that the builder image generates an output image, the assemble script gets some vote within the builder container, and the run script gets some vote in the output container. 

Let's now run a quick make on this sample builder project to create the sample builder container image. I'll run the following command to run the make command from within the S2I XYZ builder directory. As expected, a docker build kicks off and uses the docker file to direct it's build. This is now completed successfully. Finally, we can examine the local docker images to see the newly built XYZ builder image, and, as expected, it is tagged with the tag XYZ builder latest. 

Okay, that completes step 18, and a quickfire intro into how to use S2I to scaffold new builder projects. In the next demo, I'll take a closer look at the front end builder project which is already customized and ready to be used.

About the Author
Students38986
Labs34
Courses93
Learning paths25

Jeremy is the DevOps Content Lead at Cloud Academy where he specializes in developing technical training documentation for DevOps.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 20+ years. In recent times, Jeremy has been focused on DevOps, Cloud, Security, and Machine Learning.

Jeremy holds professional certifications for both the AWS and GCP cloud platforms.