Helsinki Region Transport and Finnish Transport Agency embarked on a joint venture to build the next generation journey planner, for both capital area transport systems and Finland’s regional transport authorities. In Helsinki the system replaces the already popular Reittiopas previously based on a CGI product, which covered Helsinki capital area transport systems.
Microservices Architecture and Docker
When the new Digitransit team started developing the replacement system they decided at an early stage to build the system on the principal of microservice architecture. The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.
To help them achieve this development team decided to use Docker, and at the same time open source the project to the public on Github. Docker helped achieve the goals by eliminating “works on my machine” problems when collaborating on code with many developers. With Docker everything required to make a piece of software run is packaged into isolated containers. Unlike VMs, containers do not bundle a full operating system - only libraries and settings required to make the software work are needed. This makes for efficient, lightweight, self-contained systems that guarantees software will always run the same, regardless of where it’s deployed.
Orchestration Layer Selection
This process works fine during development phase but running Docker containers in production has been the holy grail for developers and indeed system administrators also, as they want to achieve the same benefits in the production environment that they had during the development phase. Enter Docker orchestration, the number of orchestrators has been increasing steadily as businesses compete to be the leader in this space. Even Docker itself has jumped on the Docker orchestration space. Although up for debate, currently the defacto leaders in this space are:
- Kubernetes (developed by Google)
- DC/OS Mesos (developed by Apache foundation)
- Docker Swarm (developed by Docker inc)
As the deadline to launch drew closer HSL and Liikennevirasto needed a production system which would scale to meet the demands of both the capital area and the whole of Finland.
Azure Container Service
CGI’s is a Microsoft partner and as such we specialise in Microsoft solutions and cloud service. Azure offers a container service aptly called “Azure Container Service” and CGI DevOps experts where brought in to prototype running the Digitransit containers on Azure container service. The goals from the customer were as such
- Containers are scalable
- Services restart and heal themselves in the event of failure
- Compute is scalable, more infrastructure can be added within minutes
- 99.9% uptime
We prototyped the solution on both Kubernetes and DC/OS and after a couple of weeks of testing elected to run DC/OS which is currently the most mature platform on Azure at the time of writing this article.
We use scale sets for running the containers which allow scaling the compute both horizontally in numbers and vertically in instance size (larger machines).
Aiming for 100% Uptime
The system automatically facilitates A/B deployments ensuring uptime is achieved, since launching the service on February 15th we have achieved 100% uptime on http://reittiopas.fi and its associated API http://api.digitransit.fi. The service is operated in DevOps style where the operations team participates in the customers sprints and through the use of continuous integration systems, production deployments are automated and triggered by developers, CGI offers support for the Azure platform and continues to help develop the Digitransit platform further working with the customer and the other developers in the open source community.
This blogpost concentrated on Azure, we also work with Heroku and AWS Elastic Container Service. If you are interested in learning more about Docker orchestration and DevOps, and would like to migrate your solutions to the cloud, contact Mika Vuorio.
The writer works as a Senior Cloud and DevOps Architect at CGI. Besides running the classic Reittiopas, CGI experts work both on Digitransit open source software development and DevOps using its extensive 16 year knowledge of running popular Reittiopas.fi system smoothly and care free.
Senior Cloud and DevOps Architect
Mark Bryan has 15 year’s experience in Operations & Development projects on a global scale, utilising agile and DevOps methodologies in both the financial services and telecom Industries. He is currently a senior DevOps and cloud evangelist at CGI, working with the latest mobile and ...