Posts
- Mar 30, 2019
Measuring Traffic with iptables
I recently read about a neat method of measuring traffic with iptables on linux hosts, which is nice for pentesting or infrastructure debugging. This is a rather short post describing that approach.
Read more - Feb 9, 2019
Jenkins-as-Code Part III | JobDSL
The 3rd part of the Jenkins-as-Code series focuses on the automated creation of job interfaces. That could be achieved with pure groovy scripting as used in the previous part. However, the JobDSL plugin offers a more convenient and clean way, so we will focus on that.
Read more - Jan 12, 2019
Jenkins-as-Code Part II | Configuration
This is the 2nd part of the Jenkins-as-Code series. In this part we will focus on configuring Jenkins through code. The goal is to avoid manual configuration in the UI and instead leverage the configuration as code plugin and configuration scripts in a central Github repository which are executed by a Jenkins pipeline.
Read more - Jan 6, 2019
Jenkins-as-Code Part I | Initial Setup
This is the beginning of a series about full Jenkins automation. I am calling that approach jenkins-as-code. The goal is to configure every aspect of Jenkins and its pipelines from a central git repository. We will leverage groovy scripting, jobDSL and shared libraries to not only codify the build/deploy pipelines (pipeline-as-code), but to also bootstrap and configure Jenkins from scratch (e.g., credentials, authorization, theme and job setup).
Read more - Sep 9, 2017
My Consul Service ID hunt
This is a rather short post about a recent annoying issue I stumbled across. As the title suggests I wanted to retrieve the ID of a service from a consul node. Easy as this may sound, the documentation is not very clear about what the service ID really looks like or how I can find it. (FYI: At the time of writing I was running consul
Read more0.8.1
and vault0.7.0
) - Nov 21, 2016
A Docker Build Pipeline as Code with Jenkins
Since quite some time now we are no longer satisfied with only having our App Layer as code in repositories, but we also want every other component of our system codified. After Infrastructure as Code (e.g., Terraform) and Configuration as Code a.k.a. Continuous Configuration Automation (e.g., Ansible and SaltStack) approaches, we also want our automation itself codified: Pipeline as Code!
Read more - Jun 2, 2016
Ansible role structuring
In this short post I want to talk about structuring Ansible roles in a way that OS specific tasks and variables are cleanly separated from the other common logic of the role.
My main sources of inspiration for role structuring are Ansible Galaxy and the DebObs repository and I would like to share my findings here.
Read more - Apr 2, 2016
Testing ansible playbooks with ansible-vault encrypted data using Travis CI
In this post I want to talk about using ansible-vault to encrypt secret variables and templates in your ansible roles. Further, I want to have a look at how to test those playbooks and encrypted files using Travis CI.
The combination of ansible-vault and Travis CI seems a little odd on first sight and I must admit I’ve had trouble finding a proper way of handling private data in a public repository with an external and also public CI environment. Here is some little background information why I still chose such an approach:
Read more - Jun 25, 2015
Computing Large Binomial Coefficients Modulo Prime / Non-Prime
Not rarely, in combinatoric problems it comes down to calculating the binomial coefficient \(n \choose k\) for very large \(n\) and/or \(k\) modulo a number \(m\). In general, the binomial coefficient can be formulated with factorials as \({n \choose k} = \frac{n!}{k!(n-k)!}, 0 \leq k \leq n\). The problem here is that factorials grow extremely fast which makes this formula computationally unsuitable because of quick overflows. For that reason, many problems in that category require the calculation of \({n \choose k} \mod m\). In this post I want to discuss ways to calculate the binomial coefficients for cases in which \(m\) is prime and when \(m\) is non-prime.
Read more - Jun 15, 2015
Another Python BrainF*** Interpreter
BrainF*** (BF) is a famous esoteric programming language. Writing an interpreter for BF is actually easier or should I say at least easier to comprehend than writing an actual BF
Read moreHello World!
program. Even though BF can theoretically be used to write any program, it is not practical to do so because of its low abstraction level. I guess that’s one reason why it feels like I find more BF interpreters written in all kinds of languages scattered over many tech blogs rather than actual BF programs. Still, since I had a free day, a nice cold drink and the urge to script something I decided to add yet another Python BF interpreter to the web. Though for Python BF there are some nice one-liner code-golf-like versions out there, I chose the simpler approach of writing a structured, easy to comprehend version. - May 18, 2015
Common Bitwise Techniques for Subset Iterations
Some problems, especially in combinatorics require to iterate over subsets of a given 1-dimensional array with \(N\) elements. There are different ways to approach this topic, but the most common and elegant solutions in my opinion involve bitwise operations.
I recently stumbled across a problem that required me to iterate over the Power set of an array, which is why now I want to discuss some common bitwise techniques
Read more - Apr 12, 2015
Measuring Bandwidth and Round-Trip Time of a TCP Connection inside the Application Layer
Recently, I had to measure the bandwidth and round-trip time of different simultaneous TCP connections in order to estimate optimal traffic distributions over different interfaces. That’s why in this post I want to cover how to measure the goodput (i.e., the application level throughput) and round-trip time of a TCP connection inside the application layer. We will measure both metrics while we download a file via HTTP (since HTTP is implemented on top of TCP).
Read more - Mar 2, 2015
Functional headless UI testing in Django with Selenium
After setting up a basic Django CI for standard unit tests in my last post, I now also wanted to add functional UI tests with Selenium to my testing procedure. That’s why in this post I want to cover how to setup a headless functional test environment for Django projects on a Debian 7 server. In the end of this post we will also see a simple Django UI test case example.
Read more - Feb 22, 2015
Setting up a Django CI with Jenkins and Git
After experimenting with Django for a while now, I decided that it is time for a Continous Integration for Django on my server in order to start some long-term projects. This is why in this post I will describe how to setup Jenkins for Django projects on Debian servers to detect changes to a Git repository, run tests in case of changes and deploy them on your Apache Server.
Read more - Feb 6, 2015
Dynamic login messages with update-motd
Some time ago I was setting up my Debian server and I wanted to have a customized message on each login. In this post I will briefly introduce an easy way on how to create dynamic login messages which display a random session quote and some important system performance counters and information. This introduction is targeted for Debian and Ubuntu, because we will use the update-motd framework.
Read more - Jan 25, 2015
Intercepting / Hooking function calls to shared C libraries
I recently had to intercept function calls to my C socket library in order to implement a prototype for a Multi-source Multipath network protocol. That is why in this post I want to give a simple introduction on how to use the
Read moreLD_PRELOAD
environment variable to override shared C libraries. Further, I am going to show how to usedlsym
to make calls to the original C functions from within our hooks. - Jan 21, 2015
A pure Java DCOM Bridge with j-interop
For a past project I had to develop a Java DCOM bridge with j-interop (version 3.0) and in this post I want to share my findings on this topic.
j-interop is a free library for pure Java DCOM bridges to Windows WMI devices. Sadly there haven’t been any updates for about 2 years now, but for me this library worked magic.
Read more - Jan 16, 2015
Enabling DCOM for Windows 7, 8 and Server 2012
On a past project I had to develop a DCOM bridge. In this post I want to share my findings on how to prepare a Windows Machine for DCOM access.
For most DCOM bridge solutions, the
Read moreWbemScripting.SWbemLocator
class (WMI locator) is essential to gain administrator DCOM access to the computer. Having DCOM access to this class is very powerful (e.g., you can listen to any kind of events on the machine, you can retrieve performance counters etc…), which is why on Windows 7/8 and Server 2012 gaining access to it turns out to be more complicated than simply clicking a few check-boxes in the System Controls.