Jenkins “ghost” slaves

I use Jenkins a lot at work. We have quite an expansive setup; tens of agents and hundreds of jobs. We run specific jobs on specific agents based on labels. For a while we had some labels show up on our Labels Dashboard that we’re listed as having no Jobs, but one slave; a “ghost” slave. However when going into the page of the specific label the agent/slave was not showing anything. 

After some investigating with some Groovy script through the console I found there exists a slave in the configuration without a computer. To remove it (and resolve my label issues) I ran the following script:


for (slave in Jenkins.instance.slaves) {
  if (slave.getComputer() == null) {
    println(slave)
    Computer computer = slave.createComputer();
    computer.setTemporarilyOffline(true,null);
    computer.doDoDelete();
  }
}

Things I Mean to Know

I regularly listen to podcasts in the car. One of the podcasts I follow is This American Life. Sometime ago they put out an episode titled “Things I Mean to Know“. This triggered me into creating a list for myself. Not necessarily to blog about it, but to have a grand feeling of what technologies I can say I do know something about and what not.

Funnily the podcast goes into quite the opposite opinion; that such lists are just a burden. During my work I regularly speak to customers, partners and other technical people. Usually new technologies come up and I want to be able to have at least a general idea what it is about!

So here a broad list of Things I Mean to know; mostly pulled from Gartner. (story behind)

  • Data science and big data
  • Quantum computing
  • Digital twin
  • Serverless, edge computing and IoT platforms
  • Volumetric displays (Holograms)
  • Deep learning, machine learning

This post is a reminder for myself to report back to you, my readers, about what I’ve learned and to explain what is worth diving into or what can be ignored.

In another future post I will dive into things I’ve already digged into last year (2017) and that I’m currently experimenting with; Things I’ve Learned About.

Time-lapse Wind turbine construction

As per usual; I started something that I never finished! This time it was a time-lapse of a wind turbine construction right in front of our view from the office (16th floor). I bought a power supply and used Cannon’s remote shooting functionality to create the video below. I used my Cannon EOS 1100D body with a lens from my dad.

I still have the original images logged to my disk somewhere, but I don’t think I’ll make any attempts at a better video any time soon. So here it is;

[youtube]https://www.youtube.com/watch?v=cQS2MMYO3sU[/youtube]

While making this video I made several newbie mistakes;

  • Considered and started filming when construction was already at 20%, so I missed the first few interesting crane-loads.
  • For the first few days I placed my camera on a carton box in front of the window; not considering the box increases and shrinks in size from the sunlight warming it up.
  • Did not implement some kind of automated warning for when the connection between camera and pc failed (which it did at some deciding moments).
  • Forgot to cut the images to YouTube’s aspect ratio before creating a video.
  • Did not add any audio, although what fits a time-lapse like this?

Next time, if there is ever one, will be better ^^!

Reading habbits (in 2017)

After turning 29 years old (about 3 years ago) I noticed how quickly my twenties passed and how quickly time passes when you get older. So much things left undone, so much still to learn, so little time left in life. As a youngster I was an avid reader and read late into the night, even upsetting my parent because the little sleep I got.

During my twenties I mostly read study books and gradually more and more articles and content on the web. I watched massive amounts of tv-series and movies to get my drift for interesting stories and to enrich my fantasy. This went at the expense of books.

Currently the most prominent or interesting movies and TV-series are based off of books. Even older cult and popular movies such as Fight Club, Jurassic ParkThe Godfather and many more are based off of books! One of my favorites novels was adapted to a movie as well; World War Z.

So I decided to start reading more as this form of stories allows for a wider imagination and use of your own fantasy. It pulls you deeper into the story and keeps you entertained much longer than the two hours most movies wrap the story into.

This year (2017) I’ve read 8 books; (still way below the global average of 12!)

  • The Faults in our Stars – John Green (Amazon)
  • Ready Player One – Ernest Cline (Amazon)
  • Jurassic Park – Michael Crichton (Amazon)
  • The Lost World – Michael Crichton (Amazon)
  • The Case for Mars – Robert Zubrin (Amazon)
  • Fight Club – Chuck Palahniuk (Amazon)
  • Aurora – Kim Stanley Robinson (Amazon)
  • Sapiens: A Brief History of Humankind – Yuval Noah Harari (Amazon)

