Overview
Add a new HyperPod instance group to the current active cluster. Corresponds to the "Add Instance Group" button on the Cluster Management page.
Step 1: Collect Parameters
- Call
cluster_get_availability_zonesandcluster_get_available_instancesin parallel - Ask user for ALL of the following (show available options):
- instanceGroupName: name for the new instance group
- instanceType: GPU instance type (e.g. ml.g5.xlarge, ml.p4d.24xlarge)
- instanceCount: number of instances
- availabilityZone: which AZ (e.g. us-east-1c)
- volumeSize: EBS volume size in GB (default 500)
- Capacity type: ask whether to use on-demand, Spot, or Training Plan (reserved capacity)
- If Training Plan: ask for the trainingPlanArn
- If Spot: set isSpot=true (no further questions needed)
- If on-demand: default, no extra params
Step 2: Validate Parameters
- If user provides both a trainingPlanArn and an availabilityZone, extract the AZ from the Training Plan ARN and compare:
- Training Plan ARNs encode the AZ info. If the user-specified AZ conflicts with the Training Plan's AZ, use the Training Plan's AZ and inform the user of the override.
- Confirm the final parameters with the user before proceeding.
Step 3: Add Instance Group
- Call
hyperpod_add_instance_groupwith the validated parameters - Inform user: estimated wait 5-15 minutes
- MUST poll
hyperpod_get_instance_group_status(name=instanceGroupName)every 60 seconds untilready: trueorfailed: true. This checks actual cluster state and current/target capacity;hyperpod_get_creation_statusonly checks the initial CloudFormation creation. Between each poll, callwait_seconds(60)to wait. Report each poll result to the user. Do NOT skip polling.
Step 4: Verify
- Call
cluster_get_statusto show updated cluster state (nodes, GPUs, instance groups) - Summarize what was added
Rules
- Always ask user about capacity type (on-demand / Spot / Training Plan). Default is on-demand.
- If user mentions "spot" anywhere in the conversation, set isSpot=true without further questions about capacity type.
- Training Plan ARN's AZ takes precedence over user-specified AZ. Always inform user if overriding.
- After the add operation starts, you MUST automatically poll for status. Never tell the user to "check later".
- Stop immediately on any failure and report the error clearly.