Book Image

OpenShift Cookbook

By : Shekhar Gulati
Book Image

OpenShift Cookbook

By: Shekhar Gulati

Overview of this book

Table of Contents (19 chapters)
OpenShift Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Running OpenShift on a Virtual Machine
Index

Configuring a different health check URL for HAProxy


In this recipe, you will learn how to update the HAProxy configuration file to configure a different heath check URL.

Getting ready

To complete this recipe, you will need rhc installed on your machine. This recipe will utilize the application created in the Creating scalable applications recipe.

How to do it…

Perform the following steps:

  1. Open a command-line terminal and navigate to the application directory created in the Creating scalable applications recipe.

  2. SSH into the main application gear using the rhc ssh command, as follows:

    $ rhc ssh --app jobstore
    
  3. Change the directory to the haproxy configuration directory, as follows:

    $ cd haproxy/conf
    
  4. Now, open the haproxy.cfg file using VIM, and remove the following content:

    option httpchk GET /

    In its place, insert the following content:

    option httpchk GET /api/v1/ping
  5. Finally, restart the HAProxy cartridge from your local machine using the rhc command-line client:

    $ rhc restart-cartridge --cartridge...