[英]Gitlab runner on aws ec2 : Have one ec2 launching multiple concurrent jobs
I followed this tutorial: https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/我遵循了本教程: https://docs.gitlab.com/runner/configuration/runner_autoscale_aws/
And it works perfectly, I put the runner in only one branch for testingBut in our pipeline with have like 15 jobs in one stage, but my configuration launch only 2 ec2 machines, so the jobs are taken only 2 at a time, but I want one machine to take 4-5 jobs at the same time它工作得很好,我只把跑步者放在一个分支中进行测试但是在我们的管道中,一个阶段有 15 个工作,但我的配置只启动 2 台 ec2 机器,所以一次只接受 2 个工作,但我想要一台机器同时承担4-5份工作
My jobs on the same stage: https://imgur.com/a/s2HjGML我的同台工作: https://imgur.com/a/s2HjGML
This is my config.toml这是我的 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"
Is my config not good for what I want or what do I want is impossible?我的配置不适合我想要的东西还是我想要的东西是不可能的? Thanks guys !多谢你们 !
You've set limit = 2
in your configuration.您在配置中设置了limit = 2
。 This will limit the total number of jobs handled by all runners defined in this configuration file to 2.这会将此配置文件中定义的所有运行器处理的作业总数限制为 2。
Set this limit to a higher number to allow more jobs to run concurrently.将此限制设置为更高的数字以允许更多作业同时运行。
See also the relationship between limit
, concurrent
and IdleCount
.另请参阅limit
、 concurrent
和IdleCount
之间的关系。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.