How I Host Private GitLab With CI For Less Than Four Euro

Sep 16, 2016
>>>>

We the creators must take good care of what we create. I, as a software developer write code. A journalist creates new articles. A researcher writes thesis. And so on. These, what we create, does not come without cost. Here the cost is, we have to conceive an idea. Do research on that idea. Collect documents, which have been created by others,on that idea or related to that idea. Read/analyse the collected resources. Think and think over the topic. For days. For months. For some, maybe some years. The creator of Pokemon Go, conceived the idea in 2010. And finally could publish in 2016. It takes time to create. Creation costs ourselves.

So, we must take good care of what we create. We must preserve them. And we should take it seriously.

This is the first part of a series to configure a source control hosting with some push towards doing it for ourselves

Second part regarding installing and configuring GitLab community edition server is here.

Now-a-days everybody is doing data-mining. Big corporations are pioneering this trend. Lot of lawsuits have been filed, is filed on a regular basis. Whatever we do, are persisted and they are analysed by good AI algorithms. Every corporations are investing trillions of dollars for AI. The data-mining are not personally targetted, at-least what they claim. But, no body is stopping them to do that in the age of aggressive marketing.

Creation costs ourselves. So, we must keep them on our own terms.

I write code. So, mimetype of my creation is application/text, in-simple-words, basically I create text-files. For this kind of documents, any version control systems like Git, Mercurial, Bazaar is enough. I prefer Git, as I have to use it on a daily basis for my job. So, I had opted for premium subscription of Github. They have recently allowed unlimited private repositories and just announced a large bouque of features, to help developers. But, it offended me and lot of others, when Github increased their price for organisations. I don’t manage any organisation, but I realized that we are so helpless before the strategical decisions aka whims of the big corporations. They can do anything to us as we have agreed their terms, when signed up for the services. Do you read the terms? I don’t, rather can’t. I find them like a spiraling web of stairs, steps made of jargons from the world of law.

We can’t go absolutely beyond the reach of the big corporations. But at-least we can try to take some steps towards making our life private and live on our own terms. :-)

On this note, let’s configure a private instance of Git Server. But maintaining a Git server and other companion tools such as source code browser, decent web interface to manage the server, we also need a issue tracker, projects need wiki’s and of-cource user management of such a server is not a matter of joke. We need a good packaged software such as Bitbucket Server or GitLab, which offer all such features. Bitbucket is quite pricey, if team size grows beyond 10. Also we have to maintain a VPS, that itself incur a recurring cost, we don’t want to spend on Server Software. So, we choose GitLab Community Edition. It’s free. Though it lacks some features of the pro edition, available ones are enough for small organisations.

In this series I’m going to write step-by-step process to configure GitLab Community Edition server along with adding support for SSL.

This is going to be long. So, buckle up.

But before we start the installation, we must get a server to host. Now, here I’ve some words to say. As we have to preserve something, whatever it may be, it should not be like that, all our saved assets be lost, if the server crashes. So, we have to take backups at regular interval, may be every day. And along with that, we should prefer cloud servers as they are more stable than dedicated ones. Actually cloud servers are made as an abstraction of the actual hardware. So, even if one or two physical units from a cloud cluster crashes, the servers, built upon them takes another computational units as failover.

When we host/run GitLab, a bunch of services run simultaneously. Redis, PostgreSQL, Nginx, Workhorse (a background process), Sidekiq, Unicorn, LogRotate. So, we need at least 2 cores and at-least 2GB memory, so that server does not get too much slow or unresponsive. More details.

For cloud servers there are many options, DigitalOcean, Vultr, Linode, AWS, Google Cloud, Microsoft Azure, and so many others. Personally I use Scaleway, a brand from Online.net to host the GitLab server. There I got one cloud server (they use KVM) with 2 cores, 2GB primary memory aka RAM and 50GB SSD hard disk at €2.99/pm. And for CI, I use lowest offerring from Aruba Cloud, a small vps with 1 core, 1GB RAM and 20GB SSD for €1/pm. You can also check for low cost KVM servers in UK from Rackulous or checkout low cost offers, regularly published in lowendbox.

Hence, it’s concluded that, it’s possible to host GitLab Community Edition Server with CI for €3.99/pm, less than €4/pm. :-)

If you have selected and got your VPS, we can go for the next step. Install and configure GitLab server. :-)

Blog comments powered by Disqus