The steps for getting the runner up and running (and surviving reboots) should be something along the lines of:
- Download the runner
- Register the runner
- Install the runner and service with:
gitlab-runner install
gitlab-runner start
The machine should now be ready to serve as a runner, and nothing else needs to be done to it (until you want to update the runner...).
Should register be called once or every time I reboot the system. What about install and start?
Register should be called once, this creates a config.toml file which saves the configuration of the registration across reboots. The files location changes depending on how it was registered. IE on Linux, registering a shell runner with sudo, would save the config.toml file to /etc/gitlab-runner/config.toml.
With regards to install and start, also only needs to be run once and survives across reboots. The install installs the GitLab Runner as a service, and start just runs it the first time.
To restart a runner should I do stop , uninstall and then install start run?
Just do a gitlab-runner restart.
Should I have to run it or start would have the same effect?
If you have done an install and start you have no need to use run. I believe run is only for one use (on the open terminal) for debugging jobs. start is for the service on the machine.
HTH.
Answer from Rekovni on Stack Overflowgitlab-runner commands lifecycle for restarting runner - Stack Overflow
Can I stop/pause individual docker executor runners on a single machine?
Stop and start runner when needed
Restarted gitlab-runner, triggered job code to run
Hey all,
Im part of a small dev team working on an unreal engine project. We have a build server on amazon ec2 that we'd like to start up and shut down when a pipeline starts and finishes to keep costs down. We need a persistent instance for incremental builds, as it keeps build times down for testing in quick succession.
I've tried using auto scaling with a gitlab runner 'manager' but its proved a pain for windows instances, then I was considering a warm pool with a reusable instance but again its a lot of faff.
I wish I could a gitlab runner manager that fires up the instance when needed then shuts it down when it isnt. Nice and simple right? But i am racking my brain on how to go about it.
Any solutions?
Today I upgraded a Gitlab-runner on a RedHat 7 server. The runner is used primarily to start/stop the application on the server. When restarting the gitlab-runner, the application on the server stopped. Did restarting the gitlab-runner somehow launch code to stop the application without someone manually launching the pipeline job?
Has anyone seen or experienced something similar? I've just begun digging into root cause.