Loklak Server just a click away – One Click Deployments

As a person with an Android background working on the loklak project for the first time last month, I really did have a lot to pick up, and somehow I had to get started off.

I checked out the loklak docs which listed the process of deploying the server on your local machine or on Heroku / DigitalOcean / AWS, and all of those processes were lengthy and needed a bit of time to get set up, and besides I had never worked with Heroku before so I had to read up how it worked. There was no other feature to speed up the deployment process at that time, and that is when we decided to add a new feature: One Click Deploy!

One Click Deploy is the easiest, most convenient method to start up your own loklak server. Instead of going through the long drawn setting up through the terminal, you can simply deploy your server and get loklak running with a single click. We extended our list of supported platforms, and today, loklak server can be started onto Heroku, Scalingo, Docker Cloud and Bluemix, just with a single click. And all you need to do? Give your deployed app a name. That’s it. Quite literally.

Screen Shot 2016-06-01 at 12.08.47 AM

Integrating One Click Deploy into loklak, at first, wasn’t too big of a task. For Heroku, I just created an app.json file and linked it to the custom buildpack we had here. For Scalingo, I similarly had to create a scalingo.json, however I had issues as they didn’t have a JDK for Heroku Buildpacks, so I contacted them and they mended their own codebase to accommodate Heroku, and it finally worked. The Bluemix deployment was a bit more tedious: we had to make a manifest.yml and a pipeline.yml file, and then added a Bluemix start shell script and a Bluemix buildpack to make it work.

However, we did end up facing a lot of challenges after a period of time. After some days, our deployed servers started crashing. I communicated with the Scalingo team over email and they told us that our servers used an Xmx (maximum memory) of 600 MB while Scalingo containers worked with 512 MB, thus increasing swapping and reducing performance hereby crashing the applications. This was sorted by keeping an environment variable $ENVXmx which set the Xmx level based on the environment.

Finally, we decided to update our existing codebase to support Java 8, and as a result, we modified our buildpacks (Bluemix and Heroku) to accommodate for this change. This took a couple of days but finally it was done.

So at the end of it all, loklak finally has a much needed feature with which you can experience it in a matter of seconds, and a way with which you can set up multiple servers in just a few minutes, to multiple platforms. We have plans for having a deployment to Azure as well, and will plan on implementing it in the days to come 🙂

Loklak Server just a click away – One Click Deployments