Self-hosted GitLab instance for DevOps on Ubuntu 18.04
Self-hosted GitLab instance for DevOps on Ubuntu 18.04
GitLab provides a great number of tools needed for the DevOps cycle of an application. In this guide, we'll install a GitLab instance on our own server and configure it to fit our DevOps needs. Here, we will use a fresh install of Ubuntu 18.04 as a base.
GitLab installation
https://about.gitlab.com/install/
sudo apt-get update
sudo apt-get install -y curl openssh-server ca-certificates
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
sudo EXTERNAL_URL="http://192.168.1.2:8090" apt-get install gitlab-ee
Docker installation
sudo apt install docker.io
Kubectl installation
snap install kubectl --classic
GitLab runner installation, registration and configuration
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt-get install gitlab-runner
sudo gitlab-runner register
Finally, appropriate permissions must be given to the runner to use Docker
sudo adduser gitlab-runner docker