2017 has been labeled as the year for IoT. I’ve been exploring how you can integrate Citrix’s own IoT platform, Octoblu, with a fully deployed XenDesktop environment.

I’m currently interning as a Software Test Engineer in the RTST (Real Time System Test) team. The RTST is a live XenDesktop environment that imitates exactly what many of our customers have set up, and we make this environment available to internal Citrix employees. As a part of this, we are continuing to consider how we can integrate various platforms to make life easier for our users if they ever come across an issue.

I was tasked with building an Octoblu-powered solution which would allow users to end their own XenDesktop sessions through Slack – effectively creating a self-service feature.

Where did the idea come from?

I got to thinking after seeing a demo from James Bulpin using the XenServer Connector, in which he used Octoblu to send various power commands to a Virtual Machine. I thought, instead of talking to XenServer and shutting down the machine, why not talk to the XenDesktop Delivery Controllers and end a session?

As Software Test Engineers and Systems Administrators, we want to spend our precious time working on making the product better instead of logging into our Delivery Controllers and ending someone’s session. This gives our users an on-demand service for when they encounter a session-related issue. We have users based in California, while most of our team is based in the UK — so they can carry on working while we are sleeping!

The final bit is that this idea allows us to demonstrate the power of the Octoblu platform and how it can improve the whole XenDesktop experience for users and administrators. There isn’t a XenDesktop Connector available for Octoblu yet, so this gave me the opportunity to use the Shell Connector and run commands on the Delivery Controller using the Citrix PowerShell Snap-in.

The Octoblu flow that makes this all work!
The Octoblu flow that makes this all work!

How on Earth did we create the Self-Service feature?

The Self-Service feature has just two main components, which are connected through Octoblu:

  1. a Shell Connector – which is installed on a VM;
  2. a Slack “Thing”, which uses a SlackBot that I created to send and receive messages from Slack.

The flow is initiated when a user enters a specific slash command in Slack. This slash command is configured to send a POST call to a trigger, which is then configured in Octoblu. This trigger runs a script to find a user’s active sessions and then returns these sessions to the user via a Slack direct message in a numbered list. If the user wants to end a session, they can simply type the number of the session, and that will then send a command to end the specified session on the Delivery Controller. A status report on whether the session was successfully ended or not follows one minute later.

Example output from our resident RTSTbot

The Self-Service feature has been in action for little over a month now and has been used a good number of times by our users. It has meant that users – who are based in 3 different continents – can fix their own session-related issues at any point in the day. And why stop here? I certainly feel that with Octoblu, the possibilities for building on top of this Self-Service feature are endless.

If you have any ideas for what you think Octoblu can do in regards to XenDesktop, I’d love to hear them in the comments.

octoblu banner