Skip to main content
DevOps Image

This post is from the XebiaLabs blog and has not been updated since the original publish date.

Last Updated Apr 19, 2015 — DevOps Expert

Setup Openshift Environment with XL Release

DevOps

One of the important things when starting to work in an OpenShift environment is to setup Domains, Applications and Gears. OpenShift provides a set of REST services that can be used to setup domains, applications, gears, etc and also deploy, configure applications. A lot of companies are now moving ahead on the path of using software on the cloud solutions and OpenShift is a popular one among developers who want to quickly deploy applications in lower environments for testing /showcase and tear down after use. XL Release is used for an overall release management and automation of all those activities that can truly be a machine interaction. This article shows XL Release's Webhook capability to interact with OpenShift APIs to create a domain and setup gears. Here's how you can go about it

  • Open a browser and login into you XL Release instance.
  • Create a new template
  • Create a new phase
  • You can create the first task as JSON Webhook
    • Task Name : Create Domain
    • URL : Openshift API
    • Method : POST
    • HTTP Body : contains domain name as JSON string
    • JSON Path Expression 1 : JSON Expression to parse the response from
    • Result 1 : ${appcreate_url} to Capture the JSON Expression 1 Value from captured response
Screen Shot 2015-01-28 at 11.50.32 AMScreen Shot 2015-01-28 at 11.50.43 AM
  • Create the second step as another JSON Webhook
    • Task Name : Create Application and Cartridges
    • URL : ${appcreate_url} is the value captured for the domain created from previous step
    • Method : POST
    • HTTP Body : contains application name and cartridges as JSON string
    • JSON Path Expression 1 : JSON Expression to parse the response from
    • Result 1 : ${app_url} to Capture the JSON Expression 1 Value from captured response
Screen Shot 2015-01-28 at 11.50.52 AM

Screen Shot 2015-01-28 at 11.51.01 AM

  • Create a final third step as Script Step
    • Simple python code to print the captured value of ${app_url} pointing to the newly setup containers
Screen Shot 2015-01-28 at 11.51.08 AM
  • This is how it should look after all three have been created
Screen Shot 2015-01-28 at 11.50.19 AM
  • Now we can create a new Release from this Template and start the release
  • This is how it looks after a successful run
Screen Shot 2015-01-28 at 11.53.27 AM
  •  Looking into the output of each of the steps
    • Step 1 - Create Domain -  Output shows the new domain created under open shift rhcloud
Screen Shot 2015-01-28 at 11.53.37 AM
    • Step 2 - Create Application - Output shows the new application created under domain
Screen Shot 2015-01-28 at 11.53.51 AM
    • Step 3 - Print Information - Finally printing the URL
Screen Shot 2015-01-28 at 11.53.59 AM    This is how you can make use of the XL Release web hook capability to connect and create a workflow for setting up your OpenShift cloud environment and do much more. Enjoy!!

More from the Blog

View more
Mar 04, 2021

Getting key stakeholder buy-in for changes perceived as risky

DevOps
Organizational leaders must recognize that change is vital for the sur ...
Read More
Mar 01, 2021

Discover the change management practices that are ripe for optimization

DevOps
Change has become the most important part of modern digital product cr ...
Read More
Feb 22, 2021

Reckoning DevOps’ role in the enterprise value stream

DevOps
If you’re a software or digital solutions company, you may use DevOps ...
Read More
Feb 10, 2021

Customer spotlight: Schneider avoiding bumps in the road with DevOps adoption

DevOps
Everyone wants to deliver software faster and more reliably. Companies ...
Read More
Contact Us