LoginSignup
13
13

More than 5 years have passed since last update.

Gitlab CI Multi Runnerをインストール・Registerする

Posted at

Gitlab CIを使用してみる

 突然CIしてみたくなったのでちょうど手元にあるgitlab CIでビルドできる環境を作ってみます.
 Runnerのインストールで躓いたのでメモ.

下準備

  • Debian
  • Gitlab CE 8.2.2

Gitlab CIを使用できるようにするまで

公式ドキュメント

 ドキュメントはここにあるので,基本的にはこの手順通りに行っていく.
 runnerをインストールするあたりからドキュメントが怪しいのでそれ以降は次の手順で行いました.

gitlab-ci-multi-runnerをインストールする

 上記ドキュメントに従うとapt-getのときにgitlab-ci-multi-runnerがないと言われてしまいます.
 そんなときはgitlab-ci-multi-runner自体のドキュメントにしたがって入れて行きましょう.

gitlab-ci-multi-runnerをregisterする

http://gitlabのホーム/ci/admin/runners にrunner登録用のtokenが書いてあるのでこれをコピーしておきます.

後は下記の通りコマンドを実行し,指示されたとおりに返事していれば勝手に使用できるようになります.
executorはこのRunnerをどこで実行するかを指定します.私はDockerにしましたが何でも良い気がします.

xxxx:~$ sudo gitlab-ci-multi-runner register
Please enter the gitlab-ci coordinator URL (e.g. https://gitlab.com/ci):
http://gitlabのドメイン名等orIPアドレスがここに来る/ci
Please enter the gitlab-ci token for this runner:
#上記手順で取得したトークンをここで入れる
Please enter the gitlab-ci description for this runner:
[gitlabのドメイン名等orIPアドレスがここに来る]:
Please enter the gitlab-ci tags for this runner (comma separated):

INFO[0063] c73130de Registering runner... succeeded
Please enter the executor: shell, parallels, docker, docker-ssh, ssh:
docker
Please enter the Docker image (eg. ruby:2.1):
ruby2.1
If you want to enable mysql please enter version (X.Y) or enter latest?

If you want to enable postgres please enter version (X.Y) or enter latest?

If you want to enable redis please enter version (X.Y) or enter latest?

If you want to enable mongo please enter version (X.Y) or enter latest?

INFO[0076] Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!

あとは公式ドキュメント通りにいれれば無事動きましたとさ.

13
13
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
13