Chapter 6. Deploying and Scaling Your Application

By now you have successfully deployed both the Hello, World and Insults applications based on the WildFly application server for Java. applications aren’t static and as you continue to make changes you will want to keep redeploying the application. We already showed you how you can manually trigger a rebuild and redeployment of your application, but doing that all the time can get repetitive. In this chapter we discuss how to define triggers so that any time you push changes to your code repository on GitHub, your application will be automatically rebuilt and redeployed. We will also look at how to scale your application, deployment strategies when releasing new versions, application health checks, and rollbacks.

Automatic Deployments Using Webhooks

A webhook (also called a web callback or HTTP push API) is a way an application can provide other applications with real-time information or notifications.

We can configure the GitHub code hosting service to trigger a webhook each time we push a set of changes to your project code repository. Using this tool, we can notify OpenShift when you have made code changes and thus initiate rebuild and redeployment of our application.

Adding Our Webhook URI to GitHub

Before we can configure GitHub with a webhook for your application, we need to first find the webhook URI for your particular application:

  1. Navigate back to the Builds page for the helloworld application in the OpenShift web ...

Get OpenShift for Developers now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.