ezgh compute autoscaling-groups create <name> --min n --max n --instance-type t --image <alias|img_id> [--desired n] [launch flags] [policy flags] [flags]Create an autoscaling group: --min and --max set its size (at most 100 instances), --desired where it starts (default --min), and the launch flags what each member launches, as ezgh compute instances launch takes them (a group’s members can’t use existing volumes or interfaces). Members are named <group>-<random>. The group scales to hold its policies’ targets: --cpu-target and --memory-target are percentages of the members’ average CPU and memory utilization; --promql-policy name=<name>,target=<target>,query=<query> (repeat) holds a PromQL query that gives one series at its target, with __asg_instances__ standing for the group’s warm members’ instance IDs. Without a policy the group stays at --desired. --target-group (repeat, at most 5) registers each member in a load balancer target group (tgp_…) once it’s running, and drains it from there before it goes; each one needs lb.targetGroups.registerTargets and lb.targetGroups.deregisterTargets.
It prints the CreateAutoscalingGroup operation, or with --wait waits until the group is active and prints it. Needs compute.autoscalingGroups.create.
Part of ezgh compute autoscaling-groups.
Examples
ezgh compute autoscaling-groups create web --min 2 --max 10 --instance-type gp-1.large --image linux/ubuntu:26.04 --ssh-key laptop --cpu-target 60 --waitFlags
| Flag | Type | Default | Description |
|---|---|---|---|
--batch-percent |
int | the share of the group a release replaces at a time, 1–100 (default 25) | |
--bot |
string | attach a Bot (bot_…): code on the instance gets short-lived credentials for it | |
--cpu-target |
string | keep the members’ average CPU utilization at this percentage (policy cpu) | |
--desired |
int | how many instances the group aims for, between --min and --max (default on create: --min) |
|
--firewall |
string, repeatable | a firewall for the new interface (ID, UUID or name), in place of the project’s default (repeat) | |
--health-check-grace |
int | seconds before a new member’s health is judged (default 300) | |
--image |
string | the image alias, such as linux/ubuntu:26.04, or an exact image ID (img_…) | |
--instance-type |
string | the instance type, such as gp-1.large (required); ezgh compute instance-types list shows the organization’s | |
--instance-warmup |
int | seconds before a new member’s metrics count (default 300) | |
--ipv4 |
boolean | give the new interface a public IPv4 address | |
--ipv6 |
boolean | with --primary-subnet: give it a public IPv6 /64 |
|
--max |
int | the most instances the group runs (at most 100) | |
--memory-target |
string | keep the members’ average memory utilization at this percentage (policy memory) | |
--min |
int | the fewest instances the group keeps (0–100) | |
--new-volume |
string, repeatable | create and attach a volume: <GiB>[:<volume type>] (repeat) | |
--no-firewalls |
boolean | no firewall on the new interface | |
--no-ipv4 |
boolean | with --primary-subnet: no public IPv4 address, whatever the subnet’s auto-assign |
|
--no-ipv6 |
boolean | with --primary-subnet: no public IPv6 /64, whatever the subnet’s auto-assign |
|
--primary-subnet |
string | make the new interface private, in this VPC subnet (ID, UUID or name) | |
--promql-policy |
string, repeatable | a policy on a PromQL query: name=<name>,target=<target>,query=<query>; the query comes last and takes the rest of the value (repeat) | |
--root-iops |
int | the root volume’s provisioned IOPS, for types that take it | |
--root-size |
int | the root volume’s size in GiB (default: the image’s minimum) | |
--root-throughput |
int | the root volume’s provisioned throughput in MB/s, for types that take it | |
--root-volume-type |
string | the root volume’s type (default: the block store’s default) | |
--scale-in-cooldown |
int | seconds a smaller size must hold before the group scales in (default 300) | |
--ssh-key |
string, repeatable | an SSH key of the project to install, by ID, UUID or name (repeat, at most 10) | |
--subnet |
string, repeatable | add a new private interface in this VPC subnet (ID, UUID or name), after the primary (repeat) | |
--tag |
string, repeatable | a tag, key=value (repeat) | |
--target-group |
string, repeatable | a target group (tgp_…) the members are registered in, at most 5; repeat for more | |
--user-data |
string | a file of user-data (cloud-init), - for stdin, at most 16 KiB | |
--wait |
boolean | wait until the group is active, and print it then | |
--wait-timeout |
duration | 10m0s |
how long --wait waits |
This command also takes the global flags.