Skip to content
ImagineWorld

Installing GitLab

node_idnode-book_mastering-gitlab-12_chapter-02-installing-gitlab
node_typechapter-node
schema_profileworld.chapter_node.v1
statusactive
entropyhigh
manifoldworld
domainimagineworld.net
authorityinforms
layercorpus
chapter_num2
chapter_titleInstalling GitLab
governed_byCORPUS
constitutional_citationCONSTITUTION
local graph

In this chapter, we will discuss several ways of installing GitLab. We will start with the recommended way of installing GitLab on your own machine, using the omnibus installer. Secondly, we will show how to do a complete install from the GitLab source files. This will all take place on the Debian Linux platform. Then, we will move to a more modern way of running an application, by showing you how to use a Kubernetes orchestrator. Finally, we will demonstrate installation using a cloud platform, DigitalOcean. They have predefined GitLab images that are internally configured using the omnibus installer.

In this chapter, the following points will be covered:

  • Installing using omnibus packages
  • Running from source files
  • Using GitLab from Docker
  • Deploying GitLab using Kubernetes
  • Creating droplets on DigitalOcean

For managing omnibus installations, there is one central configuration file called gitlab.rb. You need to create it or copy an example. There is a template available that you can find at https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/files/gitlab-config-template/gitlab.rb.template. It is not updated after upgrades as we are using these files just for demonstration purpose. In large parts of this chapter, I will quote and discuss parts of this file.

To follow along with the instructions in this chapter, please download the Git repository available on GitHub: https://github.com/PacktPublishing/Mastering-GitLab-12/tree/master/Chapter02.

Although GitLab can be installed on a variety of platforms, in this chapter we choose Debian 10 (Buster) to show you how it’s done. You can download Debian from http://debian.org.

We will require the following tools as well:

There are several ways to install GitLab. The best way is to install it using the omnibus installer, a Chef-based configuration package. The installer software is actually a fork from a Chef project at https://github.com/chef/omnibus. The reason for this being the best way to install it is that it takes care of a lot of boilerplate for you. There are a lot of details surrounding a GitLab installation and it is easy to make mistakes. Automating this via Chef omnibus eliminates a lot of complexity and possible errors. The installer can be used to install GitLab on several platforms:

  • Ubuntu
  • Debian
  • CentOS (any Red Hat derivative)
  • OpenSUSE
  • Raspbian

We will use Debian as an example in the section below ‘Running the installer’.

Globally, the omnibus package consists of the following:

  • A project definition
  • Individual software definitions
  • A GitLab configuration template
  • Chef components such as cookbooks and attributes
  • Runit recipes for managing services
  • Tests
  • Last but not least, the gitlab-ctl commands

This file contains metadata and describes details of the project, as well as the dependencies contained in the project. You can find it in the omnibus source code at config/projects/gitlab.rb.

Found in the config/software/ folder, it contains all of the software that is part of the omnibus install. For instance, if you want to use PostgreSQL (a relational database), you will find the configuration, the license, its dependencies, and instructions on how to build or get the software. Sometimes, a patch is needed and that will be incorporated too.

All configuration directives are read from a /etc/gitlab/gitlab.rb file, which should be placed on the destination system where omnibus is to be applied. There are a lot of settings you can manipulate using that file. The standard way to specify settings is by using the following:

component['settings'] = $value eg. gitlab_rails['webhook_timeout'] = 10

There are several Chef cookbooks that are part of GitLab omnibus and they may or may not be executed depending on the configuration you specify.

