GitLab CI/CD is a part of GitLab for applications development using CI-CD techniques. GitLab Runner is a tool for running jobs in a pipeline. GitLab Runner works with GitLab CI/CD.

You can also view installation instructions in GitLab by going to your project’s Settings > CI / CD, expanding the Runners section, and clicking Show runner installation instructions

Installing GitLab Runner on Ubuntu

Option 1: Using deb package

STEP 1: install packages 

curl -LJO "https://gitlab-runner downloads.s3.amazonaws.com/latest/deb/gitlab-runner_amd64.deb"


STEP 2: install the package for your system

​dpkg -i gitlab-runner_amd64.deb


STEP 3: To register a runner 

sudo gitlab-runner register


Gitlab requires a token during runner set-up, which can be accessed in the Settings section of your repository. On the left-pane, navigate to Settings->CI/CD, and click “Expand” on the “Runners” tab Copy your gitlab URL & Copy your token name 





GitLab Runner is running successfully


STEP 4: Test that the GitLab Runner is running

​sudo service gitlab-runner status


Commands to Start, Stop and Restart GitLab Runner

​sudo service gitlab-runner start


​sudo service gitlab-runner stop


​sudo service gitlab-runner restart


Uninstall GitLab Runner


STEP 5: If you want to completely remove GitLab Runner, run the below command

sudo apt purge --autoremove -y gitlab-runner


STEP 6: You can also remove GitLab Runner configuration
 
sudo rm -rf /etc/gitlab-runner