Header background

Using the Dynatrace DevOps Pipeline State UFO

The Dynatrace DevOps Pipeline State UFO was built out of the necessity to visualize alerts, problems, health, and CI/CD pipeline state within the Dynatrace R&D organization. It sparked a cultural transformation as it made code quality that we pushed more frequently through our Delivery Pipeline more visible. You should read the background story from our Chief Software Architect Helmut Spiegl who invented the first versions of the UFO.

We officially announced the Dynatrace DevOps UFO at PERFORM 2017 as an open source project. If you want to DIY (Do It Yourself) follow the 3D printing, assembling, and code instructions on the Dynatrace UFO GitHub page. If you are not the DIY kind of person go ahead and pre-order one through our Dynatrace UFO website. If you want to see the UFO in action watch my presentation from PERFORM 2017 where I showed several use cases on how to use the UFO to visualize different types of data.

Within Dynatrace R&D the primary use case is to visualize the health state of our deployment pipelines. The top and bottom LED rings contain 15 LEDs. The two rings represent the pipeline state of the current Trunk and current Sprint. All green means that the build made it through all pipeline stages without any issues. Parts of RED mean that some phases failed, e.g: unit or integration tests.

Dynatrace R&D uses the UFO to visualize the health state of the delivery pipeline. For every engineer to see whether the current sprint or trunk is healthy

Getting Started with your Dynatrace UFO

Whether you built and printed a UFO yourself (following the instructions on GitHub), whether you purchased one from Dynatrace or whether you got your hands on one of them through other channels: You should start by checking out the Quick Start Guide which explains how to get your UFO connected to your network. Once that is accomplished you can either use the generic REST API to control the LEDs or use the existing integration with Dynatrace SaaS / Managed to display status of current open problems.

If you prefer to watch a video join my Hands-On UFO Tutorial Performance Clinic on March 16th.

Step #1: Connecting your UFO to your WiFi

Here is a quick summary of what you read in the Quick Start Guide:

  1. Plug it in!
  2. Press the little black dot on the top. The UFO starts blinking blue and now offers a WiFi hotspot with the name “ufo”
  3. Connect to that hotspot, browse to
    http://192.168.4.1
  4. Through the Web UI connect to your own WiFi. You can also do it via the REST API:
    http://192.168.4.1/api?ssid=<ssid>&pwd=<pwd>

    Remember: WPA2 works well where Enterprise WPA2 is currently not supported

  5. While it reboots itself it will blink yellow. Once it has its assigned IP Address it will start visualizing its IP Address through a special „blink code“ as explained in the Quick Start Guide!
    Remember: the UFO will also try to register its hostname as „ufo“ with your DHCP server. If that works you can simply browse to

    http://ufo

Step #2: Using the REST API

Once you browse to the UFOs Web Interface via e.g:

http://ufo

or

http://<ipaddress>

you will see a couple of sample REST API calls that already give you a sense on what is possible. Here are some of these and some more examples before I explain the individual REST API parameters:

Turn the Dynatrace Logo Off

http://<yourUFOip>/api?logo=off

Turn both rings off

http://<yourUFOip>/api?top_init=0&bottom_init=0

Background Color on Top to GREEN

http://<yourUFOip>/api?top_init=1&top_bg=00FF00

First LED on Top to RED. Remaining 15 LEDs go dark

http://<yourUFOip>/api?top_init=1&top=0|1|FF0000

First LED on Top to RED. Background Color to GREEN

http://<yourUFOip>/api?top_init=1&top=0|1|FF0000&top_bg=00FF00

First FIVE LEDs on Top to RED. Background Color to GREEN. RED Lights starts to „whirl“ (move around)

http://<yourUFOip>/api?top_init=1&top=0|5|FF0000&top_bg=00FF00&top_whirl=500

HALF of LEDS on TOP morph from RED to Background Color GREEN

http://<yourUFOip>/api?top_init=1&top=0|8|FF0000&top_bg=00FF00&top_morph=2000|5

