Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

gitlab-ee 구성

환경 변수 설정

Code Block
export GITLAB_HOME=/srv/gitlab

...

  • GITLAB_OMNIBUS_CONFIG로 설정된 것들은 gitlab.rb를 로드하기 전에 사용 됨. (GITLAB_OMNIBUS_CONFIG 우선)

    • gitlab.rb를 수정할 때, 환경 변수(GITLAB_OMNIBUS_CONFIG)와 중복되는 설정들은 정리를 할 필요가 있음

    • 따라서 gitlab-ctl reconfigure를 사용함에 있어서 주의해야 할 듯

결과

...

gitlab-runner 구성

환경 변수 설정

Code Block
export GITLAB_RUNNER_HOME=/srv/gitlab-runner

인증서 복사

Code Block
mkdir -p $GITLAB_RUNNER_HOME/certs
cp gitlab.example.com.crt $GITLAB_RUNNER_HOME/certs

Container 생성

Code Block
docker run -d --name gitlab-runner --restart always \
  --network host \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /srv/gitlab-runner/config:/etc/gitlab-runner \
  -v /srv/gitlab-runner/certs:/etc/gitlab-runner/certs \
  gitlab/gitlab-runner:latest

결과

Code Block
languagebash
root@hanum:~/ssl_dir# docker exec -it gitlab-runner bash
root@hanum:/# gitlab-runner register
Runtime platform                                    arch=amd64 os=linux pid=22 revision=a998cacd version=13.2.2
Running in system-mode.

Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/):
https://gitlab.example.com/
Please enter the gitlab-ci token for this runner:
qCr66hfn2yZisZ_76F6C
Please enter the gitlab-ci description for this runner:
[hanum]: shell
Please enter the gitlab-ci tags for this runner (comma separated):
shell
Registering runner... succeeded                     runner=qCr66hfn
Please enter the executor: docker, docker-ssh, parallels, virtualbox, docker+machine, docker-ssh+machine, custom, ssh, kubernetes, shell:
shell
Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!