gitlab-runner commands lifecycle for restarting runner

gitlab-runner commands lifecycle for restarting runner

我正在尝试配置运行器并使用参考 https://docs.gitlab.com/runner/commands/

但不清楚命令生命周期的用途 run/start/install/register

启动 运行ner 和 运行ning(以及幸存的重新启动)的步骤应该是:

  1. Download the runner
  2. Register the runner
  3. 安装 运行ner 和服务:
gitlab-runner install
gitlab-runner start

机器现在应该可以用作 运行ner,不需要对它做任何其他事情(直到你想更新 运行ner...)。


Should register be called once or every time I reboot the system. What about install and start?

Register 应该被调用一次,这会创建一个 config.toml 文件来保存重新启动时的注册配置。文件位置根据其注册方式而变化。 Linux 上的 IE,在 sudo 上注册 shell 运行ner,会将 config.toml 文件保存到 /etc/gitlab-runner/config.toml.

关于 installstart,也只需要 运行 一次并且在重新启动后仍然存在。 install 将 GitLab Runner 安装为服务,start 只是 运行 第一次安装它。

To restart a runner should I do stop , uninstall and then install start run?

就做一个gitlab-runner restart.

Should I have to run it or start would have the same effect?

如果您已经完成了 installstart,则无需使用 run。我相信 run 仅用于调试作业的一种用途(在打开的终端上)。 start 用于机器上的服务。

HTH.