LEDs 2-3, 6, 10-12 on BOTTOM are BLUE with GREEN Background

http://<yourUFOip>/api?bottom_init=1&bottom=1|2|0000FF|5|1|0000FF|9|3|0000FF &bottom_bg=00FF00

Rest API Explained

I hope the examples already gave you a good overview of what is possible with the REST API. The examples contain all the available REST API parameters to control the logo and each LED of the top and bottom ring.

This is the easiest api. You simply pass logo=off or logo=on to turn on/off the Dynatrace logo on the bottom of the UFO

Turning ON certain LEDs on one of the RINGS

We can clear current color settings for both rings using top_init=1 or bottom_init=1. Now we can specify which LEDs we want to light in which color. For that we use the top or bottom parameter which has the following syntax: top=LEDINDEX|NUMBEROFLEDS|COLOR[|LEDINDEX|NUMBEROFLEDS|COLOR][…]

  • LEDINDEX is 0-based and goes from 0 to 14
  • NUMOFLEDS can be between 1 and 15 and defines how many LEDS starting with LEDINDEX should get the defined color
  • COLOR is an RGB representation of the color, e.g: 00FF00 for GREEN

Here are some additional examples

http://<yourUFOip>/api?top_init=1&top=0|1|FFFFFF: 1 LED with Index 0 goes WHITE

http://<yourUFOip>/api?top_init=1&top=5|5|FF0000: 5 LEDs Starting at Index 5 go RED

http://<yourUFOip>/api?top=12|1|0000FF: Additionally 1 LED with Index 12 goes BLUE

http://<yourUFOip>/api?bottom_init=1&bottom=0|14|00FF00: ALL 15 Bottom LEDs go RED

http://<yourUFOip>/api?bottom=0|2|0000FF|10|2|00FF00: LEDs 0 & 1 go BLUE, 10 & 11 go GREEN – REST stays RED

Whirling Colors

Once you have specified colors for LEDs you can let them WHIRL clockwise. The parameter is either top_whirl and bottom_whirl where the number indicates the speed. The range goes from 0 (no movement) to about 510 (very fast). Once set the whirl continues until you either set the value to 0 or you initialize the ring with _init.

http://<yourUFOip>/api?top_init=1&top=0|1|FF0000&top_whirl=300: 1 RED LED will whirl around

http://<yourUFOip>/api?top_whirl=0: we STOP the whirling

Setting a Background Color for a Ring

If you want to have a solid background color for those LEDs that currently have no specific color set you can do this with top_bg=COLOR or bottom_bg=COLOR:

http://<yourUFOip>/api?bottom_bg=FFFFFF: all LEDs that currently do not have a color will be white

Morphing from LED Color to Background Color

The last API is a morphing feature where you can specify how long to stay on your current LED Color and how fast it morphes to the background color before it goes back to the LED Color. This will then be done in an infinte loop like the whirling!

The syntax is:

top_morph=STAYONLEDCOLOR|SPEEDOFMORPH

  • STAYONLEDCOLOR is a number in milliseoncs the original LED color remains before morphing starts
  • SPEEDOFMORPH: Range between 0 (very slow) and 10 (very fast)

Here is one example:

http://<yourUFOip>/api?top_init=1&top=0|5|FF0000&top_bg=00FF00&top_morph=1000|5: after 1000ms will morph the 5 RED LEDs into GREEN with moderate speed

Send me your examples

Over the last couple of weeks I had the pleasure to promote the UFO at PERFORM 2017 but also at several events in New Zealand, Australia and Singapore. I was overwhelmed with the positive feedback and great ideas people came up with:

The Dynatrace DevOps UFO exploring and exciting the world!

I hope you have as much fun with the UFO as I have. I am looking forward to examples on what type of data to visualize. Whether it is the state of a Pipeline, the current number of open support tickets, SLA violations or simply the outside temperate J – the sky is the limit.