Skip to content

Instantly share code, notes, and snippets.

@Qixingchen
Created April 12, 2018 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Qixingchen/d270dbce51f2132d4641605cff6f6afe to your computer and use it in GitHub Desktop.
Save Qixingchen/d270dbce51f2132d4641605cff6f6afe to your computer and use it in GitHub Desktop.
GitLab Runner for autoscaling with Docker Machine on Google preemptible VM
[[runners]]
name = "gce-main-scal"
url = ""
token = ""
executor = "docker+machine"
# 最大伸缩量
limit = 3
[runners.docker]
tls_verify = false
image = "ubnutu:16.04"
privileged = false
disable_cache = false
volumes = ["/cache"]
shm_size = 0
# 缓存服务配置
[runners.cache]
Type = "s3"
ServerAddress = "10.138.0.2:9005" #your minio-instance
AccessKey = "" # minio AccessKey
SecretKey = "" # minio Secret
BucketName = "cache"
Insecure = true
Shared = true
[runners.machine]
# 配置见 https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-machine-section
IdleCount = 0
IdleTime = 120
MaxBuilds = 3
MachineDriver = "google"
MachineName = "ci-as-w-%s"
MachineOptions = [
# docker machine 配置 见 https://docs.docker.com/machine/drivers/gce/
"google-project=jwb-android",
"google-zone=us-west1-c",
"google-machine-type=custom-2-5120",
"google-machine-image=ubuntu-os-cloud/global/images/ubuntu-1604-xenial-v20180405",
"google-tags=gitlab-ci-runner-worker,project-noip",
# 抢占式实例
"google-preemptible=true",
"google-use-internal-ip=true",
# 代理容器注册服务
"engine-registry-mirror=http://10.138.0.2:6000"
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment