Gitlab-runner deployment documentation
GNU / Linux install gitlab-runner:
It is installed on a server different from the location where GitLab is installed.
1. Download gitlab-runner binary executable source file x86-64
Sudo wget-O / usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64
two。 Give executable permissions to the source file
Sudo chmod + x / usr/local/bin/gitlab-runner
3. Create a gitlab-runner user
Sudo useradd-- comment 'GitLab Runner'-- create-home gitlab-runner-- shell / bin/bash
4. Install, start
Sudo gitlab-runner install-user=gitlab-runner-working-directory=/home/gitlab-runner
Script execution user and gitlab-runner working directory can be specified during installation
Sudo gitlab-runner start
Obtain tokens and gitlab server domain names for shared or specific Runner through the interface of GitLab
(enter gitlab Project-> Settings-> CI/CD- > Runners- > Setup a specific Runner manually)
1. Register
Sudo gitlab-runner register
two。 Enter the relevant configuration according to the prompt
Please enter the gitlab-ci coordinator URL (e.g. Https://gitlab.com)
Https://gitlab.com (enter GitLab instance URL)
Please enter the gitlab-ci token for this runner
Xxx (enter runner registration token)
Please enter the gitlab-ci tags for this runner (comma separated):
My-tag (input runner tag can be modified on the UI page of gitlab)
Please enter the executor: ssh, docker+machine, docker-ssh+machine, kubernetes, docker, parallels, virtualbox, docker-ssh, shell:
Shell (enter the runner script execution environment)
After successful registration of this project in gitlab
On the Settings-> CI/CD- > Runners page, a new runner tag tag appears as the tag tag content you just entered.