Tracking Screen Time

Today, I once again saw and read an article about the way we’re all attracted to use apps on our smartphone more and more. By giving us for every interaction a small meaningless reward. It is becoming an increasingly mainstream topic; we’re all controlled by the giant (social-)media and app companies to continuously spend time using their apps or services. All of us are wasting time by trying to maintain a social profile towards people that already know and care about us.

I myself am quite aware that my smartphone is really dear to me, and that sometimes I use it way to much.

The article offered an app to track your screen time usage on your smartphone; Moment. However it wants you to take screenshots of your battery & app-usage every week, something I’m sure I will forget someday. And it tracks every app individually, which is something I’m not that interested in or want to share with another company.

Another app which is less extensive but gives just the right amount of information without any extra effort is RealizD. Below an example of my usage of the last month. 

Any conclusions or changes about my behavior will follow in 2018!

To be continued..

Quick FBX Inspector

This week I came across a simple option to inspect FBX files, something I’ve always wanted to have. It’s not a native solution or does not have fancy GUI or has a 3D viewer. It’s a framework to use the FBX SDK using .NET. The sample that comes with it, does just what I need!

At Soltegro we’re working with BIM models in the form of Revit, Navisworks or AutoCAD files. Each of these pieces of software can transform these files into FBX files, however they all do it differently. And to that end I’m looking for a way to inspect the FBX files, and it’s internal tree, before importing them into Unreal Engine 4.

You can find the tool on GitHub; https://github.com/Kolky/ManagedFBX. Thanks to returnString for the first version. 

I’ve modified it slightly to support the FBX SDK 2016 v1.1 used by Unreal Engine 4.16. And made it support FbxProperties and expanded the sample to be more versatile. I might add a WPF version of the Sample and also more FBX info in the future. But for now it does what I need!

Managed FBX Sample

AnyStatus ‘support for Jenkins MultiBranch’

Two weeks ago I came across a plugin for Visual Studio; AnyStatus. It gives you the ability to keep track of all kinds of services/servers while working in Visual Studio. It lacked the ability to track Jenkins MultiBranch projects, what we use a lot at my work; Soltegro. Since the API was straightforward and freely available in GitHub, I decided to develop it myself. And as of this week it has been merged into the Plugins dll; Pull Request 4.

The code could use some extra work, when the API introduces a better way for managing and creating sub-items. There is still discussions going on about this; Issue 2.

Allium ‘Google Analytics v3 Tracker in C#’

Lately I’ve been looking into NuGet packages and libraries on GitHub to add Google Analytics tracking in .NET WPF applications. There are quite some that offer ways to do this, see the links at the end. They all however have their limitations; either they lack support for WPF (and it’s hard to add) or they use older versions of the Google Measurements Protocol. It’s a shame that Google hasn’t released a tracking library itself! Their Analytics Reporting API is quite good!

So I’ve decided to create my own solution, Allium. As of right now, it is still WIP and untested.

Here is however an extremely simple usage example, which will not change much during development;


using (var session = new AnalyticsSession("UA-XXXXX-YY"))
{
  session.TrackScreenViewHit("ThisWindow");
}

Inspired by;

Jenkins ‘Build back to normal’

Yesterday, I finished porting our Jenkinsfile to use the new Declarative syntax. It makes the flow of processing a lot more straightforward and it’s great for handling errors and post actions. However getting everything to work again was tricky!

I was looking to send an e-mail and Office365 notification when a build returns to normal. Others updated the status of the current build during their steps, as seen on stackoverflow and here. I managed to do it slightly different without having to manage the current state;

pipeline {
  agent any
  post {
    success {
      script {
        if (currentBuild.getPreviousBuild().getResult().toString() != "SUCCESS") {
          echo 'Build is back to normal!'
        }
      }
    }
  }
}

For more details on the syntax of declarative pipelines, I’d recommend this site.

Race for the Galaxy

Acquired a new board-game; Race for the Galaxy. A card game with some bizarre complex rules. After explaining you’ll need a game or two to get used to the concepts introduced. But after that you will notice the themes and interactions between cards, which enables the game fully and gives it plenty of replay value with new combinations each game…

rftg