Trender OPNFV

De Kernel Fablab Lannion
Aller à : navigation, rechercher
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)

Of course, everything can be customized and if you prefer map PASS with BLUE light it is possible....

Enjoy building your OPNFV Trender!

If you want one but do not have time/access to the machine, the fablab of Lannion can build one for you (even if our philosophy is to invite people to do it by themselves by sharing all the procedure to do as it is done in the page hereafter), send a mail to contact AT fablab-lannion.org for a quotation.

Precise the title "OPNFV trender", precise also the customization you want (jenkins chain you want to monitor, evolution of the SVG (other logos), color blind adaptation, ...)

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

The RLD includes

  • regular box (CUT)
  • some support for the electonic (CUT)
  • a styroglass support for the light (CUT en ENGRAVE)

We use the laser cutter to cut and engave the box and the styroglass support (no chlorine).

20170325 115720.jpg

You can obviously customize it according to your needs

The parameters 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)

Screenshot 2017-05-07-10-13-45.png

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