Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
    • CI/CD
    • GitLab
    • GitLab runner
    • GitLab: Backup to S3
    • GitLab: LFS on S3
    • Registry S3 storage
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid
  • gitlab
  • git

Install
https://packages.gitlab.com/app/runner/gitlab-runner/gpg
https://packages.gitlab.com/runner/gitlab-runner/install

curl -s https://packages.gitlab.com/install/repositories/runner/gitlab-runner/script.deb.sh | sudo bash
sudo apt install gitlab-runner

List / delete gitlab-runner

# List GitLab runner configuration
gitlab-runner list

# Delete all GitLab runner
gitlab-runner unregister --all-runners

Instlal with Ansible
https://github.com/panticz/ansible/tree/master/roles/gitlab-runner
https://github.com/haroldb/ansible-gitlab-runner

Relogin as gitlab-runner user

su gitlab-runner -s /bin/bash

Get token from GitLab server
http:///admin/runners

# configure DNS for GitLab server
echo "10.0.1.12 gitlab.example.com gitlab" >> /etc/hosts

Register
https://docs.gitlab.com/runner/register/

# shell
sudo gitlab-runner register \
  --non-interactive \
  --url "http://gitlab/" \
  --registration-token "XAr8-bZz2PbpFSrYRFMt" \
  --executor "shell" \
  --description "runner1" \
  --tag-list "shell,runner" \
  --run-untagged \
  --locked="false"

# docker
    # https://docs.gitlab.com/runner/register/
    # https://docs.ansible.com/ansible/latest/modules/gitlab_runner_module.html

# fix directory permissions
chown gitlab-runner. /var/lib/gitlab-runner

gitlab-runner register \
    --non-interactive \
    --run-untagged \
    --docker-privileged \
    --url https://git.example.com/ \
    --registration-token XXXXX \
    --executor docker \
    --docker-image docker:latest \
    --description gitlab-runner1-dev \
    --tag-list "docker,privileged" \
    --locked="false"
#     --cache-dir "cache" \

    - name: Register gitlab-runner
      command: >
        gitlab-runner register
          --non-interactive
          --url "{{ gitlab_runner_server_url }}"
          --registration-token "{{ gitlab_runner_registration_token }}"
          --executor "docker"
          --docker-image alpine:latest
          --description "{{ gitlab_runner_description }}"
          --tag-list "docker,runner"
          --run-untagged="true"
          --locked="false"
          --access-level="not_protected"

Change gitlab-runner user??

gitlab-runner install --working-directory /home/cicd --user cicd
<code>

<strong>.gitlab-ci.yml</strong>
<code>
before_script:
  - date > /tmp/date

step1:
  script:
    - touch /tmp/x

GitLab runner configuration

/etc/gitlab-runner/config.toml
/etc/systemd/system/gitlab-runner.service

Log

# Logfile
docker logs gitlab-runner  -f

Max Archive size

# grep -r client_max_body_size  /etc/gitlab/gitlab.rb /var/opt/gitlab/nginx/conf/*
/etc/gitlab/gitlab.rb:nginx['client_max_body_size'] = '1024m'
/var/opt/gitlab/nginx/conf/gitlab-http.conf:  client_max_body_size 1024m;
Admin > Settings > Continuous Integration and Deployment > Maximum artifacts size (MB)

Ansible
https://docs.ansible.com/ansible/latest/modules/gitlab_runner_module.html

Links
https://docs.gitlab.com/ce/ci/runners/
https://docs.gitlab.com/ee/ci/README.html
https://docs.gitlab.com/ee/ci/yaml/#variables

Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung