instances: - name: master-1 ami: ubuntu-24.04 # ✅ 可用 ami-xxx 或关键词(如 ubuntu-22.04) type: t3a.xlarge disk_size_gb: 20 sg_names: ["dev-vpc-1-default-inbound"] subnet: dev-vpc-1-public-subnet-1 lifecycle: spot # 可选: ondemand(默认)或 spot ttl: 1h # 可选: 标记生命周期(不会自动销毁) env: sit # 可选: dev/sit/prod 等环境标签 owner: devops # 可选: 资源责任人标签 associate_public_ip: true # ✅ 明确配置是否需要公网 IP - name: slave-1 ami: ubuntu-24.04 type: t3.small sg_names: ["dev-vpc-2-default-inbound"] disk_size_gb: 20 subnet: dev-vpc-2-public-subnet-1 lifecycle: spot ttl: 1h env: sit owner: devops associate_public_ip: true - name: agent-1 ami: ubuntu-24.04 type: t3.micro disk_size_gb: 20 subnet: dev-vpc-1-public-subnet-1 sg_names: ["dev-vpc-1-default-inbound"] lifecycle: spot ttl: 1h env: sit owner: devops associate_public_ip: true - name: agent-2 ami: ubuntu-24.04 type: t3.micro disk_size_gb: 20 subnet: dev-vpc-2-public-subnet-1 sg_names: ["dev-vpc-2-default-inbound"] lifecycle: spot ttl: 1h env: sit owner: devops associate_public_ip: true