/staf:workspace-creatorfrom staf
Creates SAP workspace configurations for STAF testing by generating sap-parameters.yaml and hosts.yaml from templates. Use when onboarding a new SAP system or creating a workspace.
Ships in staf. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Creates new SAP workspace configurations for STAF testing. Generates sap-parameters.yaml
and hosts.yaml from templates based on user-provided system details.
This skill requires a trusted STAF checkout — a working tree the
operator has verified out-of-band as either the official upstream
(https://github.com/Azure/sap-automation-qa.git) or a fork of it, at a
specific revision, with the framework marker ./scripts/sap_automation_qa.sh
present. The operator must have verified both the source (upstream URL or
fork URL) and the revision through a trusted out-of-band channel before
running this skill, and must have cd-ed into that directory. If that
state is not confirmed, stop and use the setup-guide skill first; it owns
the setup workflow. Do not resume this skill until setup-guide (or the
operator directly) confirms the checkout is trusted.
⚠️ This skill is guidance only. Do NOT modify any source code, scripts, or framework files. Only help the user by creating workspace configuration files (sap-parameters.yaml, hosts.yaml) under WORKSPACES/SYSTEM/.
| Trigger | Action |
|---|---|
create workspace / new workspace | Full workspace creation |
onboard system / setup SAP system | Guide through system onboarding |
generate hosts.yaml | Create inventory file |
generate sap-parameters | Create SAP parameters file |
add new system | Create workspace directory structure |
All workspaces live under:
WORKSPACES/SYSTEM/{SYSTEM_CONFIG_NAME}/
The SYSTEM_CONFIG_NAME follows the convention: {ENV}-{REGION}-{SYSTEM}-{SID}
Example: DEV-WEEU-SAP01-X00
Before creating a workspace, gather:
| Information | Example | Required |
|---|---|---|
| System config name | DEV-WEEU-SAP01-X00 | Yes |
| SAP SID | X00 | Yes |
| Database SID | HDB | Yes |
| Platform | HANA or DB2 | Yes |
| DB hosts (2 for HA) | hostname, IP, VM name | Yes |
| SCS host | hostname, IP, VM name | For SCS tests |
| ERS host | hostname, IP, VM name | For SCS tests |
| Authentication type | SSHKEY or VMPASSWORD | Yes |
| SSH key or Key Vault | Key file path or secret URL | Yes |
| HA configuration | database/scs HA, cluster type | Yes |
See templates/sap-parameters.yaml.template
All fields:
# ─── Application tier ─────────────────────────────────────────
sap_sid: X00
scs_high_availability: true # boolean
scs_cluster_type: AFA # Fencing mechanism: AFA (Azure Fencing Agent), ISCSI, or ASD (Azure Shared Disks)
scs_instance_number: "00" # 2-digit string
ers_instance_number: "01" # 2-digit string
# ─── Database tier ────────────────────────────────────────────
db_sid: HDB
db_instance_number: "00" # 2-digit string
platform: HANA # HANA, DB2
database_high_availability: true # boolean
database_cluster_type: AFA # Fencing mechanism: AFA (Azure Fencing Agent), ISCSI, or ASD (Azure Shared Disks)
database_scale_out: false # boolean
# ─── Storage ──────────────────────────────────────────────────
NFS_provider: AFS # AFS, ANF
# ─── Key Vault (optional — for SSH credential retrieval) ──────
key_vault_id: /subscriptions/.../Microsoft.KeyVault/vaults/<name>
secret_id: https://<name>.vault.azure.net/secrets/<secret>/<id>
# ─── Managed Identity (optional) ──────────────────────────────
user_assigned_identity_client_id: "00000000-0000-0000-0000-000000000000"
# ─── ANF (optional — when NFS_provider=ANF) ───────────────────
ANF_account_rg: "ANF-RESOURCE-GROUP"
ANF_account_name: "ANF-ACCOUNT-NAME"
# ─── Azure Backup (optional — for AzureBackupDatabase tests) ──
backup_vault_resource_id: "/subscriptions/.../Microsoft.RecoveryServices/vaults/<name>"
backup_container_name: "VMAppContainer;Compute;<rg>;<vm>"
backup_item_name: "saphanadatabase;<sid>;<db>"
backup_target_filesystem_path: "/hana/backup/restore"
backup_target_container_name: "VMAppContainer;Compute;<rg>;<target-vm>"
backup_target_database_name: "SYSTEMDB"
backup_restore_point_time: "" # ISO 8601 UTC, empty for latest
See templates/hosts.yaml.template
Structure (5 groups):
{SID}_DB: # 2 hosts for HA
hosts:
{hostname}:
ansible_host : {IP}
ansible_user : azureadm
ansible_connection : ssh
connection_type : key
virtual_host : {virtual_hostname}
become_user : root
os_type : linux
vm_name : {AZURE_VM_NAME}
vars:
node_tier : hana
supported_tiers : [hana]
{SID}_SCS: # 1 host
hosts: ...
vars:
node_tier : scs
supported_tiers : [scs]
{SID}_ERS: # 1 host
vars:
node_tier : ers
supported_tiers : [ers]
{SID}_PAS: # 1 host
vars:
node_tier : pas
supported_tiers : [pas]
{SID}_APP: # 1+ hosts
vars:
node_tier : app
supported_tiers : [app]
Create the directory structure:
mkdir -p WORKSPACES/SYSTEM/{SYSTEM_CONFIG_NAME}/{logs,quality_assurance}
Generate sap-parameters.yaml from template with user values
Generate hosts.yaml from template with user values
Place SSH key file in workspace (if not using Key Vault)
Validate with workspace-validator
After workspace creation:
✅ Workspace created: WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00/
Files created:
✅ sap-parameters.yaml (platform: HANA, HA: true)
✅ hosts.yaml (groups: X00_DB[2], X00_SCS[1], X00_ERS[1], X00_PAS[1], X00_APP[1])
✅ SSH key: ssh_key.pem
✅ logs/ directory created
✅ quality_assurance/ directory created
Next steps:
1. Validate: python3 skills/workspace-validator/scripts/validate_workspace.py WORKSPACES/SYSTEM/DEV-WEEU-SAP01-X00
2. Run tests: ./scripts/sap_automation_qa.sh --test-groups=HA_DB_HANA --test-cases=[ha-config]
| Error | Cause | Fix |
|---|---|---|
| Directory already exists | Re-creation attempt | Use existing or remove first |
| Invalid SID | Not 3 uppercase alphanumeric | Fix to 3 chars (e.g., X00) |
| Missing DB host info | Incomplete user input | Need hostname, IP, VM name for both DB nodes |
| No SSH key provided | Auth not configured | Provide key file or Key Vault details |
Before reporting workspace creation complete:
WORKSPACES/SYSTEM/sap-parameters.yaml has all required fieldshosts.yaml has correct groups for intended test typelogs/ and quality_assurance/ directories exist| After creation... | Use skill |
|---|---|
| Validate the workspace | workspace-validator |
| Run tests | test-runner |
| Environment not set up yet | setup-guide |
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub azure/sap-automation-qa --plugin staf5 skills in this plugin
/setup-guideGuide for setting up the SAP Testing Automation Framework itself on a management server — Python venv, Docker, vars.yaml, Copilot integration. Use for framework installation, not for creating a workspace for a specific SAP system (see workspace-creator). Use when asked about installation, setup, Docker deployment, or Copilot integration. Triggered by "setup environment", "install staf", "how to get started", "container start", "setup.sh", "configure vars.yaml", "setup help", or "docker deployment".
/test-result-analyzerAnalyze STAF test results and identify root causes. Use when asked about test failures, what went wrong, or to interpret test output. Triggered by "analyze results", "why did test fail", "test output", "check test status", "read test log", "interpret report", or "what happened in test".
/test-runnerExecute STAF tests using sap_automation_qa.sh. Supports direct Ansible execution and API mode. Use when asked to run tests, execute configuration checks, or start HA tests on SAP systems. Triggered by "run test", "execute ha test", "start test", "run configuration check", "test my system", or "trigger test job".
/workspace-validatorValidate an existing SAP workspace configuration before running tests — checks sap-parameters.yaml, hosts.yaml, and SSH auth readiness. Use when asked to validate or troubleshoot a workspace that already exists; not for creating a new one from scratch (see workspace-creator) and not for framework installation issues (see setup-guide). Triggered by "validate workspace", "check workspace", "workspace issues", "fix workspace", "sap-parameters check", "hosts.yaml check", "SSH auth problems", or "troubleshoot workspace".
Other plugins' skills for the same job