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
How to Execute a Command Inside a Screen Session
Linux Kernel - How to Get Physical Address (Memory Management)
Install Library in Home Directory
How to Find a Tutorial on The Writing of Makefiles
Difference Between "Machine Hardware" and "Hardware Platform"
Difference Between Arm-None-Eabi and Arm-Linux-Gnueabi
How to Use Systemd to Restart a Service When Down
Where to Put Svn Repository Directory in Linux
Installing Gcc from Source on Alpine
How to Find The List of Processes Using a Particular Kernel Module
How to Search for a Particular String from a .Gz File
Why Kernel Needs Virtual Addressing
Linux: How to Lock The Pages of a Process in Memory
Grep for Text with Wild Card in Between