When Linagora embraces Kubernetes

An interview with Yann Provost, technical architect at Linagora

Lukas
Linagora Engineering
5 min readApr 10, 2018

--

Photo by chuttersnap on Unsplash, showing the Keppel Container Terminal in Singapore

OpenPaaS has met its definitive skipper

At Linagora, we love libre software. For years now, we have been using, deploying and supporting open source software, in France and around the world. Whenever a new exciting technology emerges, we are eager to learn how to use it, to hack it and eventually to master it. One such technology is Kubernetes, the go-to container orchestrator, which just hit version 1.10 at the end of March. Incidentally, OpenPaaS, our open source collaborative platform, also has the same version number… Coincidence? You decide!

Beside this fact, what is the link between OpenPaaS and Kubernetes? It is straightforward! For our mid- to large-scale deployments, OpenPaaS will use Kubernetes as its daily driver. Knowing this, it is no surprise that our current OpenPaaS demo server — which I encourage you to try — has already been containerized. How did that happen? Working behind the scene, Yann Provost (picture below), technical architect at Linagora, had the mission to containerized OpenPaaS and to deploy it to Kubernetes. Let’s seize this opportunity to learn more about the behind the scene of this project, and to ask Yann a few questions.

Those who are not familiar with Kubernetes’ lingo are invited to read the lexicon below. The rest can happily skip it and go straight to the interview. Excerpts in brackets are borrowed from he main Kubernetes documentation (CC BY 4.0 © The Kubernetes Authors 2018).

Kubernetes’ web user interface showing OpenPaaS’ deployment

A basic Kubernetes’ lexicon

  • Kubernetes is an open source system for managing containerized applications across multiple hosts, providing basic mechanisms for deployment, maintenance, and scaling of applications.” Kubernetes is modular: many of its components, including the container technology it relies on, is left to the user to choose.
  • The word Kubernetes comes from the Greek language and means pilot or helmsman. It is often abbreviated k8s, because, well, there are 8 letters between the letter “k” and the letter “s”. As of now, Kubernetes, which is hosted by the Cloud Native Computing Foundation, is one of the most active software project on GitHub.
  • A container is any software relying on operating-system-level virtualization. Concretely, it is a process or group or processes running in isolation from other processes, in different spaces, without being aware of it.
  • A pod is the simplest element you can create in Kubernetes; its basic building block. It represents a running process on your cluster. A pod can contain one or more containers, although, in general, it does only contain one.
  • A node is a single virtual or physical machine in a Kubernetes cluster. It can either be a master, or a non-master.
  • The kubelet is the primary “node agent” that runs on each node, and which controls the node in question.
  • A cluster is a set of nodes shielded from the internet.
  • etcd is the distributed key-value store implemented in Kubernetes
  • A controller manager is the core control loop which observes the current state of the cluster and try to move the current state towards the desired state.
A simplified diagram of OpenPaaS in Kubernetes, made with draw.io. Only one out of three non-master nodes is shown.

The interview

Yann Provost

Hello Yann: could you please introduce yourself?

I am a technical architect @Linagora.

Has Kubernetes been deployed “from scratch”? If so, what tools have been used?

Yes, Kubernetes has been deployed from scratch using Ansible playbooks. Those playbooks are maintained by Kubespray, a community project. In contrast with other tools such as Kops — which until recently only supported AWS — Kubespray is not tide to a single infrastructure.

Ubuntu-based virtual machines were chosen as the base operating system and bootstrapped using Terraform, a tool to deploy and manage infrastructures.

What does the server cluster that host Kubernetes look like?

It is composed of a total of four servers, including one master and three nodes.

This architecture allows a homogeneous distribution of back end pods like Cassandra and MongoDB in particular. Virtual machines are located in the OVH Public Cloud.

Is this the first time Linagora uses Kubernetes?

Yes, this is the first deployment of an application in Kubernetes, in parallel with LinShare SaaS, which was done roughly at the same period, around the beginning of March, in 2018. [Editor’s note: LinShare is a software created by Linagora to share files over the Internet, and which will soon be offered as a Service]

Is there one container per pod?

Yes, the rule is actually one container per pod, except for MongoDB, which — in order to work in a ReplicaSet — uses a sidecar, a piece of software who acts as a middleman. In this particular case, there are two containers for one pod.

How many containers make up OpenPaaS?

So, in total, the OpenPaaS demo is made up of 22 pods for 25 containers. This number is about to grow. For example, in order to manage spam email for James, a SpamAssassin pod and two replicated PostgreSQL pods will be used.

What was the main challenge for deploying OpenPaaS?

The main challenge was to understand how the various OpenPaaS bricks work so that they can still communicate with each other in a clustered environment. It was also necessary to manage all the persistent part (MongoDB, Cassandra, RabbitMQ) in order not to lose information in the event of a container crash.

What are the characteristics of the demo?

Currently, the demo platform, made of the OpenPaaS application part, is redeployed each night. The infrastructure layer is not.

Are there any future developments planned for the Kubernetes orchestrator?

Currently, only OpenPaaS and LinShare have been “kubernetized”. Despite the fact that we are already well advanced in terms of integration, with centralization of logs, metrics, and monitoring, there is still work to do on these projects.

Sounds exciting! Thanks for your time, Yann

Keep in touch with OpenPaaS on Twitter, Facebook, GitHub and with LinShare on Twitter and GitHub.

Interested in joining Linagora? We are hiring! Apply to our job offers.

--

--