OpenShift deployment guide for developers

By Graham Dumpleton

Updated: 1/1/2018

OpenShift is a container platform that allows users to deploy their cloud-native applications as well as traditional stateful applications. Throughout the course of this book, you will learn how to to run, access, and manage containers, including how to orchestrate them to scale. You will also learn how to deploy improved applications and develop source code using OpenShift's CaaS and PaaS functionality.

This book explains how to:

  • Create a project and deploy pre-existing application container images.

  • Build application container images from source and deploy them.

  • Implement and extend application image builders.

  • Accelerate build times using incremental and chained builds.

  • Automate builds by using a webhook to link OpenShift to a Git repository.

  • Add configuration and secrets to the container as project resources.

  • Make an application visible outside the OpenShift cluster.

  • Manage persistent storage inside an OpenShift container.

  • Monitor application health, and manage the application life-cycle.

openshift book cover

Get OpenShift to maintain containers now


OpenShift deployment strategies

“A deployment strategy defines the process by which a new version of your application is started and the existing instances shut down.

To view what strategy a deployment is using, run the oc describe command on the deployment configuration:

Strategy: Rolling

The version of OpenShift available at the time of writing this book did not provide a dedicated command to change the deployment strategy. In older versions of OpenShift you would need to edit the deployment configuration using oc edit, or run oc patch to patch the deployment configuration in place:

$ oc patch dc/blog --patch '{"spec":{"strategy":{"type":"Recreate"}}}'

A new command, oc set deployment-strategy, is planned for a newer version of OpenShift, which will allow you to set the deployment strategy to Recreate by running:

$ oc set deployment-strategy dc/blog --recreate

To set the deployment strategy to Rolling with this command, you would use the --rolling option.

Get OpenShift to maintain containers now


openshift rolling deployment page