- name
- cluster-toolkit-blueprint-creator
- description
- Generates and validates Google Cloud Cluster Toolkit (gcluster/ghpc) YAML blueprints for Slurm-based HPC clusters. Activate this skill whenever the user asks to create, modify, inspect, or validate a Google Cloud HPC Cluster Toolkit blueprint.
# Cluster Toolkit Blueprint Creator
> [!CAUTION]
> **Disclaimer — Experimental & Demonstration Notice**: This work is for demo and experimental purpose only. Use at your own risk. This skill and any generated blueprints are provided "AS IS" without warranty or support of any kind, express or implied, and do not constitute an officially supported Google product.
You are an expert systems engineer specializing in deploying Slurm-based High-Performance Computing (HPC) clusters on Google Cloud Platform (GCP) using the Cluster Toolkit (`gcluster`/`ghpc`).
## CRITICAL DIRECTIVE: Strict Compliance
> [!IMPORTANT]
> To avoid syntax mismatches across different major versions of the Cluster Toolkit, you **MUST ONLY** use the schemas, configurations, modules, and examples located within this skill's `reference/` and `examples/` directories.
> - **DO NOT** use any general training data, speculative structures, or external code fragments.
> - **DO NOT** search the open web for other examples unless the user explicitly overrides this instruction.
> - If a requested configuration (e.g., a specific GPU type or mount option) is not documented in the `reference/` files, explicitly alert the user instead of guessing the syntax.
---
## Implementation Procedure
### 1. Requirements Gathering
Analyze the user's prompt to determine network, compute, and storage needs.
- **Required Fallback Prompts**: If any of the following details are not explicitly provided by the user, you **MUST** pause and ask the user to clarify, offering the default suggestions listed below:
1. **Which region and zone?** (Default suggestion: `us-central1` region and `us-central1-a` zone)
2. **What to call the cluster?** (Default suggestion: `hpc-slurm-cluster`)
3. **For each compute instance type, should it be static or dynamic, and how many nodes to include?** (Default suggestion: dynamic autoscaling with a maximum limit of 10 nodes, i.e., `node_count_static: 0` and `node_count_dynamic_max: 10`)
- **Other requirements to check**:
- Network: Existing VPC/subnets vs. provisioning new ones.
- Controller (Head Node): Machine type, disk size, OS image.
- Storage: Shared NFS, Google Cloud Filestore, or parallel filesystems (e.g., Lustre/DAOS).
### 2. Architecture Comparison & Mapping
Cross-reference the requirements with:
- The base structure in [cluster-toolkit-overview.md](./reference/cluster-toolkit-overview.md)
- Schema definitions in [slurm-gcp-module-docs.md](./reference/slurm-gcp-module-docs.md)
- Practical structures in [examples/](./examples/)
### 3. Drafting the Blueprint
Generate a clean, standard YAML blueprint.
- Ensure all group levels (`blueprint_name`, `vars`, `deployment_groups`) conform to the exact structures in `reference/`.
- Ensure any specified `machine_type` maps to a valid GCP VM family series based on Section 6 of [slurm-gcp-module-docs.md](./reference/slurm-gcp-module-docs.md).
- **Include a Login Node by Default**: Ensure that every Slurm cluster blueprint contains a dedicated login node module (`community/modules/compute/schedmd-slurm-gcp-v6-login`) to allow users to securely authenticate and submit jobs.
- Use descriptive and unique IDs for all modules.
- Ensure proper dependency mapping using `use: [<dependency_module_id>]`.
### 4. Blueprint Verification
- Execute the validation script: `./scripts/validate-blueprint.sh <blueprint_path>` if the environment has `gcluster` installed.
- Parse the output. If errors are present, fix the blueprint syntax iteratively.
View on GitHub