
Learn how OpenShift serves administrator and application development teams, choose the right resources, and deploy applications using 15 common OpenShift resources and reusable templates.
Learn how OpenShift runs applications with container technology on a cluster, with control and data planes, and how developers deploy via rest api, cli, or dashboard.
Deploy applications to OpenShift with a single command using oc new-app. Experience starting a Jenkins server and accessing its dashboard to see the deployment in action.
Developers learn to use the OpenShift CLI (OC) over the dashboard, automating tasks with shell scripts and CI jobs to deploy updates, start builds, and scale applications.
Navigate this course with options for all skill levels, from Docker and containers to OpenShift-specific topics, skipping modules as needed to suit your background.
Understand why this course focuses on OpenShift 4, as OpenShift 3 enters maintenance and extended life phases; learn step-by-step setup for OpenShift 4 on Windows and macOS.
Install Docker Desktop on Windows 10 Home by downloading the installer and granting admin privileges. Update the WSL 2 kernel, restart, and test docker run hello-world before OpenShift installation lesson.
Install Docker Desktop on Windows 10 Pro using Hyper-V, not WSL 2, then run a HelloWorld test and proceed to the OpenShift installation introductory lesson.
Learn how to set up your OpenShift environment with CodeReady Containers or the Developer Sandbox, compare requirements, and choose the right option for your OS.
Set up a hosted OpenShift environment with Red Hat's developer sandbox, create and verify a Red Hat account, and access the OpenShift console, choosing Windows or Mac OS setup paths.
download the oc tool for macOS and create an oc-command directory. move oc there, update your path in your startup file, and log in with the token and url.
Clone the labs git repository with git clone https://gitlab.com/practical-openshift/labs.git and use the official Git book to refresh or learn Git before installation.
Sign up for quay.io and gitlab.com to access image registries and Git repositories for OpenShift labs, then create credentials.env from credentials_template.env and keep credentials secret to start the course.
In this lesson you'll learn an easy way to think about containers which will set you up for success on the OpenShift platform.
Run a container with docker run hello-world to see how Docker pulls the image from Docker hub and starts it via the Docker daemon.
Build a container image from a dockerfile and source files using docker build, learn how each instruction creates a new layer from a base image, verify with docker images.
Learn how to tag a container image with meaningful names using docker build -t, understand repository and tag fields, and manage latest and custom tags for efficient OpenShift workflows.
Run the hello-world api server with docker run, verify running containers with docker ps, and stop the container using ctrl-c or docker kill by container id.
Learn how to expose a container port and forward traffic from the host to the pod using Docker -p, with practical examples like 8080:8080 and verifying with curl localhost:8080.
Copy files from your host into a new container using the copy command after selecting a base image with the from instruction, creating a filesystem layer for code and resources.
Set default environment variables in the Dockerfile with the ENV instruction, and learn how to override them before running your container to customize the Hello World app’s HTTP responses.
Master how the run command in a Dockerfile starts a command in the latest intermediate container and saves a new layer, supporting OpenShift permissions and installing dependencies.
Set a container's runtime command with the CMD instruction; shell form starts a shell, while exec form runs directly without a shell for better efficiency.
Learn a foolproof process for developing Docker containers by crafting Dockerfiles with from, env, run, expose, and cmd, then build, test, and prepare for OpenShift.
Discover how to navigate OpenShift 4 as a developer by managing users, organizing applications into projects, authenticating via the command line, and applying quotas to guarantee resource availability.
Log in to OpenShift with oc login, use the -u flow for developer on code-ready containers, then verify the user with oc whoami and log out with oc logout.
Learn to access OpenShift's built-in pod documentation with oc explain, and discover kind, version, description, and common fields such as apiVersion, kind, metadata, and spec.
Explore using oc explain to reveal pod and spec field details, dive into the containers list and image field, and learn why pods are updated by deletion and recreation.
Learn to run a pod on OpenShift by executing oc create -f pods/pod.yaml. Then verify the pod status with oc get pods, ensuring it shows running.
Open a shell inside the running pod with oc rsh, then verify the Hello World server on localhost:8080 using wget. Use the in-container shell for debugging and testing the server.
Use the oc delete command with the pod resource type on the OpenShift REST API to stop a pod. Delete hello-world-pod and verify with oc get pod no resources found.
Explore YAML basics, syntax, objects and lists, and why YAML is the defacto standard for storing Kubernetes and OpenShift resource definitions, with comparisons to JSON.
Deployment configs define the pod template and manage deploying new images or configuration changes, with replicas controlling pod counts and automating deployments and lifecycle hooks in OpenShift.
Clean up OpenShift resources one by one by deleting DeploymentConfigs, services, and ImageStreamTag with oc delete, then verify with oc status and oc get.
Learn to clean up OpenShift resources efficiently by using a label selector with OC delete, leveraging the app=hello-world label to remove pods, replication controllers, and deployment configs.
Learn how replication controllers manage pod replicas through deployment configs, using oc get -o yaml to inspect dc/hello-world, and how traffic shifts to new controllers.
Explore deployment configs, rollout, and rollback in OpenShift using oc commands, learning how to roll out new versions with zero downtime and revert to previous versions when needed.
Expose pods with a single service to provide internal OpenShift network access. Learn how a service uses a proxy, a selector, a virtual IP, and ports to route traffic.
Learn to create a service for a pod with oc expose, expose port 8080, verify with oc status, and validate internal pod communication using a second pod and wget.
OpenShift route definitions expose an external DNS name to reach a service. A route's spec includes host, targetPort, and a to field with kind, name, and weight.
Test your knowledge of Services and Routes in this hands-on exercise.
Store ConfigMaps in OpenShift to hold configuration data separate from pods, enabling environment-specific values and centralized configuration across multiple pods.
Create a ConfigMap from the command line with oc create configmap using from literal and the MESSAGE key, verify with oc get -o yaml, then use it in a pod.
Learn to create a configmap from all files in a directory with oc create configmap --from-file, using the pods directory and then run oc get -o yaml to verify.
Explore OpenShift secrets, including opaque and service account token types, to securely store credentials, certificates, and API keys for authenticating to databases, private registries, and APIs.
Learn to create an opaque secret with OpenShift using oc create secret generic, from literal values, attach it to the Hello World image, and review base64 encoding.
Explore image streams and image stream tags in OpenShift to manage container images and automatically deploy the latest versions via oc commands and deployment configurations.
Import an image stream with oc import image to create streams from a remote quay.io image, then reuse the stream with oc new app to deploy.
Build a private image from a simple dockerfile, tag it for quay.io with your registry username, push after docker login, and verify its private status on quay.io.
Updated to OpenShift 4
OpenShift is a very powerful platform that can help you run your applications securely and easily scale them up as demand rises. In this course you will learn to take advantage of all of this functionality and deploy any type of application to the OpenShift Container Platform. No prior experience in Docker, Kubernetes, or OpenShift is required. This course will take you from no knowledge of OpenShift to professional-level knowledge of OpenShift in just 6 hours.
What this course has that other courses don't have
This is the only course that covers all of the essential OpenShift resource types that you, the developer, need to do your job. Most other courses provide only a light introduction of a few of the OpenShift resource types. Instead, they focus on the DevOps aspects of OpenShift. This course covers 15 different types of OpenShift resources that you will need to do your job effectively. Don't settle for anything less!
Real-world experience
You have the opportunity in this course to get real-world experience with services like Quay and GitLab. These services are not required to complete the course, but you will get the most out of the course if you sign up for them and complete the related Labs. You can use both of these services for free for this course.
Reasons to Learn OpenShift
There are many great reasons for developers to learn OpenShift. Many top tech companies are adopting OpenShift as part of their cloud journey. Knowledge of OpenShift can help you get a job working on the OpenShift platform. The primary customers of OpenShift are large companies with lots of employees, so you have a good chance of finding a position to use your new OpenShift skills.
Developers may also wish to learn about OpenShift to leverage the Platform-as-a-Service (PaaS) OpenShift solutions offered by many public cloud vendors. This can help you to host your own OpenShift-based application to support a Software-as-a-Service (SaaS) startup or other freelance work.
Content and Overview
This course explains OpenShift's vocabulary in clear language, assuming no background in OpenShift. Lectures each have demos and walkthroughs to bring concepts from theory into practice.
Throughout the course, you will work with Git source control and a container registry to deploy applications to OpenShift. This enables you to test your skills in a realistic setting. Labs are hands-on and will require modifying configuration or light code patches in order to achieve the goal.
OpenShift Resource Types
Just like Kubernetes, developing applications on OpenShift requires knowledge of OpenShift resource types. OpenShift has custom resources, such as the DeploymentConfig, ReplicationController, and Template, that are not part of Kubernetes. To effectively create applications for OpenShift, you need to know how to work with these new OpenShift-specific types. Of the 15 resource types covered in this course, 10 are OpenShift-specific and only 5 are the same as Kubernetes.
Legal Notice
OpenShift and the OpenShift logo are trademarks or registered trademarks of Red Hat, Inc. in the United States and/or other countries. This course is not certified, accredited, affiliated with, nor endorsed by OpenShift or Red Hat, Inc.