Effective Software Delivery using Docker Containers

Martino Fornasa
clevertechbiz
Published in
4 min readJun 1, 2016

At Clevertech, we built an integrated technology stack based on Docker containers that provides local application development, building, testing, and deploy in the cloud. Containers offer big advantages in software development, quality assurance and software deployment: namely consistency, reliability and scalability. In particular, scalability is implemented from the beginning, and the system is ready to grow as the application get traction.

What are containers?

Docker Containers are an evolution of the virtual machines, which are the base of the cloud environments like Amazon AWS, providing similar benefits in a lightweight and efficient way. While virtual machines take up to several minutes to start, containers can start in a couple of seconds.

A container wraps up a software application in a small complete filesystem that contains all the components that the application needs to run: tool, libraries, configuration files: all the pieces that you usually install on a server. In this way, a container guarantees that the application will run in the same way when you move it from the developer machine, to a testing server, to the live site.

What we accomplish with containers

Fast Developer Onboarding

We remove the time waste for a developer to setup the application environment. The application runs entirely inside a container, so developers do not need to install anything on their system and they can start to code in 15 minutes. All application dependencies (software version, library version, tool stack) are provided by the container.

Anyone in my team can delete their entire project setup and reinstall everything again in 15 minutes” — Aurelien Bottazini — Sr. Full Stack Developer

We maintain our container images as minimal as possible in order to minimize download times during local development and during remote deploy. Our application containers are based on Alpine Linux Docker Image, a fully-fledged Linux environment which is only 130 MB, while providing a complete package repository.

Remove Environment Inconsistencies and Fast deployment

The application is going to work as designed locally on every environment (development server, QA server, live site). No more “it works on my machine” issues, or faults in moving from development to production environment.

With Docker there is no more: it happens only on my computer. Everyone has the same environment” — Aurelien Bottazini — Sr. Full Stack Developer

It does bring to me some piece of mind that I can more closely mimic the prod env on my own machine before pushing anything” — James Nadeau — Sr. Developer

The build process happens only once, when a new version is deployed to the development environment. A deploy to production is performed simply by moving the same container image to the live site, removing the main source of environment inconsistency. And it’s blazing fast! We deploy a new version to production in 30 seconds.

With Docker any improvement to the work environment is shared with everyone.” — Aurelien Bottazini — Sr. Full Stack Developer

Scalability from day one

A Docker application is scalable by design from day one, and scalability is simple as bringing up a new container (20 seconds). In this way, the application can grow without additional effort.

We selected Amazon EC2 Container Service (ECS) to host our application in the cloud. ECS provides a container management service and a private Docker registry, fully integrated in the Amazon EC2 infrastructure. ECS allows to configure clusters of EC2 machines, and provides easy scalability: at deploy you can configure how many instances of your application you want to run on the cluster.

Quickly recover from mishaps

If an issues reaches the production site, the container system allows to roll-back to a previous working version by simply pressing a button. The process is about rolling back to a well-known existing container, it does not involve rebuilding or testing again the application: this leads to a very quick process (30 seconds).

I like the flexibility of control it brings to production scaling and the build step/process, and the immediate rollback abilities — James Nadeau — Sr. Developer

Centralized logging

Log messages from all the application modules are collected in a single point, which allows for an effective debugging of application issues. We use the fluentd Docker driver to collect logs and Kibana to perform log visualization and analysis. Each developer is always able to consult the logs in real time and to perform historical analysis.

Testing

Application testing is integrated in the container workflow, and happens inside the container, making the tests efficient and reliable. When a test fails, the container is not deployed on the server, thus avoiding to deploy faulty software.

I now know, that what is working on my Linux machine in front of me, is going to work on someone’s Mac on the other side of the world, because Docker is going to build it the same way” — James Nadeau — Sr. Developer

Sign up to discover human stories that deepen your understanding of the world.

Published in clevertechbiz

Clevertech’s projects and business are driven by a unifying goal… helping each other and our clients meet our ultimate ambitions, professionally and personally.

Written by Martino Fornasa

Independent Consultant & Strategic Advisor | DevOps | Cloud Native — https://fornasa.it/

No responses yet

What are your thoughts?