Trender OPNFV

De Kernel Fablab Lannion
Trender-opnfv.png

Introduction

The tuto explains how to build your own OPNFV trender.

This trender has been shown during OPNFV Plugfest in Paris.

The goal is to display in real time the Jenkins status of Functest Jenkins Jobs. It is possible to do it per installer and per version.

The possible status are:

  • test in progress (YELLOW)
  • last run FAIL (RED)
  • last run PASS (GREEN)

What is needed

  • 3mm MDF or plywood
  • a Wemos D1 mini [1] : a micro controler arduino-like including a wifi chipset
  • a 7 neopixel led [2]: you can of course use less leds, there are possible shields with 1, 3 or 4. 7 is interesting for light effects (wave) within the box
  • Soldering iron
  • a USB cable (power)
  • Time..

The boxes

I created very basic simple boxes. The RLD file used by the laser cutter can be found on fablab-lannion github: https://github.com/FablabLannion/Trender/tree/master/variantes/jenkins/OPNFV/box Opnfv-rld.png

It basic basic shapes including

  • regular box
  • some support for the electonic
  • a styroglass support for the light (No product with Chlorine)

We use the laser cutter to cut and engave the box and the styroglass support.

20170325 115720.jpg

You can obviously customized it according to your needs.

The parameter for the cutting/engraving depends on your laser cutter and the materials..see with your Fabmanager..

Electronic part

You just have to solder 3 wires

  • GND <=> GND
  • 5V DC <=> 5V DC
  • Data IN (Leds) to a Wemos PIN (I used PIN 2)

And that is all...

Software part

Wemos D1 mini is an arduino like micro controller. I just re-used Arduino IDE [3]

See this tutorial to configure the IDE for a Wemos D1 mini [4]. You also need additional libraries (NeoPixel) [5]

The arduino code is available here

Arduino 1.1.png

The version1 is a version where the SSID is hardcoded, so you need to use the IDE, configure the SSID and its password then transfer the code to the Wemos.

const char* ssid = "Your SSID";
const char* password = "The Wifi Password";

The version 2 will scan the SSID around the object and configure the wemos as access point. Then you will have to directly connect to it, you will get a html form when connecting to http://opnfv/ in a browser (once you are connected to the wemos) This form will ask:

  • SSID
  • SSID password
  • installer
  • version

Please note that the code has been designed for Functest but can be adapted to any jenkins job: modify

String url = "/ci/view/functest/job/functest-apex-apex-daily-danube-daily-danube/lastBuild/api/json";

Note: For color blind people it is possible to play on the blinking frequencies (see fonction clignotement (blinking in French..)). You can decide to assign different frequencies to Jenkins status or even add soundspeaker if you want.

Gallery