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 May 03, 2015 — DevOps Expert

Jython Console extension with XL Release 4.6.0

DevOps

With XL Release 4.6.0, custom REST Endpoints are now supported by XL Release, just like with 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. This is especially useful as XL Release currently does not have a Command Line Interface. 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 xebialabs-community site
  2. Shutdown your XL Release 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> e.g. 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://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 XL Release Jython API
You can also expose all the jython context in XL Release server runtime using the code snippet provided XL Deploy Variables Demystified: Part 2Enjoy!!

More from the Blog

View more
Jul 22, 2021

DevOps as a Service (DaaS): scaling digital transformation the right way

DevOps
When going through digital transformation, many organizations have dis ...
Read More
Jun 28, 2021

Smash through barriers to data availability, make analytics easier

DevOps
In DevOps, "data availability" often refers to a state where the app o ...
Read More
Jun 24, 2021

Strategies for DevOps adoption across teams

DevOps
Implementing DevOps is not merely a change in IT and it’s certainly no ...
Read More
Jun 10, 2021

Desilo DevOps: The power of bringing all your tools and data into one view

DevOps
When discussing value stream management (VSM), our resources talk a lo ...
Read More
Contact Us