My PyCon-IL 2017 Slides

I’m going to be giving a talk at PyCon Israel 2017 about Jenkins and Python.

Here are the slides I will be using for that lecture:

CI tools testing lab: Adding Gerrit

indexIn this post I’m going to describe how I quickly brought up Gerrit using Docker in a lab setup, and integrated it with Jenkins.

This post is the second in a series of posts describing how I’ve used Docker to build a lab setup on my laptop to try out Zuul and check out its various features.

Please see the previous post for an explanation of my goals, choice of tools and work done previously.

Since I’m focused on testing Zuul, I did not want to spend too much time setting up Gerrit. Instead I looked for a ready made container image that I could quickly bring up.

Continue reading

CI tools testing lab: Initial setup with Jenkins

226px-jenkins_logo-svg Gerrit, Jenkins and the Jenkins Gerrit Trigger Plugin make for a relatively easy way to setup an automated code review system. Using these components, you can have Jenkins run automates tests on code while it is being reviewed in Gerrit.

But as projects grow in complexity and amount of developers, some shortcomings of of this system become apparent as the reviewed code being tested in Jenkins stops reflecting the way it will actually look when merged into the main development branch. This is an issue we came across on oVirt’s CI system.

Looking for a solution, we found Zuul – a tool developed by the OpenStack community when they faced similar issues.

This post is a first in a series of posts describing how I’ve used Docker to build a lab setup on my laptop to try out Zuul and check out its various features.

Continue reading

D: A native-compiled programming language that has every conceivable feature

Didi programmingThe release of Google’s ‘Go’ language seems to have shaken the world of computer languages in general and native-compiled languages in particular. That world was exclusively dominated by C and C++, but now we’re seeing more and more new languages appear and gain programmer mind-share.

In recent years, it seems the progress of programming languages was happening mainly in the realms of interpreted languages and byte-code-compiled languages. Native-compiled languages looking to attract developers accustomed to the convenience of those languages must provide similarly convenient features. The D language is no exception for this rule, hence it provides the following features:

  • Type inference – So programmers don’t need to manually specify the type of each variable.
  • Automatic memory and resource management. D includes a garbage collector as well as a ‘scope’ statement that allows setting up code to always run when exiting the current scope (Looks and feels similar to the ‘trap’ statement of shell languages).
  • Built-in high-level data structures such as hashes and dynamic arrays.

Continue reading

My pet peeve with YAML

YAMLYAML is a popular data encoding language. Its data model is similar to JSON‘s data model where data is described in terms of strings, numbers, arrays and hash-maps. In fact, YAML is a super-set of JSON that includes indention-based syntax to make it easier for humans to read and write it.

YAML is very popular. Libraries for reading and writing it had been written for most, if not all, programming languages. It is used as the basis for the configuration DSL of many tools including Ansible, Puppet’s Hiera, and Jenkins Job Builder.

The use YAML as the basis for DSLs in which complex and extensive configuration is written by hand, eventually exposes one to the language’s shortcomings.

Continue reading

Cap’n Proto – An interesting data exchange format and RPC scheme

Cap'n ProtoCap’n proto is a Remote Procedure Call (RPC) library designed by the author of Google’s Protocol Buffers.

The author set upon improving Protocol Buffers by defining the data exchange format used by Cap’n Proto in such a way that the same format can be used to store the data in memory or disk. This enables software to be written in such a way that it avoids the costly step of encoding the data before sending it over the network. This capability had been successfully used to optimize Debian’s code search.

Cap’n proto has another interesting feature where it can transparently use information about the remote API being invoked, to collect successive calls together in a single network packet, thereby reducing network round-trip times.

Rust: a compiled programming language with an interesting memory model

The Rust logoRust is a programming language that compiles into native machine code. Despite being a static-typed, compiled language, Rust contains many features typically found in interpreted, dynamic-typed languages such as:

  • Closures
  • Type inference (E.g. no need to specify type for everything)
  • Multi-variable assignment syntax
  • For loops that run over collections (typically called ‘for-each’ in other lnaguages)
  • ‘If’ treated as an expression rather then a statement
  • A classless object system that allows one to use object-oriented syntax without having to maintain complex class hierarchies (Ruby`s ‘open classes’ without classes)
  • A build tool that can resolve module hierarchies without resorting to things like C`s ‘#include’
  • Generics and Traits that would let you do most things you would otherwise use ‘duck typing’ or class inheritance based polymorphism to do
  • Macros that let you create mini-DSLs

Continue reading

Remote-controling Linux from any mobile device

Remote ControlsRemote-controlling desktop computers from mobile devices is an idea that is typically implemented in the form of an Android/Iphone app that connects to the controlled computer over SSH, VNC, RDP or some proprietary protocol typically requiring a closed-source server component.

It had occurred to me a while ago that it shouldn’t be too difficult to write a webapp that would turn any mobile device with a web browser into a remote control for the server its running on, and I was wondering why I didn’t see any implementations of that idea around.

Well now there is one such implementation in the form of “Linux Remote Control“.

Continue reading

News Digest

List of things I find interesting and think people should know about:

  • Caylon is a new programming language from RedHat that is meant for large system development and can run on both the Java virtual machine (JVM) and web browsers’ JavaScript engine. This makes it useful for programming both the client and server-side components of modern applications.
  • Bad Bios is the nickname given by Dragos Ruiu, an apparently well-known security researcher to a new type of malware found in the wild that seems to be able to infect computer BIOS components directly and then escalate the attack in infect all popular operating systems, Linux-based ones included. Not stopping there, it also seems this malware is capable of communicating with an infected computer even when all its communication components have been disconnected. It seems to do this by utilizing high-frequency sound-waves. This technique of using sound to facilitate communications with otherwise disconnected computers was also explored by scientists from Germany.
  • InfiniSQL seems to be one man’s projects to produce a very scalable multi-node database. It seems to be network-protocol-compatible with PostgreSQL and may have an interesting future.
  • Webminstats is a server performance statistics collection plug-in for Webmin. Used together those tools can provide a useful monitoring and management solution (although not very pleasant looking, though that can be somewhat  remedied) for small to medium sized networks.
  • ExplainShell is a new web-based tool for  breaking down complex Linux shell commands and explaining their components. It was recently open-sourced and seems to have a good potential of becoming a very useful tool for people trying to learn Linux shell usage and scripting. The developer was even kind enough to include a readme file listing instruction on how to run your own copy of the website.

JavaScript is killing the borwser plug-in, are servers next?

Browser plug-ins were never very popular, for once, web developers could never count on users bothering to install them. It came as no surprise when most plug-ins were replaced by the one true plug-in. But Flash had the nasty side-effect of turning the web into Adobe’s playground. That effect was starkly clear on Linux, for example, where regardless of how good Firefox and Chrome get, Youtube still sucks because Flash on Linux isn’t getting the developer attention it should.

Attempts to finally put Flash out of its misery have concentrated around HTML5 video which brought along its own set of problems in the form of incompatible and patent encumbered implementations. Now, it seems, there is a new approach aiming to solve all those age old problems.  With browser JavaScript becoming strong enough to decode video, suddenly you don’t need to wait for plug-in or browser support to play that video from that website.

As JavaScript seems poised to do away with video plug-ins and codecs, its might also do away with webservers. suggests a development approach where web applications would be implemented entirely in JavaScript with little-to-no need for an application server. This approach has interesting implications with regard end-user privacy and security as well as application robustness.