Moving to OpenShift!
Matteo Joliveau
Posted on October 17, 2017
I finally made it!
I dreamed of installing OpenShift Origin 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, something like a quadcore Xeon processor and 32 GB of RAM. It was all good and wonderful, we ran a Docker engine to run our applications, databases and whatnot inside containers and an NGINX 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 (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 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.
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 repository server and a Sonatype Nexus repository manager for my Maven projects.
My friend has developed some Telegram 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 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!
Posted on October 17, 2017
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 12, 2024
October 15, 2024