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

Jython Console extension with XL Release 4.6.0

With XLRelease 4.6.0 , the custom REST Endpoints feature has also been provided with XL Release just like XL Deploy. Keeping that in mind, Some of the existing extensions that have custom REST endpoints can be used along with XL Release now.

One of them is the Jytutor extension that can be used to experiment with Jython scripting on the server backend. The reason it could be really useful with XL Release is because it doesn’t have a Command line Interface(cli).

Jytutor also has a UI interface which is accessible through the Jytutor menu option in XL Deploy but UI Extensions are not available in XL Release till now. But we can still access the UI by referring it directly.

Here’s how to go for it

  1. Download the Jytutor extension referring to the Jytutor Blog or from the following link https://github.com/xebialabs-community/xld-jytutor-plugin/releases
  2. Shutdown your XLRelease server and drop the extension jar file under XLR_HOME/plugins folder
  3. Restart the server and log back in
  4. You’ll have to use firefox for this one since the authentication information is not being passed on to the jytutor UI as UI extensions are yet to come in XL Release.
  5. In Firefox, download an add-on can Modify Headers
  6. Restart firefox, Open modify Headers from toolbar. Now we’ll add an authorization header.
    1. In modify headers menu, select Add action
    2. Type header name as Authorization
    3. For value, we’ll use Basic authentication. For that generate a 64bit encoded value for your <username>:<password>. eg. for admin:admin , it will be YWRtaW46YWRtaW4=
    4. Put the value of header as Basic YWRtaW46YWRtaW4=
    5. Start the modify headers to push headers in requests
  7. After that open another tab and open http://<XLR_URL>/static/4.6.0/web/jytutor-plugin/tutor.html  e.g.. http://localhost:5516/static/4.6.0/web/jytutor-plugin/tutor.html
  8. You can now start typing any jython/python code snippet and submit to get it evaluated using Xl-Release server side scripting engine. e.g.. type  print “hello xlr”
  9. You can also play with XLR Jython Services

You can also expose all the jython context in XL Release server runtime using the code snippet provided XL Deploy Variables Demystified : Part 2

Enjoy!!

The post Jython Console extension with XL Release 4.6.0 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.