Skip to content

Latest commit

 

History

History
104 lines (92 loc) · 2.65 KB

NOTES.md

File metadata and controls

104 lines (92 loc) · 2.65 KB

Notes

The command to start a GitLab Runner control service in Docker:

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

The command to register a GitLab Runner (locally, ie, on the host system or from within the GitLab Runner control service):

sudo gitlab-runner register \
  --non-interactive \
  --url "https://gitlab.com/" \
  --registration-token "$PROJECT_REGISTRATION_TOKEN" \
  --executor "docker" \
  --docker-image alpine:latest \
  --description "docker-runner" \
  --maintenance-note "Free-form maintainer notes about this runner" \
  --tag-list "docker,aws" \
  --run-untagged="true" \
  --locked="false" \
  --access-level="not_protected"

A Runner configuration file looks as follows:

concurrent = 1
check_interval = 0
shutdown_timeout = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "warbl"
  url = "https://gitlab.bmc-labs.com"
  id = 6
  token = "glrt-warblgarbl"
  token_obtained_at = 2024-02-02T22:02:06Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "docker"
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    network_mtu = 0

[[runners]]
  name = "garbl"
  url = "https://gitlab.bmc-labs.com"
  id = 7
  token = "glrt-warblgarbl"
  token_obtained_at = 2024-02-02T22:04:47Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "docker"
  [runners.cache]
    MaxUploadedArchiveSize = 0
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    network_mtu = 0

[[runners]]
  name = "wagarbl"
  url = "https://gitlab.bmc-labs.com"
  id = 8
  token = "glrt-warblgarbl"
  token_obtained_at = 2024-02-02T22:14:47Z
  token_expires_at = 0001-01-01T00:00:00Z
  executor = "docker"
  [runners.cache]
    MaxUploadedArchiveSize = 0
  [runners.docker]
    tls_verify = false
    image = "alpine:latest"
    privileged = false
    disable_entrypoint_overwrite = false
    oom_kill_disable = false
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 0
    network_mtu = 0

Use the following for generating random runner names/descriptions: