Elasticsearch, Logstash, Kibana (ELK-stack) and Logspout on Docker

Contents Update on 20th of July 2015! As the BusyBox image’s package manager opkg [doesn’t work anymore I have switched to using Alpine instead]({% post_url 2015-07-20-switching-to-alpine-from-busybox %}). The example images and commands have been updated. At the same time the Dockerfiles have been modularized to help update the tool versions. Note As versions of the tools have changed considerably from the time of the [original blog post]({% post_url 2014-12-29-logstash-and-logspout-on-docker %}), I decided to republish this instead of updating the old post. Now the tool versions are: ...

June 26, 2015 · 5 min · Ilkka Anttonen

'Meteor example with CoffeeScript, Stylus and Jade'

Contents General I have been checking out Meteor periodically since about version 0.5. It was officially bumped to version 1.0 a while a go and is now at 1.1.0.2, so I decided that now it’s a good time to see how mature it is. While playing around with it in the past I’ve usually used CoffeeScript which is easily done as Meteor has a good package management system and CoffeeScript was a native package. Same goes with Stylus. Changing the HTML templating engine used to be harder, but now packages can also be used for that and I like the Jade syntax, which is very concise, better than SpaceBars syntax that is the default for Meteor. ...

June 17, 2015 · 4 min · Ilkka Anttonen

Using HAProxy and Consul for dynamic service discovery on Docker

Contents Update on 20th of July 2015! As the BusyBox image’s package manager opkg [doesn’t work anymore I have switched to using Alpine instead]({% post_url 2015-07-20-switching-to-alpine-from-busybox %}). The example images and commands have been updated. Update on 7th of October 2015! Updated the example commands as the image has later been modified. (Thanks Robert for the heads up) General As I have been using Docker more I have started going towards simpler, stand alone containers. This aligns well with the current rise of microservices. To effectively use microservices a mechanism for service registration and discovery is needed so that the benefits of easy scaling can be realized. ...

May 18, 2015 · 8 min · Ilkka Anttonen

Spring Boot with Scala on Docker using Gradle

Contents General I started experimenting with building containers using Gradle as part of a development cycle with minimum duration feedback cycle and maximum portability for Microservices. I’ll write a bit more about that later, but thought that documenting this process of creating and publishing a container would be useful. At the same time I wanted to combine Spring Boot and Scala, so this also acts as an example for that. ...

April 8, 2015 · 3 min · Ilkka Anttonen

Setting up a new Mac

This post outlines how to set up a new OS X Yosemite with sane default dotfiles and basic applications. Dotfiles are heavily influenced by Mathias Bynes. Install brew 1 ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" Install brewdler Updated on 9.3.2015 1 brew tap Homebrew/brewdler Clone dotfiles 1 git clone https://github.com/SirIle/dotfiles.git ~/.dotfiles Run brewdler 1 2 cd .dotfiles brew brewdle Run RCM 1 2 rcup rcrc rcup -f Make GNU bash default shell 1 2 echo "/usr/local/bin/bash" | sudo tee -a /etc/shells chsh -s /usr/local/bin/bash Install NPM as non-root 1 2 echo prefix=~/.node >> ~/.npmrc curl -L https://www.npmjs.org/install.sh | sh Add a ~/.extra to contain non-github stuff 1 2 3 4 5 6 7 8 9 # Git credentials # Not in the repository, to prevent people from accidentally committing under my name GIT_AUTHOR_NAME="Ilkka Anttonen" GIT_COMMITTER_NAME="$GIT_AUTHOR_NAME" git config --global user.name "$GIT_AUTHOR_NAME" GIT_AUTHOR_EMAIL="ilkka.anttonen@accenture.com" GIT_COMMITTER_EMAIL="$GIT_AUTHOR_EMAIL" git config --global user.email "$GIT_AUTHOR_EMAIL" git config --global credential.helper osxkeychain

January 26, 2015 · 1 min · Ilkka Anttonen

Dockerfile and container image size

General As I was creating a [minicontainer (minibox)]({% post_url 2014-12-31-fat-containers-microcontainers-and-minicontainers %}) (container that is based on BusyBox, but still contains everything that is needed to run as standalone without the need to use volume containers) I noticed that the resulting containers were way larger than they should have been. I only started paying attention to this as I was trying to create as small a container as possible. After inspecting the resulting image with docker history I noticed that the steps that were executed while installing packages, like having the file downloaded, unpacked using gunzip and after that unpacked using tar all left a large intermediate container in the history. ...

January 1, 2015 · 5 min · Ilkka Anttonen

Java 8 JRE minicontainer with BusyBox on Docker

Update on 31.3.2015 Updated the Java version to 1.8.0_40. Installing Java 8 on BusyBox After spending [some time]({% post_url 2014-11-06-Microservices-in-Microcontainers-with-Docker %}) with [microcontainers]({% post_url 2014-12-04-java-and-nodejs-in-microcontainers-with-docker %}) I got interested in trying to make the smallest feasible self contained container that includes a working recent Java 8 JRE. I’m fond of using BusyBox (especially progrium/busybox) as the base image as it contains most of the libraries needed to be usable while still being under 5 MB in size. ...

January 1, 2015 · 2 min · Ilkka Anttonen

Fat containers, microcontainers and minicontainers

General The learning curve of Docker seems to go in the following order: trying to get existing applications to run in containers in any way possible while minimizing the changes to the applications trying to minimize the container size and to adhere to Docker best practices like one process per container going overboard with minimizing container sizes and heavily using volume containers for sharing common files between the containers finding the middle ground between extremes and using the smallest possible base image and minimizing the container size while still having the containers portable ...

December 31, 2014 · 3 min · Ilkka Anttonen

Logstash and Logspout on Docker

Update 26th June 2015 A newer version with more recent versions of the components can be found [here]({% post_url 2015-06-26-elasticsearch-logstash-kibana-and-logspout-on-docker %}). The old examples may not run properly as the images have been updated with new versions of tools. Especially kibanabox needs to be built by hand as the DockerHub now builds the Kibana 4.1 image. General When I was using fat containers, I used rsyslog to pass the log messages to a centralized container which had Elasticsearch, Logstash and Kibana installed. This combination is also known as the ELK-stack. After moving towards microcontainers I wanted to separate the logging logic from the application containers. Orchestration is still an issue with using multiple simple containers, but at least the application containers shouldn’t need to know anything about the logging architecture as long as they can log to stdout and stderr so that Docker can pick the logs up. ...

December 29, 2014 · 4 min · Ilkka Anttonen

Java and Node.js in Microcontainers with Docker

This article was also published in DZone. In the [first article]({% post_url 2014-11-06-Microservices-in-Microcontainers-with-Docker %}) I presented a way to create Microcontainers which use volume containers to share runtimes and executables so that the actual application containers can be kept small. The containers are based on BusyBox (progrium/busybox) and necessary libraries are symbolically linked so that the executables work in the very light environment. In this article I take the concept forward with a Java runtime environment and service registration and discovery using Consul. ...

December 4, 2014 · 11 min · Ilkka Anttonen