Welcome!

XebiaLabs | Continuous Delivery and Agile DevOps Tools

XebiaLabs Blog

Subscribe to XebiaLabs Blog: eMailAlertsEmail Alerts
Get XebiaLabs Blog via: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn


Blog Feed Post

Setup Openshift Environment with XL Release

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 AM

Screen 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!!

The post Setup Openshift Environment with XL Release appeared first on XebiaLabs.

Read the original blog entry...

More Stories By XebiaLabs Blog

XebiaLabs is the technology leader for automation software for DevOps and Continuous Delivery. It focuses on helping companies accelerate the delivery of new software in the most efficient manner. Its products are simple to use, quick to implement, and provide robust enterprise technology.