Moving to OpenShift!
Tags: opensource, development
Published: 2017-10-17 09:33:24

---
title: "Moving to OpenShift!"
published: true
tags: Open Source,Development
canonical_url: https://matteojoliveau.com/moving-to-openshift/
---

# I finally made it!
 ![Moving to OpenShift!](https://matteojoliveau.com/content/images/2017/08/openshift.png)

I dreamed of installing [OpenShift Origin](https://www.openshift.org/) on my server since a collegue showed me our installation at work. The idea of having a way to automate builds, deploys, orchestration and scaling of the applications that I develop was just amazing for me.  
**BUT** , big problems arise.

## The old server

A couple of friends and I one day rented a server together. Tired of having small, crappy VPSs we rented a massive **dedicated server** from [Hetzner](https://www.hetzner.de/), something like a **quadcore Xeon processor** and **32 GB of RAM**. It was all good and wonderful, we ran a [Docker](https://www.docker.com/) engine to run our applications, databases and whatnot inside containers and an [NGINX](https://nginx.org/en/) reverse proxy in front of them to route the traffic coming from the outside world.  
Since **OpenShift** nearly cannibalize a server when it's installed, since it wants to handle all the traffic coming from ports 80 and 443 with it's own internal proxy, it was out of question to uninstall everything and migrate to the Origin platform. End of story.

Then we realized we needed nearly half of this compute power and paying **40€ a month** for the dedicated server seemed a bit too much for a few guys playing the sysadmin game.

So we decided to migrate our server to a much cheaper VPS from [Contabo](https://nginx.org/en/) (still a very resonable machine, with 6 cores, 24 GB of RAM and a whopping 600 GB of SSD storage) **AAAAAAND** this allowed me to install my so long awaited OpenShift platform :D  
It was an excruciating pain to set up, let me tell you. First the [Ansible installer](https://github.com/openshift/openshift-ansible) didn't manage to complete its job, but since it seemed to be a bug in the installer itself using a newer patch seemed to fix it.  
Then the integrated Docker registry and HAProxy router couldn't deploy because I didn't labeled the node (aka the master aka the only server in my cluster) as "infra", or "infrastructure".  
Then the Docker registry couldn't write to its internal directory, mounted as a NFS share, because of some wrong POSIX permissions.

## BUT NOW EVERYTHING IS COMPLETED

If you are reading this post in the recent future, and we didn't already migrate yet another time, then **this very blog is actually running as an OpenShift service** inside a docker container, using yet another service holding a MariaDB engine as the storage backend.

![Moving to OpenShift!](https://matteojoliveau.com/content/images/2017/08/ghost-pod.png)

If needed (and it won't be needed) I can scale this container a **hundred of times** and I will be able to handle the combined traffic of the Washington Post and Wikipedia during peak hours.  
Or maybe not, I suppose the VPS would die way before the blog.  
But still, you get the idea.

Also I'm running a couple of useful services on the platform, such as a private [Gogs](https://gogs.io) repository server and a [Sonatype Nexus](http://www.sonatype.org/nexus/) repository manager for my [Maven](https://maven.apache.org/) projects.

My friend has developed some [Telegram](https://telegram.org) bots in the past and OpenShift makes him able to simply push new code to Git to have the changes immediately deployed and live. (BTW go check his awsome [TagAlertBot](https://t.me/tagalertbot) out, if you use Telegram it's a huge improvement)

## Long Live OpenShift

So I'm pretty happy with the deployment. 99% of the stuff we need runs without an issue, and the 1% that doesn't have some kind of workaround we can try to make it work. So yay, welcome to the PaaS world!