实例组和GITLAB CI
gitlab-gce-autoscaler的Python项目详细描述
Gitlab GCE自动缩放器
一个非常简单的用于gitlab ci的gce自动定标器
功能
- 监视gitlab管道中排队的作业
- 扩展GCE实例组以满足需求
就这样
概要
$ gitlab-gce-autoscaler --help Usage: gitlab-gce-autoscaler [OPTIONS] Options: --project-id TEXT GCE project ID --gce-zone TEXT GCE zone --gce-instance-group-name TEXT Name of GCE instance group [required] --job-filter TEXT Filter job names by this comma separated list of keywords --interval INTEGER Interval (in seconds) to poll GitLab API --gitlab-project-ids TEXT Comma separate list of GitLab projects IDs to poll for jobs [required] --gitlab-personal-token TEXT GitLab API token [required] --slots-per-instance INTEGER Target number of slots per instance --help Show this message and exit.
舵图
回购协议中有一张舵图。要使用它,您需要在GCE上创建具有以下权限的服务帐户:
compute.instanceGroupManagers.get
compute.instanceGroupManagers.update
然后,使用服务帐户凭据创建机密:
$ kubectl create secret generic gitlab-gce-autoscaler --from-file=service-account-creds.json=service-account.json secret/gitlab-gce-autoscaler created
现在安装图表:
$ helm upgrade --install gitlab-gce-autoscaler helm/gitlab-gce-autoscaler -f myvalues.yaml