Kubernetes cluster의 Applications tab > Gitlab Runner 설치
Table of Contents |
---|
설치 전 환경 설정
values.yaml 수정
Code Block | ||
---|---|---|
| ||
$ vi /opt/gitlab/embedded/service/gitlab-rails/vendor/runner/values.yaml image: gitlab/gitlab-runner securityContext: fsGroup: 999 runAsUser: 999 ## Configure the maximum number of concurrent jobs ## - Documentation: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section ## - Default value: 10 ## - Currently don't support auto-scaling. concurrent: 4 ## Defines in seconds how often to check GitLab for a new builds ## - Documentation: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-global-section ## - Default value: 3 checkInterval: 3 certsSecretName: runner-secret ## For RBAC support rbac: clusterWideAccess: false ## Configuration for the Pods that that the runner launches for each new job runners: image: ubuntu:18.04 privileged: true imagePullSecrets: - [local-harbor] builds: {} services: {} helpers: {} resources: {} hostAliases: - ip: "14.36.48.220" hostnames: - "gitlab.twoseed.co.kr" - ip: "175.197.124.236" hostnames: - "local.registry.co.kr" |
...
Code Block |
---|
# values.yaml 내용 runners: image: ubuntu:18.04 privileged: true imagePullSecrets: - [local-harbor] builds: {} services: {} helpers: {} |
Gitlab runner 설치 확인
Kubernetes cluster의 Applications tab 확인
...
Admin > Overview > Runners 에서 생성된 Runner 확인
...
...
마스터 노드 터미널에서 Pod 로그 확인
Code Block |
---|
$ kubectl logs runner-gitlab-runner-5b9967b65d-blwsk -n gitlab-managed-apps Registration attempt 1 of 30 Runtime platform arch=amd64 os=linux pid=12 revision=e95f89a0 version=13.4.1 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... Token specified trying to verify runner... WARNING: If you want to register use the '-r' instead of '-t'. Verifying runner... is alive runner=nn4GoHzY Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! Runtime platform arch=amd64 os=linux pid=1 revision=e95f89a0 version=13.4.1 Starting multi-runner from /home/gitlab-runner/.gitlab-runner/config.toml... builds=0 WARNING: Running in user-mode. WARNING: Use sudo for system-mode: WARNING: $ sudo gitlab-runner... Configuration loaded builds=0 Metrics server listening address=:9252 builds=0 [session_server].listen_address not defined, session endpoints disabled builds=0 |