我遵循了本教程:https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/
而且它工作得很完美!我在管道中只为testingBut的一个分支放置了一个分支,在一个阶段中有大约15个作业,但是我的配置只启动了2台ec2机器,所以每次只执行2台作业,但我希望一台机器同时承担4-5个任务。
我在同一舞台上的工作:https://imgur.com/a/s2HjGML
这是我的config.toml
concurrent = 8
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "gitlab-runner-xxxxx-dev"
url = "https://gitlab.com/"
token = "xxxxxxxxx"
executor = "docker+machine"
limit = 2
request_concurrency = 3
[runners.docker]
image = "alpine"
privileged = true
disable_cache = true
[runners.cache]
Type = "s3"
Shared = true
[runners.cache.s3]
ServerAddress = "s3.amazonaws.com"
AccessKey = "xxxxxxxx"
SecretKey = "xxxxx"
BucketName = "gitlab-runner-xxx-bucket"
BucketLocation = "eu-west-3"
[runners.machine]
IdleCount = 0
IdleTime = 1800
MaxBuilds = 10
MachineDriver = "amazonec2"
MachineName = "gitlab-docker-machine-%s"
MachineOptions = [
"amazonec2-access-key=xxxxxx",
"amazonec2-secret-key=xxxxxxx",
"amazonec2-region=eu-west-3",
"amazonec2-vpc-id=vpc-xxxx",
"amazonec2-subnet-id=subnet-xxxxx",
"amazonec2-use-private-address=true",
"amazonec2-tags=runner-manager-name,gitlab-aws-autoscaler,gitlab,true,gitlab-runner-autoscale,true",
"amazonec2-security-group=xxxxx",
"amazonec2-instance-type=m5.large",
]
[[runners.machine.autoscaling]]
Periods = ["* * 9-18 * * mon-fri *"]
IdleCount = 2
IdleTime = 3600
Timezone = "UTC"
[[runners.machine.autoscaling]]
Periods = ["* * * * * sat,sun *"]
IdleCount = 1
IdleTime = 60
Timezone = "UTC"我的配置对我想要的东西不好吗?或者我想要什么是不可能的?谢谢各位!
发布于 2022-03-21 11:44:01
您已经在配置中设置了limit = 2。这将限制此配置文件中定义的所有运行程序处理的作业总数为2。
将此限制设置为较高的数目,以允许更多作业同时运行。
https://stackoverflow.com/questions/71556410
复制相似问题