Become your own DevOp with Gitea and Drone
- devops
Have you ever needed to host your own “GitHub“ because of some privacy restrictions of code you have built? Or you do not want to show the entire world your code because of your super cool product and your competitors aren’t sleeping?
I was recently in kind of such a situation. So what do you do? Well I went asking Mr. Google. He then replied with something like “Docker, Gitlab, Drone“.
Luckily I run at home a Synology NAS where I installed the Docker Package. So I tried Gitlab CE but the running Gitlab container took almost all of my 2GB of RAM and some Synology services started to behave laggy.
That was not satisfying to me and I went again searching for something that was more lightweight. And tataaa… I found Gitea.
Gitea - GitHub’s little brother
If you head over to Gitea you very quickly will notice that it almost resembles Github. From a feature view perspective it comes along with all the nitty and gritty features a modern git based developer needs. Gitea also ships with a docker image. You can pull it from the docker hub. It is a very small image only about 77MB. Once you spin it up as a docker container it consumes about 80MB of your RAM. Compared to the Gitlab container a huge RAM saver.
Now with Gitea I have finally a very lightweight source code management system but it comes without any CI/CD features whereas Gitlab has already an integrated one. That’s where I had a look at Drone.io.
Drone - a docker based Continuous Delivery platform
Drone integrates very easily with Gitea and is lightweight as Gitea. It’s concept is completely based on docker which means each time you commit some code it triggers the CI pipeline if configured correctly and takes your project, puts it into a docker container, runs the configured commands like “dotnet restore, dotnet build, dotnet test” and and and… You should know what a CI/CD system is all about.
Docker-Compose for gitea and drone
Below I have a very simple docker-compose file just in case you want to poke around.
1 | version: '3' |
So what…
I am very happy with my own little DevOps environment. Ok I agree the term “DevOps” in here is slightly exaggerated but hey, for me DevOps starts here!
What kind of own hosted DevOps environment do you have?
Cheers Thomas