You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
## Description
This adds the optional instance_ready_command parameter for the
docker_autoscaler.
This feature was added in Gitlab 16.11. See gitlab documentation for the
[runners.autoscaler]:
https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runnersautoscaler-section.
Example value:
`instance_ready_command = "cloud-init status --wait"`
## Migrations required
No
## Verification
Updated the runner_worker_docker_autoscaler by including the
instance_ready_command
```
runner_worker_docker_autoscaler = {
fleeting_plugin_version = "1.0.0"
connector_config_user = "ec2-user"
key_pair_name = "runner-worker-key"
max_use_count = 100
update_interval = "1m"
update_interval_when_expecting = "2s"
capacity_per_instance = var.job_capacity_per_instance
instance_ready_command = "\"cloud-init status --wait || test $? -eq 2\""
}
```
Confirmed this gets added correctly to the config.toml by enabling the
var.debug_write_runner_config_to_file.
Result on the local_file.config_toml[0]:
```
...
[runners.autoscaler]
plugin = "fleeting-plugin-aws"
capacity_per_instance = 1
update_interval = "1m"
update_interval_when_expecting = "2s"
max_use_count = 100
max_instances = 1
instance_ready_command = "cloud-init status --wait || test $? -eq 2"
....
```
If no value is given for the instance_ready_command the config.toml will
default to
```
...
[runners.autoscaler]
plugin = "fleeting-plugin-aws"
capacity_per_instance = 1
update_interval = "1m"
update_interval_when_expecting = "2s"
max_use_count = 100
max_instances = 1
instance_ready_command=""
...
```
max_use_count = Max job number that can run on a worker
611
611
update_interval = The interval to check with the fleeting plugin for instance updates.
612
612
update_interval_when_expecting = The interval to check with the fleeting plugin for instance updates when expecting a state change.
613
+
instance_ready_command = Executes this command on each instance provisioned by the autoscaler to ensure that it is ready for use. A failure results in the instance being removed.
0 commit comments