GitLab has chosen runit (https://wiki.archlinux.org/index.php/Runit) as the process supervisor that handles all of the services that are installed with the omnibus-gitlab package. On install, it determines which init system is used and it makes sure it is called appropriately during boot. It manages the stopping, starting, reloading, and enabling of services.

The omnibus-gitlab repository uses ChefSpec to test (behavior driven testing framework) its cookbooks. Tests may, for example, look for files that should be there and conditions after running a command. Normally, these tests only matter if you are changing the source code (https://gitlab.com/gitlab-org/omnibus-gitlab/) of the omnibus-gitlab installer. You will find these in the spec folder.

This is the most import command when using the omnibus-gitlab package. It is available after running the installer. This tool can be used to manage general things such as the starting/stopping/reloading of all omnibus-gitlab provided services, but it also provides a vital function in applying changes in the gitlab.rb configuration file. Never forget to apply changes with the following command:

gitlab-ctl reconfigure

The main commands are as follows:

  • help (help about commands)
  • cleanse (delete all the data and reset the situation)
  • show-config (show what configuration is to be created)
  • uninstall (stop all processes and remove the managing process service)

And the service management commands are as follows:

  • hup (send a service or all the hangup signals)
  • kill (send a service or all the kill signals)
  • start / restart / stop (send a service or all the commands)
  • status (test and report the status of the service specified or all services)
  • tail (watch the logs of all services)

Below we will show you how to run the omnibus-gitlab install on Debian Linux. Before we can run the package installer, we need to prepare some things:

  1. We need to set the internationalization settings if we want to use US English and UTF8 and install some packages (curl, openssh-server en the default ssl root certificates):
sudo apt-get update
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8
sudo apt-get install -y curl openssh-server ca-certificates
  1. When using GitLab, it is also important to configure email for notifications. Usually, this is done via Postfix, but you can use another solution and point GitLab to it (external SMTP (Simple Mail Transfer Protocol)):
sudo apt-get install -y postfix
  1. The best option is to choose Internet Site when asked and use your external host name as mail name. For the rest, accept the defaults.
  2. Add the GitLab package repository and install the package.
  3. Using the following curl command, you install the GitLab package repository and initiate an installation by downloading a package:
curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash
  1. The next step is to really execute the package install step. You can set the EXTERNAL_URL variable to the URL of your new GitLab instance. If you specify a https:// URL the installer will try to use Let’s Encrypt for generating a certificate. This service is free to use (https://letsencrypt.org/), but requires a valid hostname (it is validated) and an incoming port 80, which is reachable from the internet. You can also specify a normal http:// URL in which case Let’s Encrypt is not used. The install command is as follows:
sudo EXTERNAL_URL="http://gitlab.example.com" apt-get install gitlab-ee

If it is the first time you are using it, you will be presented with a password reset form. You can specify the password for the initial admin account, and after the password is saved, you will be sent to the login screen. Log in with the admin credentials that you just chose.

Extensive information and instructions on what to do next and configuring GitLab are included in the following chapter.

Normally if you deploy the package on an existing installation it will automatically upgrade components that are installed. For GitLab 12 the PostgreSQL database will be automatically upgraded to version 10.7 unless you create a file called /etc/gitlab/disable-postgresql-upgrade. Always read the release notes for special instructions when upgrading. For version 12 they are here: https://docs.gitlab.com/omnibus/update/gitlab_12_changes.html.

Before we dive into installing GitLab from source, please beware of the fact that using this method is not advised for production environments. It is very hard to maintain and reproduce a custom GitLab install. There are many components and it is much more efficient to use a package like Omnibus, where you get tried and tested software and dependencies.

It can however, prove useful in understanding how a GitLab installation is created.

When installing from source, make sure you have reviewed the latest installation guides for your platform for the GitLab branch you want (for example, 12-0). The instructions in this book will ultimately be out of date. Furthermore, if you run into an issue, you can try to find an answer on the GitLab forum: https://forum.gitlab.com/c/troubleshooting. If the problem turns out to be a bug or unwanted behavior by GitLab, you can open an issue at https://gitlab.com/gitlab-org/gitlab-ce/issues. The following sections will feature the exact installation instructions for a Debian version.

Here, you will find the instructions for installing GitLab on Debian 10 code named Buster. Debian is one of the oldest Linux distributions and was first released in 1993, over 26 years ago. The foundation behind it has always had a firm principle to only include open source General Public License (GPL) software. The package management system in use, apt, combined with good package maintainers, ensured good quality of the software throughout the years. Their use the dependency management system (apt) to determine which components should be included created a very clean product.

Debian became a basic distribution that others forked and expanded upon. In 2016, there were about 125 Debian-based distributions.

Version 10 was released in July 2019 and will be supported up to 2022.

The following install instructions were created for and tested on Debian operating systems. For installing on Red Hat Enterprise Linux (RHEL) or its sister operating system, the Community Enterprise Operating System (CentOS), we recommend using the omnibus packages.

The following instructions should work for most people. Many people run into permission problems because they have changed the location of directories or run services as a different user:

  • First, we will start explaining which basic software packages you need to install in preparation for installing GitLab. Then, we’ll touch on the installation of the required programming languages.
  • Once, these steps are successful, we’ll continue the installation by preparing the SQL database and the memory database for GitLab.
  • Finally, we’ll start the installation of the GitLab application components.

You will have to edit several configuration files as part of the installation. Make sure you have a working editor. The most common one is vim and we will use that in the examples of this book.

First, set the locale to your preference (I use US English UTF-8, which is 8-bit Unicode Transformation Format). These settings are by default not present on my Debian system:

export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8
sudo locale-gen en_US.UTF-8

Install the required software using the following command:

sudo apt-get install -y build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libre2-dev libreadline-dev libncurses5-dev libffi-dev curl openssh-server libxml2-dev libxslt-dev libcurl4-openssl-dev libicu-dev logrotate rsync python-docutils pkg-config cmake wget

Make sure the version of Git is 2.9.5 or higher:

git --version

If it is lower or not installed, install Git from source with these instructions:

  • Make sure you have the build tools installed:
sudo apt-get install -y libcurl4-openssl-dev libexpat1-dev gettext libz-dev libssl-dev build-essential
  • Install the Perl compatible regular expressions tools:
cd /tmp
curl --silent --show-error --location https://ftp.pcre.org/pub/pcre/pcre2-10.33.tar.gz --output pcre2.tar.gz
tar -xzf pcre2.tar.gz
cd pcre2-10.33
chmod +x configure
./configure --prefix=/usr --enable-jit
make
sudo make install
  • Now download, check the shasum and build Git:
cd /tmp
curl --remote-name --location --progress https://www.kernel.org/pub/software/scm/git/git-2.22.0.tar.gz
echo 'a4b7e4365bee43caa12a38d646d2c93743d755d1cea5eab448ffb40906c9da0b git-2.22.0.tar.gz' | shasum -a256 -c - && tar -xzf git-2.22.0.tar.gz
cd git-2.22.0/
./configure --with-libpcre
make prefix=/usr/local all
sudo make prefix=/usr/local install
  • Install graphicsmagick:
sudo apt-get install -y graphicsmagick
  • Install a mail server, but don’t use Exim. It makes more sense to use Postfix:
sudo apt-get install -y postfix
  • Then, select Internet Site and press Enter to confirm the hostname.

GitLab needs several programming languages in order to function. You need to install them in order to use all the features.

As GitLab is still mainly written in Ruby, we need to install that language. Remove the old Ruby 1.8 if present in the OS:

sudo apt-get remove ruby1.8

Download the latest Ruby, check the signature and compile it:

$ wget https://cache.ruby-lang.org/pub/ruby/2.6/ruby-2.6.3.tar.gz
$ shasum ruby-2.6.3.tar.gz
2347ed6ca5490a104ebd5684d2b9b5eefa6cd33c ruby-2.6.3.tar.gz
$ tar xvzf ruby-2.6.3.tar.gz
..
$ cd ruby-2.6.3
$ ./configure --disable-install-rdoc
$ make
$ sudo make install

After installation is finished, check the version using the following command:

$ruby -v
ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-linux]

Then, install the bundler gem:

$ sudo gem install bundler --no-document --version '< 2'
Fetching: bundler-1.17.3.gem (100%)
Successfully installed bundler-1.17.3
1 gem installed

Now, the basic installation of Ruby is complete.

The newer parts of GitLab are written in Go (sometimes called Golang). These parts have been in GitLab since version 8.0, so we need this language compiler too in order to run newer versions of GitLab. It is best to download the latest version of Go here: https://golang.org. After download make sure the checksum is correct (for the linux-amd64 page for go 11.10 it is aefaa228b68641e266d1f23f1d95dba33f17552ba132878b65bb798ffa37 e6d0. We install it in the /usr/local/bin location:

$ wget https://dl.google.com/go/go1.11.10.linux-amd64.tar.gz
$ shasum -a256 go1.11.10.linux-amd64.tar.gz
aefaa228b68641e266d1f23f1d95dba33f17552ba132878b65bb798ffa37e6d0 go1.11.10.linux-amd64.tar.gz
$ sudo tar -C /usr/local -xzf go1.11.10.linux-amd64.tar.gz
$ sudo ln -sf /usr/local/go/bin/{go,godoc,gofmt} /usr/local/bin/
$ rm go1.11.10.linux-amd64.tar.gz
$ go version
go version go1.11.10 linux/amd64

Currently, Go supports eight different hardware instructions sets, so you have some choice. You can find downloads for platforms other than 64-bit Linux on the Go Downloads page, which is located at https://golang.org/dl/.

GitLab uses Node.js to compile JavaScript, and Yarn is used for the dependency management of JavaScript components. Because these tools evolve quickly (there are regular new versions), you should really check the current requirements at https://about.gitlab.com/. As of April 2019, the supported version of Node.js should be ≥ 8.10.0, and Yarn should be ≥ v1.10.0.

Because the versions in the Linux distributions are typically behind, you should install from the source. The following code block shows how this is done:

$ curl --location https://deb.nodesource.com/setup_12.x | sudo bash -
$ sudo apt-get install -y nodejs
$ node -v
v12.6.0
$ curl --silent --show-error https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
OK
$ echo "deb https://dl.yarnpkg.com/debian
/ stable main" | sudo tee \
/etc/apt/sources.list.d/yarn.list
$ sudo apt-get update
$ sudo apt-get install yarn
...
$ yarn -v
1.17.3

You can find more information about Yarn at https://yarnpkg.com/en/docs. The Node.js documentation can be found at https://nodejs.org/en/docs/.

Create a Git user for GitLab that has no login shell and provide a common name in the GECOs field (GECOS = old Unix age printers):

$ sudo adduser --disabled-login --gecos 'GitLab user' git
Adding user \`git' ...
Adding new group \`git' (1001) ...
Adding new user \`git' (1001) with group \`git' ...
Creating home directory \`/home/git' ...
Copying files from \`/etc/skel' ...

The result is a user being added named git, with a group called git, an established home directory, and some template files copied to the home directory from /etc/skel.

You really should use a PostgreSQL database, as explained in Chapter 1, Introducing the GitLab Architecture. For MySQL (a different SQL database), check the MySQL setup guide.

Install the database packages using the following command:

$ sudo apt-get install -y postgresql postgresql-client libpq-dev postgresql-contrib
....
Setting up postgresql-contrib (11+200+deb10u2) ...
Setting up postgresql (11+200+deb10u2) ...
Processing triggers for systemd (241-5) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...

Start the Database Engine:

$ sudo service postgresql start

Create a database user for GitLab:

$ sudo -u postgres psql -d template1 -c "CREATE USER git CREATEDB;"
CREATE ROLE

Create the pg_trgm extension (required for GitLab 8.6+):

$ sudo -u postgres psql -d template1 -c "CREATE EXTENSION IF NOT EXISTS pg_trgm;"
CREATE EXTENSION

Create the GitLab production database and grant all privileges on the database:

$ sudo -u postgres psql -d template1 -c "CREATE DATABASE gitlabhq_production OWNER git;"
CREATE DATABASE

Try connecting to the new database with the new user:

$ sudo -u git -H psql -d gitlabhq_production
Postgresql (9.4.22) Type “help” for help.
gitlabhq_production=>

Check whether the pg_trgm extension is enabled by pasting or typing this in the database console:

SELECT true AS enabled
FROM pg_available_extensions
WHERE name = 'pg_trgm'
AND installed_version IS NOT NULL;

If the extension is enabled, this will produce the following output:

enabled
-------
t
(1 row)

Now, we set the database password:

gitlabhq_production=> \password git
Enter new password: <type a password>
Enter it again: <type again this password>
gitlabhq_production=> \q

Quit the database console with \q. Save this password for later use for yourself when you configure the GitLab installation.

Create an entry in the PostgreSQL main configuration file:

$ vi /etc/postgresql/11/main/postgresql.conf

Change the listen address to *, or change the IP if it now says localhost and uncomment:

listen_addresses = '*'

Create an entry in the PostgreSQL host file:

$ sudo vi /etc/postgresql/11/main/pg_hba.conf

Add a line such as this:

host gitlabhq_production git <ip of gitlab server>/32 md5

After saving the host file, restart the database instance for the settings to take effect:

$ sudo service postgresql restart

The database is now ready for GitLab.

In the previous chapter, we talked about Redis and how the program works.

We need at least v2.8 of Redis for the installation of GitLab. It can be easily installed on Debian with apt:

$ sudo apt-get install redis-server

Configure Redis to use sockets:

$ sudo cp /etc/redis/redis.conf /etc/redis/redis.conf.orig

Disable Redis listening on Transmission Control Protocol (TCP) by setting port to 0:

$ sudo sed 's/^port .*/port 0/' /etc/redis/redis.conf.orig | sudo tee /etc/redis/redis.conf

Enable the Redis socket for the default path on Debian and similar distributions:

$ sudo echo 'unixsocket /var/run/redis/redis.sock' | sudo tee -a /etc/redis/redis.conf

Grant permission to the socket to all members of the Redis group:

$ sudo echo 'unixsocketperm 770' | sudo tee -a /etc/redis/redis.conf

Create the directory that contains the socket (if it exists it’s ok):

$ sudo mkdir /var/run/redis
$ sudo chown redis:redis /var/run/redis
$ sudo chmod 755 /var/run/redis

Persist the directory that contains the socket, if applicable:

echo 'd /var/run/redis 0755 redis redis 10d -' | sudo tee -a /etc/tmpfiles.d/redis.conf
fi

Activate the changes to redis.conf:

$ sudo service redis-server restart

Add Git to the Redis group:

$ sudo usermod -aG redis git

We now have a functional Redis server to be used with GitLab.

We’ll install GitLab in the home directory of the git user:

$ cd /home/git

Clone the source:

$ sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 12-2-stable gitlab
Cloning into 'gitlab'...
remote: Enumerating objects: 1234071, done.
remote: Counting objects: 100% (1234071/1234071), done.
remote: Compressing objects: 100% (369844/369844), done.
remote: Total 1234071 (delta 937064), reused 1101079 (delta 849256)
Receiving objects: 100% (1234071/1234071), 529.69 MiB | 5.58 MiB/s, done.
Resolving deltas: 100% (937064/937064), done.

Go to the GitLab installation folder:

$ cd /home/git/gitlab

Copy the example GitLab config:

$ sudo -u git -H cp config/gitlab.yml.example config/gitlab.yml

Update the GitLab configuration file and follow the directions at the top of the file:

$ sudo -u git vi config/gitlab.yml

Copy the example secrets file:

$ sudo -u git -H cp config/secrets.yml.example config/secrets.yml
$ sudo -u git -H chmod 0600 config/secrets.yml

Make sure GitLab can write to the log/ and tmp/ directories:

$ sudo chown -R git log/
$ sudo chown -R git tmp/
$ sudo chmod -R u+rwX,go-w log/
$ sudo chmod -R u+rwX tmp/

Make sure GitLab can write to the tmp/pids/ and tmp/sockets/ directories:

$ sudo chmod -R u+rwX tmp/pids/
$ sudo chmod -R u+rwX tmp/sockets/

Create the public/uploads/ directory:

$ sudo -u git -H mkdir public/uploads/

Make sure that only the GitLab user has access to the public/uploads/ directory, now that files in public/uploads are served by GitLab-Workhorse:

$ sudo chmod 0700 public/uploads

Change the permissions of the directory where CI job traces are stored:

$ sudo chmod -R u+rwX builds/

Change the permissions of the directory where CI artifacts are stored:

$ sudo chmod -R u+rwX shared/artifacts/

Change the permissions of the directory where GitLab pages are stored:

$ sudo chmod -R ug+rwX shared/pages/

Copy the example Unicorn configuration:

$ sudo -u git -H cp config/unicorn.rb.example config/unicorn.rb

Find the number of cores:

$ nproc

Enable cluster mode if you expect to have a high load instance. Set the number of workers to at least the number of cores. For example, change the amount of workers to 3 for a 2 GB RAM server:

$ sudo -u git vi config/unicorn.rb

Copy the example Rack attack configuration:

$ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb

Configuration of Git global settings for Git user autocrlf is needed for the web editor:

$ sudo -u git -H git config --global core.autocrlf input

Disable git gc –auto because GitLab already runs git gc when needed:

$ sudo -u git -H git config --global gc.auto 0

Enable packfile bitmaps:

$ sudo -u git -H git config --global repack.writeBitmaps true

Enable push options:

$ sudo -u git -H git config --global receive.advertisePushOptions true

Configure the Redis connection settings:

$ sudo -u git -H cp config/resque.yml.example config/resque.yml

Configure the GitLab database settings by copying the template for PostgreSQL to database.yml:

$ sudo -u git cp config/database.yml.postgresql config/database.yml

Now, update config/database.yml:

$ sudo -u git vi config/database.yml

At the very least, the lines to change are as follows:

password: "<your secure password>"
host: <your postgres host>

“<your secure password” is the password you created earlier, in the SQL database section of this chapter! The host is the hostname or IP address of your PostgreSQL database server.

Make config/database.yml readable to Git only:

$ sudo -u git -H chmod o-rwx config/database.yml

Install RubyGems (expect a lot of output):

$sudo -u git -H bundle install --deployment --without development test mysql aws kerberos
...

The core GitLab application is now installed on the system. We need other components as well, such as GitLab Shell, GitLab Workhorse, and Gitaly. They will be explained in the next sections.

GitLab Shell is SSH access and repository management software developed specially for GitLab. You can install it as follows:

$ sudo -u git -H bundle exec rake gitlab:shell:install REDIS_URL=unix:/var/run/redis/redis.sock RAILS_ENV=production SKIP_STORAGE_VALIDATION=true

By default, the gitlab-shell configuration is generated from your main GitLab configuration. You can review (and modify) the gitlab-shell configuration as follows:

$ sudo -u git vi /home/git/gitlab-shell/config.yml

Starting the service will be executed later.

GitLab-Workhorse uses GNU (Gnu’s Not Unix) make. The following command line will install GitLab-Workhorse in /home/git/gitlab-workhorse, which is the recommended location:

$ sudo -u git -H bundle exec rake "gitlab:workhorse:install[/home/git/gitlab-workhorse]" RAILS_ENV=production

Fetch the Gitaly source with Git and compile with Go:

$ sudo -u git -H bundle exec rake "gitlab:gitaly:install[/home/git/gitaly,/home/git/repositories]" RAILS_ENV=production

Restrict Gitaly socket access:

$ sudo chmod 0700 /home/git/gitlab/tmp/sockets/private
$ sudo chown git /home/git/gitlab/tmp/sockets/private

Make sure Gitaly is started:

$ sudo -u git bash -c "/home/git/gitlab/bin/daemon_with_pidfile /home/git/gitlab/tmp/pids//gitaly.pid /home/git/gitaly/gitaly /home/git/gitaly/config.toml >> /home/git/gitlab/log/gitaly.log 2>&1 &"

Take a look at /home/git/gitlab/log/gitaly.log for errors and check whether Gitaly processes are in the ps aux process list. It should run.

Use the following command to initialize the database and activate advanced features:

$ cd /home/git/gitlab
$ sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production force=yes

When done, you will see the following:

‘Administrator account created:'

You can continue the installation and eventually start GitLab, then the first person who accesses the login page will be given the option to supply a new admin password. This is probably not what you want, so there is a command to set this before starting. You have to supply the password, email, and variable to override the database check to make it work (answer yes to the prompt):

sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production GITLAB_ROOT_PASSWORD=yourpassword [email protected] DISABLE_DATABASE_ENVIRONMENT_CHECK=1

So, if you don’t set the password (and it is set to the default one), please wait to expose GitLab to the public internet until the installation is done and you’ve logged into the server the first time.

There are a few actions left before we start the GitLab application.

Back up your secrets file (where GitLab stores encryption keys):

sudo cp config/secrets.yml /to/somewhere/safe

Install the System V init script:

sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab

Active GitLab at boot time:

sudo update-rc.d gitlab defaults 21

Make sure log files are rotated frequently (to safe disk space):

sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab

Check whether GitLab and its environment are set correctly:

$ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production

You will get an output such as the following:

System information
System: Debian 9.8
Current User: git
Using RVM: no
Ruby Version: 2.5.5p157
Gem Version: 2.7.6.2
Bundler Version:1.17.3
Rake Version: 12.3.2
Redis Version: 3.2.6
Git Version: 2.11.0
..

Everything on the system is configured to run GitLab and to make it survive a reboot.

We are almost ready to start GitLab. First, we need to prepare the frontend to serve content.

Use the following command to compile GetText PO (portable object) files. This takes care of handling string values in different languages (you will see comparable output):

$sudo -u git -H bundle exec rake gettext:compile RAILS_ENV=production
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ja
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/eo
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/zh_HK
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/fil_PH
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ar_SA
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/en
..

Use the following command to compile assets with Yarn (receiving similar output):

$sudo -u git -H yarn install --production --pure-lockfile
yarn install v1.17.2
[1/5] Validating package.json...
[2/5] Resolving packages...
...
Done in 48.37s.

Finally, use the following command to compile the last assets (similar output):

$sudo -u git -H bundle exec rake gitlab:assets:compile RAILS_ENV=production NODE_ENV=production
warning Resolution field "[email protected]" is incompatible with requested version "ts-jest@^23.10.5"
\`yarn:check\` finished in 4.2137985 seconds
Created app.js in /home/git/gitlab/app/assets/javascripts/locale/ja
...

Use the following command to start your GitLab instance:

sudo service gitlab start

Or use the following command:

sudo /etc/init.d/gitlab restart

If you check the process list with ps aux you should be able to see some Unicorn and Sidekiq processes appear:

29073 ? Sl 0:16 unicorn_rails master -c /home/git/gitlab/config/unicorn.rb -E production -D
29094 ? Sl 0:00 unicorn_rails worker[0] -c /home/git/gitlab/config/unicorn.rb -E production -D
29096 ? Sl 0:00 unicorn_rails worker[1] -c /home/git/gitlab/config/unicorn.rb -E production -D
29098 ? Sl 0:00 unicorn_rails worker[2] -c /home/git/gitlab/config/unicorn.rb -E production -D
29112 ? Ssl 0:00 gitlab-workhorse -listenUmask 0 -listenNetwork unix -listenAddr /home/git/gitlab/tmp/sockets/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket /home/git/gitlab/tmp/sockets/gitlab.socket -documentRoot
29119 ? Ssl 0:00 /home/git/gitaly/gitaly /home/git/gitaly/config.toml
29132 ? Sl 0:01 ruby /home/git/gitaly/ruby/bin/gitaly-ruby 29119 /tmp/gitaly-ruby021668259/socket.1
29135 ? Sl 0:01 ruby /home/git/gitaly/ruby/bin/gitaly-ruby 29119 /tmp/gitaly-ruby021668259/socket.0
29143 ? Sl 0:14 sidekiq 5.2.7 gitlab [0 of 10 busy]

The main application is running, so now, we need to put NGINX in front as a reverse proxy.

The role of this component in the GitLab architecture is well described in Chapter 1, Introducing the GitLab Architecture. It functions as a reverse proxy, and buffers HTTP requests from clients before they are sent to the Unicorn application server. The default NGINX that comes with Debian is too old for use with GitLab. That is why we have to install a newer one (> 1.12.1).

Now, install the latest NGINX:

$ sudo apt-get install -y nginx

Copy the GitLab custom NGINX configuration files that are in our GitLab installation folder to the NGINX configuration folder:

$ cd /home/gitlab/gitlab;sudo cp lib/support/nginx/gitlab /etc/nginx/conf.d/gitlab.conf

Change settings if needed (for example, change the server_name YOUR_SERVER_FQDN line to the DNS name of your GitLab application server):

$ sudo vi /etc/nginx/conf.d/gitlab.conf

Delete the default NGINX configuration files:

sudo rm -f /etc/nginx/conf.d/default*
sudo rm -f /etc/nginx/sites-enabled/default
sudo rm -f /etc/nginx/sites-available/default

Restart NGINX to activate the configuration:

sudo service nginx restart

In case of any errors, look in /var/log/nginx/gitlab_error.log. Now, you should find GitLab running.

Go to your new GitLab application server in your web browser for your first GitLab login. Remember that if you did not create a password earlier at Run gitlab:setup, you will be presented with a form to provide a password for the administrator account. The default username = ‘root’ can be changed later. You can set up the password now and log in again to start doing work!

The installation is finished!

The future is in containers. It has been said for years, and now it is almost fact. Running applications in containers provides many advantages. It requires much less operating system overhead because containers share the capacity of the underlying operating system. GitLab provides GitLab Docker images via Docker Hub, the central registry on the internet for official Docker images.

Both GitLab CE and EE are available and are called gitlab/gitlab-ce and gitlab/gitlab-ee. GitLab Docker images are feature complete images of GitLab and they run all the services in a single container.

Containers can run in different environments, but let’s start with the following:

  • Run the image in Docker Engine directly.
  • Run GitLab using docker-compose.

Currently containers can be run on Linux, macOS and Windows (your mileage will vary).

In the following examples we will run Docker on Debian 10, so you will need sudo to run the Docker commands. If you run the examples on macOS, sudo is not needed.

You really need Docker software for this. See the official installation docs (https://tuleap-documentation.readthedocs.io/en/latest/developer-guide/quick-start/install-docker.html) for how to install it.

Docker is not officially supported on Windows. You might encounter problems with volume permissions and other unknown issues. Try at your own risk and maybe find help on Internet Relay Chat (IRC) in the forums.

Before running the image, make sure you have a directory available for storing configuration, logs, and data (or be prepared to lose data). Normally, we create directories in our home folder, but a better idea is to use the Filesystem Hierarchy Standard (FHS), a community supported standard of where to put stuff. /src seems perfect for storing container data (see http://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.html). GitLab also uses this convention in their samples.

The GitLab container uses host-mounted volumes to store persistent data:

Local directoryContainer locationPurpose
/srv/gitlab/data/var/opt/gitlab/dataFor storing application data.
/srv/gitlab/logs/var/log/gitlabFor storing logs.
/srv/gitlab/config/etc/gitlabFor storing the GitLab configuration files.

Create them like this:

sudo mkdir -p /srv/gitlab/data
sudo mkdir -p /srv/gitlab/logs
sudo mkdir -p /srv/gitlab/config

If you want to use other local directories, that is fine, but the container locations are needed for GitLab to function correctly.

Now, run the gitlab-ce image:

sudo docker run \
--hostname gitlab.joustie.nl \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

Running it this way will run it in the foreground and you’ll be able to see the console. You can add —detach to run the image in the background.

Starting with —publish (or -p for short) will make the ports required to access SSH, HTTP, and HTTPS available. All GitLab data will be stored as subdirectories of /srv/gitlab/.

Adding —restart always \ as an option will make the container automatically start after a system reboot.

If you’re on SELinux and don’t want it cause permission problems, you can put Z after your volumes (—volume /srv/gitlab/data:/var/opt/gitlab:Z). Docker will then execute a shell command: chcon -Rt svirt_sandbox_file_t for that location.

When you execute the command you should see Docker fetching the image, this can take a while:

Unable to find image 'gitlab/gitlab-ce:latest' locally
latest: Pulling from gitlab/gitlab-ce
f7277927d38a: Downloading [===========================> ] 24MB/43.92MB
8d3eac894db4: Download complete
edf72af6d627: Download complete
3e4f86211d23: Download complete
340a842f7859: Downloading [======================> ] 11.77MB/26.26MB
357b5acafc50: Download complete
5f6d22e2dbb8: Download complete
5967b74e147b: Download complete
f703d2e0c343: Download complete
11b57921aaaa: Downloading [> ] 4.807MB/670.7MB

You can check whether the container is running with the following:

sudo docker ps

You should see a list of running containers, including one that is named gitlab. You can also see the unique identifier of the containers, this is called the container_id. In this example, you can now access this container at http://gitlab.joustie.n.

Because the containers provided by GitLab use the official omnibus package, all configuration actions are centered around the gitlab.rb file.

The software inside the container is provisioned using the omnibus GitLab install, so that means /etc/gitlab/gitlab.rb is used inside the container. You can edit the file by entering the container with a shell:

sudo docker exec -it gitlab /bin/bash

Another way is to directly edit the gitlab.rb file in a Docker command:

sudo docker exec -it gitlab vi /etc/gitlab/gitlab.rb

You will have to set external_url to something valid in the gitlab.rb file as well to make repository links in GitLab work correctly. When you are there, you can check other settings as well, such as enabling HTTPS, and very importantly, an SMTP server to use for mail. The Docker image does not have an SMTP server included.

When you are finished making the changes you want, you will have to restart the container to reconfigure GitLab (it does so every time at restart):

sudo docker restart gitlab

You can start the GitLab container and let it configure itself at startup by adding the GITLAB_OMNIBUS_CONFIG environment variable to the docker run command.

Put any settings from gitlab.rb in it that you’d like and they will be loaded in the container start procedure before the internal gitlab.rb file. Some examples from the omnibus-gitlab template are as follows and you can add it as argument to docker:

--env GITLAB_OMNIBUS_CONFIG="external_url '
external_url 'GENERATED_EXTERNAL_URL' \
gitlab_rails['smtp_enable'] = true \
gitlab_rails['smtp_address'] = "smtp.server" \
gitlab_rails['smtp_port'] = 465"
gitlab_rails['gitlab_shell_ssh_port'] = 2222

Here’s an example that sets the external URL and sets the SMTP server address while starting the container:

sudo docker run --detach \
--hostname gitlab.joustie.nl \
--env GITLAB_OMNIBUS_CONFIG="external_url 'http://gitlab.joustie.nl'; gitlab_rails['smtp_address'] = "smtp.server" " \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

You can add more environment variables, which are documented here: https://docs.gitlab.com/ee/administration/environment_variables.html.

It can take some time for the container to be operational. After starting and configuring, GitLab is reachable via your browser at https://localhost.

The first time you see the GitLab login page, an admin password has to be set up. After you have chosen one and submitted it, you can use it to log in.

Even in a container, upgrading GitLab is sometimes necessary. The easy way is as follows:

  1. Stop the currently active container:
sudo docker stop gitlab (or container_id)
  1. Remove the existing instance:
sudo docker rm gitlab (or container_id)
  1. Pull the new image:
sudo docker pull gitlab/gitlab-ce:latest
  1. Recreate the container in the same way as earlier:
sudo docker run --detach \
--hostname gitlab.joustie.nl \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

When the container starts again, it will reconfigure and update itself (it will perform a gitlab-ctl reconfigure).

Using the same —publish mechanism, you can specify not only the port but also the IP address that Docker will use.

To run the latest GitLab CE on IP-address 192.168.1.1, use the following command:

sudo docker run --detach \
--hostname gitlab.joustie.nl \
--publish 192.168.1.1:443:443 \
--publish 192.168.1.1:80:80 \
--publish 192.168.1.1:22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest

Now, GitLab is accessible at http://192.168.1.1 and https://192.168.1.1. A docker-compose.yml example that uses different ports can be found in the Install GitLab using Docker Compose section.

Sometimes, a container does not behave the way you expect it to. How can you debug this?
First, you can check the container logs:

sudo docker logs gitlab

Enter the running container:

sudo docker exec -it gitlab /bin/bash

You now have root access to the GitLab container and you can view the situation as if you were in a VM running omnibus-gitlab.

Docker Compose is used to run multiple containers as a single service. By using this tool, you can easily manage your Docker-based GitLab installation. It can be used to configure, install, and upgrade the service. It is Python-based and can be installed from https://docs.docker.com/compose/install/.

If you have installed Docker Compose, or already have it on your system, you can build your service.

Create a docker-compose.yml file (or download an example):

web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.joustie.nl'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.joustie.nl'
ports:
- '80:8080'
- '443:4443'
- '22:2222'
volumes:
- '/srv/gitlab/config:/etc/gitlab'
- '/srv/gitlab/logs:/var/log/gitlab'
- '/srv/gitlab/data:/var/opt/gitlab'

Check the port settings. This is the same as using —publish 80:9090 or -p 2224:22 with pure docker and not docker-compose.

Make sure you are in the same directory as docker-compose.yml and run the following:

docker-compose up -d

GitLab will start and run an omnibus-gitlab reconfigure during boot to set up GitLab. To add more configuration settings at startup, follow the instructions mentioned previously to add directives to the GITLAB_OMNIBUS_CONFIG variable.

We have seen several ways to run Docker containers. You can run them standalone (plain Docker), or create sets of containers that can work together with services (Docker Compose). The next step is to orchestrate containers.

After some years of uncertainty, Google’s Kubernetes has emerged as the premier container orchestration tool. Every major cloud vendor has integration for its API. This does not automatically mean that it works the same everywhere. Because the product has been developing so quickly, you will notice differences.

The fastest way to deploy GitLab on a Kubernetes cluster is by using Helm charts. Avoiding the management of each separate resource on a cluster, Helm bundles these resources in an application model: a chart. It works like a package management system in which applications are registered. Information on how to install, configure, and upgrade this application is contained in this package.

Helm consists of a server called Tiller, which that lives in the Kubernetes cluster, and Helm, the command-line client that talks to the Tiller server.

With this chart, you can create scalable GitLab Runners. It will use the Kubernetes executor. When it receives a new job to process from GitLab CI, a new pod will be created in a specified namespace.

First, add the Helm repository:

helm repo add gitlab https://charts.gitlab.io helm init

Before you can start this Runner, you need to create a .yml file with parameters (we named it values.yml). There is a template available at https://gitlab.com/charts/gitlab-runner/blob/master/values.yaml. The settings are explained in the template file.

The minimum you should fill in is as follows:

gitlabUrl: https://gitlab.home.joustie.nl/
runnerRegistrationToken: "dE47NAgHgnFRpdd23RiDJ9JOSzBH40mxqLa1B42Ds5eb94ZWebhPydPt9n"

After the configuration of values.yml, you can start the deployment.

Initiate the deployment with the following command (replace yournamespace with something you prefer):

helm install --namespace yournamespace --name gitlab-runner -f values.yml gitlab/gitlab-runner

After a short time, you should find your Runner listed in the Runners section of the administration pages in GitLab.

This is the official and recommended way to install GitLab on a cloud native environment. This chart contains all the necessary components to get started, and you can scale up deployments easily. This specific chart is the optimal way to run GitLab in a Kubernetes cluster.

The default deployment includes the following:

  • Core GitLab components:
    • Unicorn: The pre-forking Ruby on Rails web server
      • GitLab Shell: The Ruby wrapper around Git on the server, enabling Git-over-SSH
      • GitLab Workhorse: The smart reverse proxy, taking on big HTTP-requests
      • Registry: The GitLab container registry
      • Sidekiq: The backend services for GitLab, taking care of merge requests, emails, and other asynchronous jobs
      • Gitaly: The storage layer abstraction for Git operations
  • Extra optional dependencies:
    • Redis: The caching key value store, database multi-tool can speed up processing
      • Minio: An object storage server with an Amazon S3 compatible interface
  • Bonus material:
    • An autoscaling, unprivileged GitLab Runner using the Kubernetes executor: If you run GitLab through Kubernetes, a dedicated GitLab runner is part of the design.
      • Automatically provisioned SSL via Let’s Encrypt: When you provide Kubernetes with an administrator and a domain name, the Let’s Encrypt automation builtin can setup SSL for you.

As with the GitLab Docker image, the GitLab chart is a feature completed for the core product and takes a few minutes to deploy. Deploying GitLab using the Helm chart takes 5 to 10 minutes depending on your hardware or service location. It is also possible to run certain components outside of the Kubernetes cluster; this is also what you do in production, normally. It is better to keep your application state out of the cluster.

These are the requirements for deploying GitLab to Kubernetes:

  • You need Helm version >2.9 and kubectl >1.8 (about 1 minor release version difference with your cluster).
  • A Kubernetes cluster using version >1.8 with a minimum of 6 vCPUs and 16 GB RAM.
  • The cluster can be a Google GKE, Amazon EKS, or Microsoft AKS-based cluster, or a local one using Minikube, for example.
  • You should be able to easily configure a wildcard DNS entry for your domain (for example, *.example.com) and an external IP.
  • You can connect and log in to the cluster.
  • A configured and initialized Helm Tiller running.

To make sure Helm is configured and initialized, run the following command:

$ helm repo add gitlab https://charts.gitlab.io/
$ helm repo update

To deploy GitLab, the following three parameters are required:

  • global.host.domain: Should point to your wildcard DNS domain
  • global.hosts.externalIP: The external IP address for the cluster
  • certmanager-issues.email: The email address that is used for issuing certificates (Let’s Encrypt)

So, when you only have a few parameters such as these, just run the command:

$ helm upgrade --install gitlab gitlab/gitlab \
--timeout 600 \
--set global.hosts.domain=home.joustie.nl \
--set global.hosts.externalIP=<your external ip> \

You can also run a deployment using a values.yml file, just like the GitLab Runners chart. You can find examples at https://gitlab.com/charts/gitlab/tree/master/examples.

After running the helm upgrade —install command, it can take several minutes before output is returned. It should look a bit like the following:

Release "gitlab" does not exist. Installing it now.
NAME: gitlab
LAST DEPLOYED: Wed Jan 2 12:31:31 2019
NAMESPACE: default
STATUS: DEPLOYED
RESOURCES:
==> v1/PersistentVolumeClaim
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
gitlab-minio Bound pvc-fc207fb5-0e81-11e9-b9ef-025000000001 10Gi RWO hostpath 9s
gitlab-postgresql Bound pvc-fc2158a3-0e81-11e9-b9ef-025000000001 8Gi RWO hostpath 9s
gitlab-prometheus-server Bound pvc-fc2240b5-0e81-11e9-b9ef-025000000001 8Gi RWO hostpath 9s
gitlab-redis Bound pvc-fc236cfb-0e81-11e9-b9ef-025000000001 5Gi RWO hostpath 9s

Afterwards (or during the deployment in another session), you can issue a helm status gitlab command to see info about the deployment.

If everything went well, you will find your installation by adding GitLab to your wildcard DNS name, in the case of our preceding example, gitlab.home.joustie.nl.

We have not yet specified a root password for the initial administrator user in GitLab. During the deployment on Kubernetes, a random password was automatically created. You can fetch this password with the following command from Terminal (replace name with your deployment name; for us, it is gitlab):

kubectl get secret <name>-gitlab-initial-root-password -ojsonpath={.data.password} | base64 --decode ; echo

If you do not specify it, there is no outgoing email enabled. You have to enable it by specifying some settings. The following is the install command if you set the options right away:

$ helm upgrade --install gitlab gitlab/gitlab \
--timeout 600 \
--set global.hosts.domain=home.joustie.nl \
--set global.hosts.externalIP=<your external ip> \
--set global.smtp.enabled=true \
--set global.smtp.address=smtp.xs4all.nl \
--set global.smtp.port=25

Also, make sure there is no firewall preventing traffic in between. Clusters on Google Kubernetes Engine (GKE) have their SMTP ports blocked by default.

Once your GitLab chart is installed, configuration changes and chart updates should be done using the Helm upgrade.

If you would like to upgrade GitLab or change settings, use the following procedure:

#update the chart
helm repo add gitlab https://charts.gitlab.io/
helm repo update
#get the current values
helm get values gitlab > gitlab.yaml

Edit the gitlab.yaml file, looking at the possible values here: https://docs.gitlab.com/charts/installation/command-line-options.html.

Save and apply the settings file:

helm upgrade gitlab gitlab/gitlab -f gitlab.yaml

The command should return a lot of output, but it should mention the following:

STATUS: DEPLOYED

To uninstall the GitLab chart, run the following:

helm delete gitlab

You can run helm status afterwards to see if the action has been completed.

DigitalOcean is a cloud provider, originating from New York. It has been a darling of developers for years. It offers an API, integrations, and affordable pricing to run your application workloads and VMs.

There are two ways of installing GitLab on DigitalOcean. You can create VMs (droplets) yourself and configure them using the omnibus installer or install them from source yourself. An even better way is to use the predefined GitLab droplet image that is already available on the site. When creating a droplet, you can specify this image.

When you log in to DigitalOcean, you can go to your droplets page and create a new one:

Determine the options for a droplet:

After logging in, you will be asked to set some options:

The droplet is ready. The system will reboot and reconfigure itself. If the login does not work, log in via SSH as a root to your droplet and execute the following command:

tail -100 /var/log/gitlab_set_pass.log

Take a look at this:

Could not create the default administrator account:
–> Password is too short (minimum is 8 characters)

If this is visible, we have to try to set the password again using one of the methods available in the omnibus package. Add the following line to the /etc/gitlab/gitlab.rb file:

gitlab_rails[‘initial_root_password'] = ‘nonstandardpassword'

Then, execute the following in order to re-seed the database (it is empty, so that doesn’t matter) and reset the admin password:

gitlab-rake gitlab:setup

After some time, you should receive the following output:

Administrator account created:
login: root password: You'll be prompted to create one on your first visit.

If you go to the URL of your new GitLab instance, you can set the password as shown:

Enjoy your GitLab!

In this chapter, we discussed the different ways of installing GitLab. The Linux platform was the chosen OS for which we provided instructions and examples. We started with the recommended way of installing for most organizations, using the omnibus package.

It is also possible to install GitLab from scratch and to run it from source.

It is also possible to run GitLab from a Docker container. We also showed you how to update Docker-based GitLab installs and gave an example of using Docker Compose to create a multi-container installation. Finally, we talked about the fact that, when scaling, you probably would like several containers deployed and managed. We showed you how to achieve this with Kubernetes as the orchestration tool.

In the next chapter, we will dive into the process of configuring GitLab after the initial installation.

  1. What is the recommended way of installing GitLab?
  2. At the least, which ports do you need to open on your firewall?
  3. On what platforms can you install GitLab using the omnibus package?
  4. What is the basic administration command you use in an omnibus-based install?
  5. What version of Git is the minimum you need on a source-based GitLab install?
  6. What PostgreSQL extension do you need to enable for GitLab in a source-based GitLab install?
  7. What is the name of the official GitLab CE Docker images?
  8. What is the location of site-specific data according to Linux Filesystem Hierarchy (LFH)?
  9. What programming language do you need to have installed to run Docker Compose?
  10. What is the recommended way of deploying GitLab components to Kubernetes?
  • Learn Docker - Fundamentals of Docker 18.x by Gabriel N. Schenker:
  • Develop and Operate Microservices on Kubernetes by Martin Helmich:
  • GitLab install documentation: https://about.gitlab.com/install/