Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
topics:docker-install-gitlab-ci-runner [2017/04/09 16:34]
orzfly
topics:docker-install-gitlab-ci-runner [2017/04/09 17:09]
orzfly
Line 10: Line 10:
 EXAMPLE # find at https://git.EXAMPLE.com/admin/runners EXAMPLE # find at https://git.EXAMPLE.com/admin/runners
 Please enter the gitlab-ci description for this runner: Please enter the gitlab-ci description for this runner:
-[EXAMPLE00000]: digitalocean-auto-nyc3+[EXAMPLE00000]: EXAMPLE-digitalocean-auto-nyc3
 Please enter the gitlab-ci tags for this runner (comma separated): Please enter the gitlab-ci tags for this runner (comma separated):
-digitalocean,digitalocean-nyc3,linux+EXAMPLE,digitalocean,digitalocean-nyc3,linux
 Whether to run untagged builds [true/false]: Whether to run untagged builds [true/false]:
 [false]: true [false]: true
Line 22: Line 22:
 Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded! Runner registered successfully. Feel free to start it, but if it's running already the config should be automatically reloaded!
 </code> </code>
-  - Create ''/srv/gitlab-ci-runner/digitalocean-auto-nyc3/config/config.toml''<code toml /srv/gitlab-ci-runner/digitalocean-auto-nyc3/config/config.toml>+  - Create ''/srv/gitlab-ci-runner/EXAMPLE/config/config.toml'' 
 +    * DigitalOcean: <code toml /srv/gitlab-ci-runner/digitalocean-auto-nyc3/config/config.toml>
 concurrent = 5 concurrent = 5
  
Line 52: Line 53:
     ]     ]
 </code> </code>
 +      * List all images: <code shell-session>$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer EXAMPLE_YOUR_TOKEN" "https://api.digitalocean.com/v2/images?page=1&per_page=1000&type=application"</code>
 +    * AWS EC2: <code toml /srv/gitlab-ci-runner/auto-aws-us-west-1/config/config.toml>
 +concurrent = 5
 +
 +[[runners]]
 +  name = "auto-aws-us-west-1"
 +  url = "https://git.EXAMPLE.com/ci"
 +  token = "FIND_AT https://git.EXAMPLE.com/admin/runners/EXAMPLE"
 +  executor = "docker+machine"
 +  environment = ["DOCKER_AUTH_CONFIG={...}"]
 +  [runners.docker]
 +    image = "ubuntu:xenial"
 +    tls_verify = false
 +    privileged = true
 +    disable_cache = true
 +  [runners.cache]
 +    Insecure = false
 +  [runners.machine]
 +    IdleCount = 0
 +    IdleTime = 1200
 +    MachineDriver = "amazonec2"
 +    MachineName = "orzgit-%s"
 +    MachineOptions = [
 +      "amazonec2-access-key=EXAMPLE",
 +      "amazonec2-secret-key=EXAMPLE",
 +      "amazonec2-region=us-west-1",
 +      "amazonec2-ami=ami-615cb725",
 +      "amazonec2-ssh-user=ubuntu",
 +      "amazonec2-instance-type=t2.medium"
 +    ]
 +</code>
 +      * AWS AMI is only available per region! https://cloud-images.ubuntu.com/releases/14.04/release-20150603/
   - Save systemd configuration<code ini /etc/systemd/system/gitlab-ci-runner@.service>   - Save systemd configuration<code ini /etc/systemd/system/gitlab-ci-runner@.service>
 [Unit] [Unit]
Line 92: Line 125:
   * Self-signed SSL?   * Self-signed SSL?
     * https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/tls-self-signed.md     * https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/tls-self-signed.md
-    * Mount your certificate file at ''/etc/gitlab-runner/certs/my.gitlab.server.com.crt'' with Docker volume+    * Mount your certificate file at ''/etc/gitlab-runner/certs/git.EXAMPLE.com.crt'' with Docker volume
   * Do NOT stop runners if it has started any VMs! Just wait until all VMs terminated. If you do...   * Do NOT stop runners if it has started any VMs! Just wait until all VMs terminated. If you do...
     - Terminate all machines on your own at DigitalOcean/AWS/YourCloud...     - Terminate all machines on your own at DigitalOcean/AWS/YourCloud...
Line 104: Line 137:
   * https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/autoscale.md   * https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/blob/master/docs/configuration/autoscale.md
   * https://docs.docker.com/machine/drivers/   * https://docs.docker.com/machine/drivers/
 +  * https://github.com/janeczku/docker-machine-vultr
  
 {{tag>docker-install gitlab gitlab-ci}} {{tag>docker-install gitlab gitlab-ci}}