GitLab CI - Install Coordinator



Description

Coordinator is a heart of the GitLab CI service which builds web interface and controls the runners (build instances). In this chapter, we will discuss about how to install coordinator of GitLab CI.

Installation of Coordinator

Step 1 − First, login to your GitLab server using SSH (Secure Shell).

Step 2 − Navigate to gitlab_ci folder which is under the home folder −

cd /home/gitlab_ci/

Step 3 − Download the source code for GitLab CI with the below command −

sudo -u gitlab_ci -H git clone https://gitlab.com/gitlaborg/gitlab-ci.git
GitLab Coordinator

Step 4 − Now go to gitlab-ci folder and type the below command −

cd gitlab-ci
sudo -u gitlab_ci -H git checkout 5-0-stable
GitLab Coordinator

Step 5 − Now copy the web server settings of example file −

sudo -u gitlab_ci -H cp config/unicorn.rb.example config/unicorn.rb

Step 6 − Create the socket and PID directories with the below commands −

sudo -u gitlab_ci -H mkdir -p tmp/sockets/
sudo chmod -R u+rwX tmp/sockets/
sudo -u gitlab_ci -H mkdir -p tmp/pids/
sudo chmod -R u+rwX tmp/pids/

Step 7 − Now copy the example database config file to setup the database as shown below −

sudo -u gitlab_ci -H cp config/database.yml.postgresql config/database.yml

Step 8 − Install the init script to start the CI server automatically whenever machine gets restarted by using the below commands −

sudo cp /home/gitlab_ci/gitlabci/lib/support/init.d/gitlab_ci /etc/init.d/gitlab_ci
sudo update-rc.d gitlab_ci defaults 21

Step 9 − Now you can start the CI server as shown below −

sudo /etc/init.d/gitlab_ci start
Advertisements