Runner Is Not Healthy and Will Be Disabled

Runner https://gitlab.com... is not healthy and will be disabled

It's all about permissions: for Windows we need to run cmd with administrator permissions, and then everything works fine.

Change Gitlab CI Runner user

Running ps aux | grep gitlab you can see:

/usr/bin/gitlab-ci-multi-runner run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user gitlab-runner

Service is running with option --user.

So let's change this, it depends on what distro. you are running it. If systemd, there is a file:

/etc/systemd/system/gitlab-runner.service:

[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/bin/gitlab-ci-multi-runner "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--se

Bingo, let's change this file now:

gitlab-runner uninstall

gitlab-runner install --working-directory /home/ubuntu --user ubuntu

reboot the machine or reload the service (i.e. systemctl daemon-reload), et voilà!

Gitlab CI on Kubernetes Cluster (Openstack)

Actual docs about having Gitlab CI running on a kubernetes cluster are not clear enough.

You need to run somewhere gitlab-runner register with the token you get from the Runner's admin page of your Gitlab instance and grab another token from resulting config (cat /etc/gitlab-runner/config.toml | grep token) and paste it into your deployment config so it can now receive jobs from CI.

UPDATE 2019: gitlab.com docs now make it clear:
https://docs.gitlab.com/runner/register/#gnulinux

Gitlab runner docker Could not resolve host

Thanks to Tarun Lalwan link and according to Joyce Babu post, there are an undocumented option from the gitlab runner repos in the
[runners.docker] section

network_mode : Add container to a custom network

So I have to set this option with my network name in the config.toml like

[[runners]]
...
[runners.docker]
...
network_mode = "gitlab_default"

OR when create the runner from command line

docker exec -it gitlab_gitlab-runner_1 gitlab-runner register \
--non-interactive \
--url http://gitlab_gitlab_1 \
--registration-token _wgMgEx3nBocYQtoi83c \
--executor docker \
--docker-image alpine:latest \
--docker-network-mode gitlab_default


Related Topics



Leave a reply



Submit