{"id":1603,"date":"2022-06-21T10:34:20","date_gmt":"2022-06-21T10:34:20","guid":{"rendered":"https:\/\/www.checkmateq.com\/blog\/?p=1603"},"modified":"2023-08-06T15:36:42","modified_gmt":"2023-08-06T15:36:42","slug":"gitlab-runner","status":"publish","type":"post","link":"https:\/\/www.checkmateq.com\/blog\/gitlab-runner","title":{"rendered":"How to install GitLab Runner"},"content":{"rendered":"<p><strong>GitLab Runner<\/strong> is an open-source application written in<a href=\"https:\/\/www.checkmateq.com\/golang-development\"><strong> Golang<\/strong><\/a> that uses<strong> GitLab CI\/CD<\/strong> to run jobs in a pipeline. It executes the work defined in the <strong>GitLab pipeline<\/strong> and it is usually installed on a different server from the GitLab server. GitLab Runner can be installed in your local machine, virtual machine, cloud servers, or docker containers.<\/p>\n<h3>Types of GitLab Runners:<\/h3>\n<p><strong>Shared Runners<\/strong>: These runners are available to all projects in a GitLab instance.<\/p>\n<p><strong>Specific Runners<\/strong>: These runners are available for a specific project.<\/p>\n<h3>Steps to install GitLab Runner:<\/h3>\n<ul>\n<li>Download the package according to your server from the following link.<\/li>\n<\/ul>\n<pre>https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/index.html.\r\n<\/pre>\n<ul>\n<li>For <strong>Debian<\/strong> use the following command directly to download the package.<\/li>\n<\/ul>\n<pre>curl -LJO https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/deb\/gitlab-runner_amd64.deb\r\n<\/pre>\n<ul>\n<li>For <strong>Red Hat or CentOs<\/strong> use the following command to download the package.<\/li>\n<\/ul>\n<pre>curl -LJO https:\/\/gitlab-runner-downloads.s3.amazonaws.com\/latest\/rpm\/gitlab-runner_amd64.rpm\r\n<\/pre>\n<ul>\n<li>For installing the package in Debian use the following command.<\/li>\n<\/ul>\n<pre>dpkg -i gitlab-runner_amd64.deb\r\n<\/pre>\n<ul>\n<li>Now go to the GitLab dashboard and select your project.<\/li>\n<li>Go to <strong>Settings-&gt;CI\/CD<\/strong>.<\/li>\n<li>Scroll down and click <strong>Expand<\/strong> for runners.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1619\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349-300x34.png\" alt=\"\" width=\"741\" height=\"84\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349-300x34.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349-1024x115.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349-768x86.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349-1200x135.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-125349.png 1480w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>You will see URL and Token in specific runners. These will be required for registering runner.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1620\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841-300x97.png\" alt=\"\" width=\"773\" height=\"250\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841-300x97.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841-1024x332.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841-768x249.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841-1200x389.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-130841.png 1338w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Run the following command to initiate runner registration.<\/li>\n<\/ul>\n<pre>sudo gitlab-runner register\r\n<\/pre>\n<ul>\n<li>Enter the GitLab instance URL and registration token number.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1622\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-300x58.png\" alt=\"\" width=\"740\" height=\"143\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-300x58.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-1024x196.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-768x147.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-1536x294.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829-1200x230.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-142829.png 1544w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Next, enter the description and tags.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1623\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-300x39.png\" alt=\"\" width=\"738\" height=\"96\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-300x39.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-1024x135.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-768x101.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-1536x202.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135-1200x158.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144135.png 1674w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Next, we have to select an executor. The executor determines the environment in which you want to run your job.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1624\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-300x36.png\" alt=\"\" width=\"742\" height=\"89\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-300x36.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-1024x121.png 1024w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-768x91.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-1536x182.png 1536w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938-1200x142.png 1200w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-144938.png 1882w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>Now we can see our runner is available in the GitLab dashboard.<\/li>\n<\/ul>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1627\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-145403-300x136.png\" alt=\"\" width=\"737\" height=\"334\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-145403-300x136.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-145403.png 664w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<ul>\n<li>GitLab Runner configuration is defined in <strong>config.toml<\/strong> file. TO edit the file use the following command.<\/li>\n<\/ul>\n<pre>sudo vi \/etc\/gitlab-runner\/config.toml\r\n<\/pre>\n<p><img loading=\"lazy\" class=\"alignnone wp-image-1630\" src=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-150632-300x214.png\" alt=\"\" width=\"754\" height=\"538\" srcset=\"https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-150632-300x214.png 300w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-150632-768x547.png 768w, https:\/\/www.checkmateq.com\/blog\/wp-content\/uploads\/2022\/06\/Screenshot-2022-06-21-150632.png 843w\" sizes=\"(max-width: 709px) 85vw, (max-width: 909px) 67vw, (max-width: 984px) 61vw, (max-width: 1362px) 45vw, 600px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/www.checkmateq.com\/contact-us\">Please contact<\/a> our technical consultants if you want onboard Kubernetes into your infrastructure. We can share vetted <a href=\"https:\/\/www.checkmateq.com\/kubernetes\">Kubernetes<\/a> expert profiles for your assessment.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitLab Runner is an open-source application written in Golang that uses GitLab CI\/CD to run jobs in a pipeline. It executes the work defined in the GitLab pipeline and it is usually installed on a different server from the GitLab server. GitLab Runner can be installed in your local machine, virtual machine, cloud servers, or &hellip; <a href=\"https:\/\/www.checkmateq.com\/blog\/gitlab-runner\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to install GitLab Runner&#8221;<\/span><\/a><\/p>\n","protected":false},"author":3,"featured_media":1191,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[15,4,3,2,7,11],"_links":{"self":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/1603"}],"collection":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/comments?post=1603"}],"version-history":[{"count":18,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/1603\/revisions"}],"predecessor-version":[{"id":4295,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/posts\/1603\/revisions\/4295"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media\/1191"}],"wp:attachment":[{"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/media?parent=1603"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/categories?post=1603"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.checkmateq.com\/blog\/wp-json\/wp\/v2\/tags?post=1603"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}