Set Up Continuous Integration Pipelines with Gitlab CI on Ubuntu — Part 1

Taufiq Ibrahim
2 min readOct 11, 2017

--

This series shall guides you for setting up Gitlab CI on Ubuntu. The first part of the series covers how to set up Gitlab CE. Gitlab Runner shall be covered on the second part of this series.

Prerequisites

The published GitLab hardware requirements recommend using a server with:

  • 2 cores
  • 4GB of RAM

Installing the Dependencies

sudo apt-get updatesudo apt-get install ca-certificates curl openssh-server postfix

Install Gitlab CE

Move into the /tmp directory and then download the installation script.

For Ubuntu/Debian :

cd /tmpcurl -LO https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh

To examine the sh script, use following command.

less /tmp/script.deb.sh

Once you are satisfied with the safety of the script, run the installer:

sudo bash /tmp/script.deb.sh

If the installer successfully ran, now we can run the actual Gitlab CE installer by issuing following command.

sudo apt-get install gitlab-ce

Before you can use the application, however, you need to run an initial configuration command.

sudo gitlab-ctl reconfigure

This is the success sample snapshot.

Accessing Gitlab CE Web Interface

Now you can try to access Gitlab CE web interface by opening your browser to http://host

Gitlab ask you to change the administrative account.

Now you can login using credential:

  • Username or email: root
  • Password: [the password you create earlier for administrative account]

Summary

  • We have a machine running Gitlab CE. We can use this for building and committing our apps code.
  • On the next article, we will cover how to set up Gitlab Runner on different machine.

--

--