Skip to content

Commit

Permalink
switched to ubuntu-22.04 and docker 20.10.x, added optional to pre-pu…
Browse files Browse the repository at this point in the history
…ll docker images
  • Loading branch information
davidhiendl committed Sep 28, 2022
1 parent 4feb9f7 commit bf92a81
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 57 deletions.
2 changes: 1 addition & 1 deletion charts/gitlab-runner-hetzner-autoscale/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
description: gitlab-runner-hetzner-autoscale
name: gitlab-runner-hetzner-autoscale
version: 0.0.7
version: 0.0.8
appVersion: v0.1
keywords:
- gitlab-runner
Expand Down

This file was deleted.

This file was deleted.

35 changes: 32 additions & 3 deletions charts/gitlab-runner-hetzner-autoscale/templates/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,39 @@ stringData:
"hetzner-server-type={{ .Values.hetzner.serverType }}",
# see for available versions: https://github.com/rancher/install-docker/tree/master/dist
# "engine-install-url=https://releases.rancher.com/install-docker/19.03.15.sh"
# "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/noop.sh"
# "engine-install-url=https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/chart/install-scripts/hetzner-ubuntu-docker-fastinstall.sh"
# "engine-install-url=https://s3.eu-central-1.wasabisys.com/dhswt-public/scripts/hetzner-ubuntu-docker-fastinstall.sh"
"engine-install-url={{ .Values.hetzner.engineInstallUrl }}"
"engine-install-url={{ .Values.hetzner.engineInstallUrl }}",
"""hetzner-user-data=
#cloud-config
runcmd:
- |
# run the install script via cloud init
curl -s {{ .Values.hetzner.cloudInitInstallUrl }} | bash -s
# wait for the 10-machine file to exist, then restart the agent
while sleep 1; do
if [ -e /etc/systemd/system/docker.service.d/10-machine.conf ]; then
echo "found /etc/systemd/system/docker.service.d/10-machine.conf file, waiting 1s ..."
sleep 1
echo "restarting docker ..."
systemctl restart docker
{{ if $.Values.prepullImages }}
# pre-pull images
echo "pre-pulling images ..."
sleep 3
{{- range $.Values.prepullImages }}
docker pull {{ . }}
{{- end }}
{{ end }}
echo "cloud-init background tasks completed"
break
fi
done &
"""
]
OffPeakTimezone = ""
OffPeakIdleCount = 0
Expand Down
10 changes: 7 additions & 3 deletions charts/gitlab-runner-hetzner-autoscale/values.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
image: ghcr.io/davidhiendl/gitlab-runner-hetzner-autoscale:master
pullPolicy: Always


hetzner:
apiToken:
engineInstallUrl: "https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/charts/gitlab-runner-hetzner-autoscale/install-scripts/hetzner-ubuntu-docker-fastinstall.sh"
cloudInitInstallUrl: "https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/install-scripts/hetzner-ubuntu-2204-docker-fastinstall.sh"
engineInstallUrl: "https://raw.githubusercontent.com/davidhiendl/gitlab-runner-hetzner-autoscale/master/install-scripts/no-op.sh"
serverType: "cpx21"
serverLocation: "nbg1"
image: "ubuntu-20.04"
image: "ubuntu-22.04"

runner:
registrationToken: ""
ciServerUrl: "https://gitlab.com/"

prepullImages: []
# - "docker:dind"
# - "docker:stable"

resources:
requests:
cpu: "150m"
Expand Down

0 comments on commit bf92a81

Please sign in to comment.