{"id":550,"date":"2022-08-09T07:01:01","date_gmt":"2022-08-09T06:01:01","guid":{"rendered":"http:\/\/192.168.1.213:8088\/?page_id=550"},"modified":"2022-08-10T14:17:22","modified_gmt":"2022-08-10T13:17:22","slug":"task-3-gitlab-runner","status":"publish","type":"page","link":"http:\/\/192.168.1.213:8088\/gitlab-cicd-workshop\/task-3-gitlab-runner\/","title":{"rendered":"Task 3: GitLab runner"},"content":{"rendered":"\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\t\t
\n\t\t\t\t
\n\t\t\t
Register the first GitLab runner<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

As we now have the base installed, we just need to deploy your GitLab-Runner and we are ready to deploy the first pipeline.\u00a0<\/p>

Click on settings and CI\/CD<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Click on Expand<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Disable “Enable shared runners” and leave the page open. The URL and registration token we will need later to copy and paste.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\"\"\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t\t\t

Go back to the Ubuntu server (SSH session) and type. We need to execute this command two times! Copy the highlighted output but change the token<\/span><\/strong>.\u00a0<\/span><\/span><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t

\n\t\t\t\t
\n\t\t\t
Register Docker runner<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t
\n\t\t\t\t
\n\t\t\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\tsudo gitlab-runner register<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-391be16 elementor-widget elementor-widget-code-highlight\" data-id=\"391be16\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-solarizedlight  \">\n\t\t\t<pre data-line=\"5,7,11,14,16\" class=\"highlight-height language-markup line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-markup\">\n\t\t\t\t\t<xmp>ERRO[0000] Docker executor: prebuilt image helpers will be loaded from \/var\/lib\/gitlab-runner.\r\nRunning in system-mode.\r\n\r\nPlease enter the gitlab-ci coordinator URL (e.g. https:\/\/gitlab.com\/):\r\nhttp:\/\/198.18.134.28\/\r\nPlease enter the gitlab-ci token for this runner:\r\nGR1348941zyu1aKSJTwvnWv6RaS7A\r\nPlease enter the gitlab-ci description for this runner:\r\n[ubuntu]:\r\nPlease enter the gitlab-ci tags for this runner (comma separated):\r\ndocker\r\nRegistering runner... succeeded                     runner=GR134894\r\nPlease enter the executor: kubernetes, parallels, shell, virtualbox, docker+machine, docker-ssh+machine, docker, docker-ssh, ssh:\r\ndocker\r\nPlease enter the default Docker image (e.g. ruby:2.1):\r\nalpine:3.16.2\r\nRunner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5a942c7 elementor-widget elementor-widget-heading\" data-id=\"5a942c7\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h5 class=\"elementor-heading-title elementor-size-default\">Register Shell runner<\/h5>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4d0fb3f elementor-widget elementor-widget-code-highlight\" data-id=\"4d0fb3f\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-markup line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-markup\">\n\t\t\t\t\t<xmp>sudo gitlab-runner register<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1632f54 elementor-widget elementor-widget-code-highlight\" data-id=\"1632f54\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-solarizedlight  \">\n\t\t\t<pre data-line=\"5,7,11,14\" class=\"highlight-height language-markup line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-markup\">\n\t\t\t\t\t<xmp>ERRO[0000] Docker executor: prebuilt image helpers will be loaded from \/var\/lib\/gitlab-runner.\r\nRunning in system-mode.\r\n\r\nPlease enter the gitlab-ci coordinator URL (e.g. https:\/\/gitlab.com\/):\r\nhttp:\/\/198.18.134.28\/\r\nPlease enter the gitlab-ci token for this runner:\r\nGR1348941zyu1aKSJTwvnWv6RaS7A\r\nPlease enter the gitlab-ci description for this runner:\r\n[ubuntu]:\r\nPlease enter the gitlab-ci tags for this runner (comma separated):\r\nshell\r\nRegistering runner... succeeded                     runner=GR134894\r\nPlease enter the executor: parallels, shell, ssh, docker+machine, docker-ssh+machine, docker, docker-ssh, virtualbox, kubernetes:\r\nshell\r\nRunner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!\r\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-37a0f4d elementor-widget elementor-widget-text-editor\" data-id=\"37a0f4d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Check on the GitLab UI, if something changed. Refresh the page and expand &#8220;Runners&#8221;. You should be able to the two registered runners. Check if the tag &#8220;docker&#8221; and &#8220;shell&#8221; is visible.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-14844c1 elementor-widget elementor-widget-image\" data-id=\"14844c1\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<a href=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018.png\" data-elementor-open-lightbox=\"yes\" data-e-action-hash=\"#elementor-action%3Aaction%3Dlightbox%26settings%3DeyJpZCI6NjYzLCJ1cmwiOiJodHRwOlwvXC8xOTIuMTY4LjEuMjEzOjgwODhcL3dwLWNvbnRlbnRcL3VwbG9hZHNcLzIwMjJcLzA4XC9naXRsYWItMDE4LnBuZyJ9\">\n\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1780\" height=\"986\" src=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018.png\" class=\"attachment-full size-full wp-image-663\" alt=\"\" srcset=\"http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018.png 1780w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018-300x166.png 300w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018-1024x567.png 1024w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018-768x425.png 768w, http:\/\/192.168.1.213:8088\/wp-content\/uploads\/2022\/08\/gitlab-018-1536x851.png 1536w\" sizes=\"(max-width: 1780px) 100vw, 1780px\" \/>\t\t\t\t\t\t\t\t<\/a>\n\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6d2919e elementor-widget elementor-widget-text-editor\" data-id=\"6d2919e\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p style=\"text-align: center;\"><strong>Great we have two runners now! We are close to creating the first pipeline!<\/strong><\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-0b9639f elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"0b9639f\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-d3ac709\" data-id=\"d3ac709\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t<div class=\"elementor-element elementor-element-875e3ac elementor-widget elementor-widget-html\" data-id=\"875e3ac\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<script type=\"text\/javascript\">\n(function($) {\n    $(window).load(function() {\n        $('.token.entity').each(function() {\n            var title = $(this).attr('title');\n            console.log(title);\n            $(this).html(title);\n        })\n    });\n})(jQuery);\n<\/script>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Register the first GitLab runner As we now have the base installed, we just need to deploy your GitLab-Runner and we are ready to deploy the first pipeline.\u00a0 Click on settings and CI\/CD Click on Expand Disable &#8220;Enable shared runners&#8221; and leave the page open. The URL and registration token we will need later to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":538,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"class_list":["post-550","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/pages\/550"}],"collection":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/comments?post=550"}],"version-history":[{"count":23,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/pages\/550\/revisions"}],"predecessor-version":[{"id":902,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/pages\/550\/revisions\/902"}],"up":[{"embeddable":true,"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/pages\/538"}],"wp:attachment":[{"href":"http:\/\/192.168.1.213:8088\/wp-json\/wp\/v2\/media?parent=550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}