In this self paced tutorial, you will learn how to use OpenShift Do (
odo) to build and deploy applications on the OpenShift Container Platform.
odo is a CLI tool for developers who are writing, building, and deploying applications on OpenShift. With
odo, developers get an opinionated CLI tool that supports fast, iterative development.
odo abstracts away Kubernetes and OpenShift concepts so developers can focus on what's most important to them: code.
odo was created to improve the developer experience with OpenShift. Existing tools such as
oc are more operations-focused and require a deep understanding of Kubernetes and OpenShift concepts.
odo is designed to be simple and concise so you can focus on coding rather than how to deploy your application. Since
odo can build and deploy your code to your cluster immediately after you save your changes, you benefit from instant feedback and can validate your changes in real-time.
odo's syntax and design is centered around concepts already familiar to developers, such as project, application, and component.
During this scenario, you will be using a hosted OpenShift environment that is created just for you. This environment is not shared with other users of the system. Because each user completing this scenario has their own environment, we had to make some concessions to ensure the overall platform is stable and used only for this training. For that reason, your environment will only be active for a one hour period. Keep this in mind before you get started on the content. Each time you start this training, a new environment will be created on the fly.
The OpenShift environment created for you is running version 3.11 of the open source OKD. This deployment is a self-contained environment that provides everything you need to be successful learning the platform. This includes a command line environment, the OpenShift web console, public URLs, and sample applications.
Let's get started!
Congratulations! You just learned the basics of using the
odo tool to manage application components on the OpenShift Container Platform.
odo helps you conveniently access all the power OpenShift has to offer, and that these first steps leave you eager to learn more. https://learn.openshift.com has other tutorials from basic to advanced that offer a real cluster to learn on, just like this scenario. It's also easy to run your own OpenShift cluster locally or to leave infrastructure management to Red Hat experts by using a hosted OpenShift.
Here are some of the ways you can get your own OpenShift cluster:
Minishift is a complete OpenShift environment inside a virtual machine that runs on your local system. Minishift supports Windows, MacOS, and Linux operating systems. To find out more about minishift, visit https://www.okd.io/minishift/.
The OpenShift team provides a hosted, managed environment that frees developers from worrying about infrastructure. OpenShift Online includes a free Starter tier for developing and testing applications on OpenShift. OpenShift Online Pro provides scalability for production deployments at competitive monthly rates in a multi-tenant environment. Find details about OpenShift Online, and sign up for free, at https://www.openshift.com/pricing/.
For the highest production requirements, Red Hat hosts and manages dedicated OpenShift instances available only to your organization. OpenShift Dedicated is ideal for larger teams that want the scale and velocity benefits of container cluster orchestration without having to sweat the details of deploying and maintaining secure, reliable infrastructure. To find out more, visit https://www.openshift.com/dedicated/.
Developing with odo
The application you will be deploying is a wild west shooter style game.
Applications are often divided into components based on a logical division of labor. For example, an application might consist of a data-storage, backend component that performs the application's primary work and stores the results. The backend component is paired with a user interface, frontend component that accesses the backend to retrieve data and displays it to a user.
The application deployed in this tutorial consists of two such components.
The backend is a Java-based Spring Boot application. It performs queries against the Kubernetes and OpenShift REST APIs to retrieve a list of the resource objects that were created when you deployed the application. Then, it returns details about these resource objects to the frontend.
The frontend is the user interface for a wild west style game written in Node.js. It displays popup images which you can shoot, corresponding to the resource objects returned by the backend.