agentleFS
Microsoft AzureKnown publisherAzure/sap-automation-qa/skills/workspace-creator/SKILL.md

workspace-creator

Skill14 starsChanged 58 days agoMITView on GitHub

Create new SAP workspace configurations for STAF testing — generates sap-parameters.yaml and hosts.yaml under WORKSPACES/SYSTEM/ from templates. Use when asked to create a workspace or onboard a new SAP system in an existing STAF installation; not for installing STAF itself (see setup-guide) and not for checking a workspace that already exists (see workspace-validator). Triggered by "create workspace", "new workspace", "onboard system", "onboard SAP system", "add new system", "generate hosts.yaml", "generate sap-parameters", or "setup SAP system for testing".

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 5 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    All workspaces live under:

    line 48
  2. Distinctive:

    Before creating a workspace, gather:

    line 58
  3. Distinctive:

    Create the directory structure:

    line 167
  4. Distinctive:

    Place SSH key file in workspace (if not using Key Vault)

    line 176
  5. Distinctive:

    Before reporting workspace creation complete:

    line 209

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Workspace Creator

Creates new SAP workspace configurations for STAF testing. Generates sap-parameters.yaml and hosts.yaml from templates based on user-provided system details.

Locate Framework

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/.

When to Use

TriggerAction
create workspace / new workspaceFull workspace creation
onboard system / setup SAP systemGuide through system onboarding
generate hosts.yamlCreate inventory file
generate sap-parametersCreate SAP parameters file
add new systemCreate workspace directory structure

Workspace Location

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

Required Information

Before creating a workspace, gather:

InformationExampleRequired
System config nameDEV-WEEU-SAP01-X00Yes
SAP SIDX00Yes
Database SIDHDBYes
PlatformHANA or DB2Yes
DB hosts (2 for HA)hostname, IP, VM nameYes
SCS hosthostname, IP, VM nameFor SCS tests
ERS hosthostname, IP, VM nameFor SCS tests
Authentication typeSSHKEY or VMPASSWORDYes
SSH key or Key VaultKey file path or secret URLYes
HA configurationdatabase/scs HA, cluster typeYes

Templates

sap-parameters.yaml Template

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

hosts.yaml Template

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]

Creation Steps

  1. Create the directory structure:
    mkdir -p WORKSPACES/SYSTEM/{SYSTEM_CONFIG_NAME}/{logs,quality_assurance}
  2. Generate sap-parameters.yaml from template with user values
  3. Generate hosts.yaml from template with user values
  4. Place SSH key file in workspace (if not using Key Vault)
  5. Validate with workspace-validator

Output Format

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 Handling

ErrorCauseFix
Directory already existsRe-creation attemptUse existing or remove first
Invalid SIDNot 3 uppercase alphanumericFix to 3 chars (e.g., X00)
Missing DB host infoIncomplete user inputNeed hostname, IP, VM name for both DB nodes
No SSH key providedAuth not configuredProvide key file or Key Vault details

Pre-Completion Checklist

Before reporting workspace creation complete:

  • Directory exists under WORKSPACES/SYSTEM/
  • sap-parameters.yaml has all required fields
  • hosts.yaml has correct groups for intended test type
  • All hosts have ALL fields (ansible_host, ansible_user, ansible_connection, connection_type, virtual_host, become_user, os_type, vm_name)
  • SSH authentication is configured (key file, Key Vault, or password)
  • logs/ and quality_assurance/ directories exist
  • Validated with workspace-validator

Related Skills

After creation...Use skill
Validate the workspaceworkspace-validator
Run teststest-runner
Environment not set up yetsetup-guide

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

Reviews can't be read right now.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.