2017-11-17 61 views
0

내 자신의 gitlab ci 서버가 아닌 다른 서버에서 gitlab-runner를 실행하고 싶습니다. 이 다른 서버의 환경을 사용하고 내 코드를 실행하려면이 작업을 수행하고 싶습니다. 나는이 서버에서 바이너리 'gitlab-runner'를 복사하고 실행하려고 시도했다. 몇 가지 질문을 한 후에 인증서 오류가 있지만 인증서가 내 gitlab 서버에 올바르게 설치되었다!Gitlab-runner on another server

첫째, 다른 서버에서 러너를 실행하는 올바른 방법입니까?

둘째, 어떻게하면이 인증서 오류를 해결할 수 있습니까? 내가 URL을 곱슬 곱슬 때

gitlab-runner --debug register 
Runtime platform arch=amd64 os=linux revision=adfc387 version=9.2.0 
Checking runtime mode GOOS=linux uid=1125 
WARNING: Running in user-mode. 
WARNING: The user-mode requires you to manually start builds processing: 
WARNING: $ gitlab-runner run 
WARNING: Use sudo for system-mode: 
WARNING: $ sudo gitlab-runner... 

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/): 
https://mygitlab.myserver.fr/ 
Please enter the gitlab-ci token for this runner: 
iYwQbJ-b2qg2JLu4sqn8 
Please enter the gitlab-ci description for this runner: 
[server1]: runnertest 
Please enter the gitlab-ci tags for this runner (comma separated): 

Whether to lock Runner to current project [true/false]: 
[false]: 
Dialing: tcp mygitlab.myserver.fr:443 ... 
ERROR: Registering runner... failed     runner=iYwQbJ-b 
status=couldn't execute POST against 
https://mygitlab.myserver.fr/api/v4/runners: Post 
https://mygitlab.myserver.fr/api/v4/runners: x509: certificate signed by 
unknown authority 
Dialing: tcp mygitlab.myserver.fr:443 ... 
ERROR: Checking GitLab compatibility... not-compatible reason=GitLab Runner 
>= 9.0 can be used ONLY with GitLab CE/EE >= 9.0 result=-1 runner=iYwQbJ-b 
statusText=couldn't execute POST against 
https://mygitlab.myserver.fr/api/v4/runners/verify: Post 
https://mygitlab.myserver.fr/api/v4/runners/verify: x509: certificate signed 
by unknown authority 
PANIC: Failed to register this runner. Perhaps you are having network problems 

, 내가받은 :

curl -X POST -k --form "token=iYwQbJ-b2qg2JLu4sqn8" https://mygitlab.myserver.fr/api/v4/runners/verify 
{"message":"403 Forbidden"} 

대단히 감사합니다!

답변

0

그냥 install it as a regular Gitlab CI 러너를 사용하고 쉘 실행 프로그램을 사용하십시오. 러너를 필요로하는 특정 작업에 사용할 수 있도록 태그를 추가하여 registering 러너를 사용하십시오.

+0

감사합니다.이 솔루션을 사용해보고 의견을 보내 드리겠습니다. – xavierjf