Book Image

Learn OpenShift

By : Denis Zuev, Artemii Kropachev, Aleksey Usov
Book Image

Learn OpenShift

By: Denis Zuev, Artemii Kropachev, Aleksey Usov

Overview of this book

Docker containers transform application delivery technologies to make them faster and more reproducible, and to reduce the amount of time wasted on configuration. Managing Docker containers in the multi-node or multi-datacenter environment is a big challenge, which is why container management platforms are required. OpenShift is a new generation of container management platforms built on top of both Docker and Kubernetes. It brings additional functionality to the table, something that is lacking in Kubernetes. This new functionality significantly helps software development teams to bring software development processes to a whole new level. In this book, we’ll start by explaining the container architecture, Docker, and CRI-O overviews. Then, we'll look at container orchestration and Kubernetes. We’ll cover OpenShift installation, and its basic and advanced components. Moving on, we’ll deep dive into concepts such as deploying application OpenShift. You’ll learn how to set up an end-to-end delivery pipeline while working with applications in OpenShift as a developer or DevOps. Finally, you’ll discover how to properly design OpenShift in production environments. This book gives you hands-on experience of designing, building, and operating OpenShift Origin 3.9, as well as building new applications or migrating existing applications to OpenShift.
Table of Contents (24 chapters)

Creating new applications in OpenShift

The first and most essential command to run in OpenShift is oc new-app. This command is similar to Kubernetes's kubectl run, but oc new-app is way more powerful and works a little bit differently. We are going to show you how oc new-app works in detail later in this chapter.

The best way to test out the oc new-app command is to create a new project and then run it over there:

$ oc new-project project1
Now using project "project1" on server "https://127.0.0.1:8443".
You can add applications to this project with the 'new-app' command. For example, try:

oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git
to build a new example application in Ruby.

The command output tells us to run the oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-ex.git command. Run the command...