Building A Simple Prometheus ExporterAugust 26, 2019

Prometheus and Grafana team up nicely to collect and visualize various monitoring data. But at times you need to monitor also entities that do not provide proper monitoring capabilities by themselves or you do only have limited access to. Quickly setting up a Prometheus exporter from those existing building blocks would come in handy. Here‘s how to do this.

Keep Reading →

Continuous Deployment Pt. 2 - Deploying Docker Containers with Ansible from GitLabAugust 20, 2019

Let us assume, you have a GitLab running somewhere and another server, you want to deploy Docker images to. There a things that need to be taken care of. Maybe you want to deploy the same software in parallel (think of test systems, for example), maybe you need to orchestrate not one but many docker images into one working system? Also, the target system is probably somewhere "remote" and you want to use a secure channel to deploy your software.

Keep Reading →

Continuous Deployment Pt. 1 - Making Docker Containers Accessible with TraefikAugust 10, 2019

Imagine you have a piece of software you want to make accessible on the internet and that the software is packed as a Docker image. Imagine further, you want to (re-) deploy the software often, under a specific sub-domain, with a Lets Encrypt certificate, and maybe you require a simple form of access control. Once you have discovered how to do all of this painlessly, you want to repeat the process not for just one piece of software, but a bunch of it. Rinse and repeat.

Keep Reading →

Pagination and sorting for REST interface with SpringJune 19, 2017

Spring Data Rest has the ability to generate a CRUD REST layer based on Spring Data Repositories and their entities. This works quite nice and also includes an approach for pagination and sorting of the results. When the automatically created interface does not fit your needs and you are not able to configure it in the way you want it might makes sense to retain the pagination approach in manual implementation.

Keep Reading →

Micro service setup with Spring Cloud NetflixJune 17, 2017

There are many many ways how to set up a micro-service based application. The following article demonstrates how the Spring Cloud Netflix libraries can be used in order to build such an infrastructure. Besides the Spring stuff Hazelcast is taken as technology for session distribution.

Keep Reading →

Using Docker in JenkinsJanuary 19, 2017

Docker can be used nicely within your CI process in order to build and test your application in a real isolated environment. Gitlab (CI) integrated this possibility natively within the build as soon as you have configured it properly. Unfortunately, Jenkins does not offer this functionality out of the box. There are some plugins available that try to provide Docker related functionality but I was not able to set them properly and I needed an immediate solution. Hence, in the following I demonstrate how to set this up by hand.

Keep Reading →

PostgreSQL, JSON and HibernateDecember 08, 2016

NoSQL databases are hip these days. But good old relational databases can also be quite nice and even nicer databases systems like PostgreSQL have super-nice features, like JSON support, effectively allowing to store documents NoSQL-like without losing the advantages of relational databases.

Keep Reading →

Serving files with JAX-RSJuly 08, 2016

Although it is a very common requirement, serving files with Jax-RS can be challenging. Especially, if you want to provide media files like MP3s or videos and you expect e.g. chrome to be able to seek through these files, then you must support range requests. Furthermore, you want to avoid to load a whole file into the memory each this file is requested. In the following it will be described how to serve files with Jax-RS. (If you do not want to use Jax-RS there is also a widely used implementation of BalusC directly implemented in a servlet.)

Keep Reading →

Process management with dockerApril 15, 2016

Docker starts one process, only. So if you want to put an application in a docker container which requires more than one process, you need to manage the processes yourself as processes may exit or crash unexpectedly. Supervisord is a toll which will help in these events. Here's how to use it.

Keep Reading →