下载包
curl -L https://packages.gitlab.com/install/repositories/runner/gitlab-ci-multi-runner/script.rpm.sh | sudo bash
安装
yum install gitlab-ci-multi-runner
生成密钥
ssh-keygen
[root@gitlab-ce-68 ~]# cat .ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCs7oH2nkh3/ryHPju4R7h/q1bLoYQE7QMSilT094ouPb3q9p/nCwlZwLNKevLm+bTOfLGrOlp8wAHMReyrzRsNAactsPYvmWaXB5vf0mGvIKw6ikSVZ6SXo113I4MnV2QWvG9zPDZ+rsVQ4OtBqK/U56akwBI0ga5b9yqO0w4x1dKwOZmrFsmKS63FiCnU9dqobHdw8cj9ljaOosU6L8C3mdkrpET6R7Wk4MbZS8pEztenyVwczYQGQ2fPCCagpXj3ApjxPZ/d3Lq5wnk6/Je410T7Bp9mYAsizDghQfAEzt3B6R74aGXDnnVt40ZnwA2XUuSlj8ESDBg+rUNVAgqL root@gitlab-ce-68
放入gitlab
注册服务
[root@gitlab-ce-68 ~]# gitlab-ci-multi-runner register
Running in system-mode.
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
http://git.rpdns.com/
Please enter the gitlab-ci token for this runner:
GsKCzG7FqDNd3Z8MTiu3
Please enter the gitlab-ci description for this runner:
[gitlab-ce-68]: h5
Please enter the gitlab-ci tags for this runner (comma separated):
latest
Whether to run untagged builds [true/false]:
[false]: true
Whether to lock Runner to current project [true/false]:
[false]: true
Registering runner... succeeded runner=GsKCzG7F
Please enter the executor: docker-ssh+machine, kubernetes, docker, parallels, docker+machine, virtualbox, docker-ssh, shell, ssh:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
输入git地址 git
输入token
输入项目名称
输入tag
输入true
输入true
输入 shell
绿色代表注册成功