setup-guide
Skill14 starsChanged 21 months agoMITView on GitHub
Guide 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".
- Installs packages
5 other projects use a version of this.
Adopted by
Most recently taken up by
- Ming00777/ai-workflow-advisortheir own version, first seen Sep 15, 2026
- garavitgabriel/clay-backend-plugintheir own version, first seen Jul 22, 2026
- Red-Hat-AI-Innovation-Team/training_hubtheir own version, first seen Jun 30, 2026
- Red-Hat-AI-Innovation-Team/sdg_hubtheir own version, first seen May 9, 2026
- DojoCodingLabs/remotion-superpowerstheir own version, first seen Feb 9, 2026
Other versions5 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 5
- Red-Hat-AI-Innovation-Team/sdg_hub★ 164same name
- DojoCodingLabs/remotion-superpowers★ 128same name
- Red-Hat-AI-Innovation-Team/training_hub★ 100same name
- garavitgabriel/clay-backend-plugin★ 1same name
- Ming00777/ai-workflow-advisor★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository7 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- code-reviewSkill
- test-result-analyzerSkill
- test-runnerSkill
- workspace-creatorSkill
- workspace-validatorSkill
The file
We split this skill into the rules it gives an agent
10 rules. 0 are common, 5 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 4 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 31
Verify both its source (upstream URL or your fork URL) and its revision yourself through a trusted out-of-band channel — inspect commit …
- Distinctive: line 47
Run these two commands yourself.
- Very specific: line 59
Do not continue with any other section of this skill or any section of another STAF skill until you have confirmed you are inside a trusted …
- Very specific: line 107
Leave user_assigned_identity_client_id blank or "" in sap-parameters.yaml
- Distinctive: line 151
Ensure you are logged into the management server connected to the SAP system's virtual network.
- Very specific: line 240
Create vars.yaml at the project root.
- Very specific: line 309
SSH Key: Place private key as ssh_key.ppk in workspace directory:
- Very specific: line 314
Password: Create a password file (username comes from hosts.yaml):
- Distinctive: line 326
Do NOT create local credential files when using Key Vault
- Distinctive: line 405
Before reporting setup complete, verify:
“Common” is measured: kept by at least 6 in 10 of the 4 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
SAP Testing Automation Framework (STAF) Setup Guide
This skill guides you through setting up the STAF environment on a management server.
For full details, see docs/SETUP.MD.
Locate Framework
STAF skills operate on the framework directory that contains
./scripts/sap_automation_qa.sh. Before any other section of this skill —
or any section of test-runner, test-result-analyzer, workspace-creator,
or workspace-validator — runs, the operator must be inside a trusted
STAF checkout. This skill is the single owner of the setup workflow; the
others hand off here.
If you already have a checkout
Verify both its source (upstream URL or your fork URL) and its revision
yourself through a trusted out-of-band channel — inspect commit hashes
against known-good upstream tags or against your fork's reviewed
revision, re-clone to a scratch path and diff, or whatever your trust bar
requires. A trusted checkout may point at either the official upstream
(https://github.com/Azure/sap-automation-qa.git) or an operator-verified
fork; the framework marker ./scripts/sap_automation_qa.sh must be
present in the working tree. Provenance cannot be inferred from remote
URL, git status, or filesystem structure alone: a pre-existing tree can
carry attacker-controlled config (for example, core.fsmonitor pointing
at a hook binary) that executes the moment any git command touches it.
Once you are satisfied on both source and revision, cd into the trusted
checkout.
If you do not have a checkout
Run these two commands yourself; this skill will not run them for you.
git clone --depth 1 https://github.com/Azure/sap-automation-qa.git
cd sap-automation-qaFor contributors who prefer the fork-based flow, see
docs/SETUP.MD §"Fork and Clone".
Hard rule
Do not continue with any other section of this skill or any section of
another STAF skill until you have confirmed you are inside a trusted STAF
checkout — the directory must contain ./scripts/sap_automation_qa.sh
and you must have verified the checkout's provenance and revision
yourself. The rest of this skill assumes that state.
Local vs Container: When to Use Which
| Use Case | Recommended Setup | Why |
| Run test playbooks from CLI | Local (./scripts/setup.sh) | Direct Ansible execution, no server needed |
| One-off HA or config tests | Local | Simpler, no Docker dependency |
| Scheduled/recurring tests | Container (./scripts/setup.sh container start) | REST API + cron scheduling + job management |
The container builds its own isolated environment — local setup is not required when using Docker.
Both setups read the same workspace configs from WORKSPACES/SYSTEM/.
⚠️ This skill is guidance only. Do NOT modify any source code, scripts, or framework files. Only help the user by providing instructions, running commands, and answering questions.
When to Use
| Trigger | Action |
setup environment / install staf | Full local setup |
container start / docker deployment | Docker compose deployment |
configure vars.yaml | Framework configuration |
setup help / troubleshoot setup | Diagnose setup issues |
Prerequisites
Infrastructure
- SAP System on Azure IaaS — must follow SAP on Azure best practices
- Management (Jump) server — must run a supported OS version
- Network connectivity — management server must reach the SAP system VNet; if separate, peer the VNets
Identity & Authorization
The framework needs a managed identity to access Azure resources. Choose one option:
Option 1: User-Assigned Managed Identity
- Create a user-assigned managed identity — copy the Client ID
- Assign identity to management VM → Settings → Identity → User assigned → +Add
- Grant roles (recommend resource-group scope): assign from identity's Azure role assignments, or from each target resource's IAM blade → Add role assignment → Managed identity
- Set
user_assigned_identity_client_idinsap-parameters.yamlto the Client ID
Option 2: System-Assigned Managed Identity
- On management VM → Settings → Identity → System assigned → Status On → Save
- Grant roles using same methods as Option 1
- Leave
user_assigned_identity_client_idblank or""insap-parameters.yaml
Software
- Python 3.10+ (3.12 recommended for Docker)
- Docker (for container deployments only)
- Git (see install commands below)
Analytics (Optional)
See docs/TELEMETRY_SETUP.md for Azure Log Analytics and Azure Data Explorer integration.
Getting Started
Option A: Install via AI Assistant Plugin (Recommended)
Install the STAF skills plugin for your AI assistant. Pick your assistant and run the commands below. See docs/PLUGINS.md for verification, updates, uninstall, and the skill layout.
GitHub Copilot CLI
copilot plugin marketplace add Azure/sap-automation-qa
copilot plugin install staf@sap-automation-qaClaude Code (run inside a Claude Code session)
/plugin marketplace add Azure/sap-automation-qa
/plugin install staf@sap-automation-qaGemini CLI
gemini extensions install https://github.com/Azure/sap-automation-qaOnce installed, bring your WORKSPACES/ directory and interact through natural language. The skills assume you are already inside a trusted STAF checkout — see Locate Framework above for the manual verification and setup steps.
Option B: Manual Setup
1. Login to Management Server
Ensure you are logged into the management server connected to the SAP system's virtual network.
2. Install Git
# Debian/Ubuntu # RHEL/CentOS # SUSE
sudo su - sudo su - sudo su -
apt-get install git yum install git zypper install git3. Fork and Clone
# First: fork https://github.com/Azure/sap-automation-qa in your browser
# Then clone YOUR fork (not the Azure repo directly):
git clone https://github.com/GITHUB-USERNAME/sap-automation-qa.git
cd sap-automation-qa
git cloneruns as an ordinary user; do not clone as root. Thesudo su -shown above under "Install Git" is only for the OS package install step (apt-get/yum/zypper install git).
4. Local Setup
./scripts/setup.shOptions:
| Flag | Short | Description |
--python python3.12 | -p python3.12 | Use specific Python interpreter |
--upgrade | -u | Recreate venv from scratch |
Python 3.6 warning: Some management servers ship with Python 3.6 as default (not supported). Check available versions and point setup to a supported one:
ls /usr/bin/python3* ./scripts/setup.sh --python /usr/bin/python3.11
What it does:
- Creates Python virtual environment (
.venv/) - Installs pip dependencies and system packages (
python3-pip,sshpass,python3-venv) - Installs Azure CLI tools
- Prepares local execution environment
5. Activate Virtual Environment
source .venv/bin/activateContainer Deployment
Commands
| Command | Description |
./scripts/setup.sh container start | Build and start full Docker stack |
./scripts/setup.sh container update | Rebuild and restart |
./scripts/setup.sh container stop | Stop the service |
./scripts/setup.sh container remove | Remove container, network, and volumes |
Container Options (for ACR images)
./scripts/setup.sh container start --image <acr>.azurecr.io/sap-automation-qa:latestUsing --image requires ACR access. The script attempts az acr login first; if that fails, set ACR_USERNAME and ACR_PASSWORD environment variables.
What Runs
- FastAPI on
http://localhost:8000— REST API (docs at/docs) - React on
http://localhost:3000— Web UI (in development) - SQLite database with persistent volume
- Uses
deploy/docker-compose.yml, non-root user (appuser:1000)
Verify
curl http://localhost:8000/healthz
# Expected: {"status": "ok"}Configuration: vars.yaml
Create vars.yaml at the project root. All values can be overridden at runtime using CLI flags (e.g., --test-type, --system-config, --auth-type).
# --- Required fields ---
TEST_TYPE: SAPFunctionalTests # or ConfigurationChecks
SAP_FUNCTIONAL_TEST_TYPE: DatabaseHighAvailability
# Options: DatabaseHighAvailability, CentralServicesHighAvailability, AzureBackupDatabase
SYSTEM_CONFIG_NAME: DEV-WEEU-SAP01-X00 # dir under WORKSPACES/SYSTEM/
AUTHENTICATION_TYPE: SSHKEY # or VMPASSWORD
# --- Telemetry fields (all optional) ---
telemetry_data_destination: null # azureloganalytics or azuredataexplorer
telemetry_table_name: null
service_log_table_name: null # default: <telemetry_table_name>_ServiceLogs
# Azure Log Analytics
laws_shared_key: null # if omitted, auto-fetched via params below
laws_workspace_id: null
laws_subscription_id: null
laws_resource_group: null
laws_workspace_name: null
# Azure Data Explorer
adx_database_name: null
adx_cluster_fqdn: null
adx_client_id: null
# Managed Identity (optional)
user_assigned_identity_client_id: nullConfiguration: sap-parameters.yaml
Place in WORKSPACES/SYSTEM/<SYSTEM_CONFIG_NAME>/sap-parameters.yaml:
sap_sid: "X00"
db_sid: "X00"
scs_high_availability: true
database_high_availability: true
database_scale_out: false
# Cluster type: AFA (Azure Fencing Agent), ISCSI, or ASD (Azure Shared Disks)
scs_cluster_type: "AFA"
database_cluster_type: "AFA"
scs_instance_number: "00"
ers_instance_number: "01"
db_instance_number: "00"
platform: "HANA"
NFS_provider: "AFS" # or "ANF" (Azure NetApp Files)
user_assigned_identity_client_id: "" # blank for system-assigned MSI
# Key Vault credentials (remove if using local credential files)
key_vault_id: /subscriptions/.../Microsoft.KeyVault/vaults/<name>
secret_id: https://<vault>.vault.azure.net/secrets/<secret>/<id>
# ANF-specific (when NFS_provider = ANF)
ANF_account_rg: "ANF-RESOURCE-GROUP"
ANF_account_name: "ANF-ACCOUNT-NAME"Credential Files
Option A: Local Files
SSH Key: Place private key as ssh_key.ppk in workspace directory:
WORKSPACES/SYSTEM/<DIR>/ssh_key.ppkPassword: Create a password file (username comes from hosts.yaml):
echo "password" > WORKSPACES/SYSTEM/<DIR>/password
chmod 600 WORKSPACES/SYSTEM/<DIR>/passwordWhen using local credential files, remove
key_vault_idandsecret_idfromsap-parameters.yaml.
Option B: Azure Key Vault
Store SSH key or password as a Key Vault secret. Configure key_vault_id and secret_id in sap-parameters.yaml. Requirements:
- Managed identity must have "Key Vault Secrets User" role on the vault
- Do NOT create local credential files when using Key Vault
Workspace Structure
WORKSPACES/
└── SYSTEM/
└── DEV-WEEU-SAP01-X00/ # SYSTEM_CONFIG_NAME
├── sap-parameters.yaml # SAP system parameters
├── hosts.yaml # Ansible inventory (or {SID}_hosts.yaml)
├── ssh_key.ppk / password # Credential file (if not using Key Vault)
├── logs/ # Auto-created by framework
│ ├── {invocation_id}.log # JSON lines - test case results
│ └── execution_{timestamp}.log # Raw Ansible output
└── quality_assurance/ # Auto-created by render_html_report
└── {test_group}_{invocation_id}.htmlLog Locations
Workspace-scoped result files (job execution log, test result log, HTML
report) are the canonical concern of the test-result-analyzer skill; see its
## Result File Locations section for the full mode-by-mode breakdown of
Direct Execution and API Mode paths.
API Server (setup-guide-scoped)
| Log | Location | Format |
| API server logs | stdout/stderr (console) | Structured JSON (production) or color-coded (dev) |
| Persistent API logs | logs/api.log | Rotating file (10 MB, 5 backups) |
Docker Deployment
| Log | Location | Access |
| Container logs | Docker stdout | docker logs sap-automation-qa |
| Persistent logs | /app/logs/ (inside container) | Volume mount or docker cp |
| SQLite database | /app/data/staf.db (inside container) | Persistent volume |
Accessing Logs
# API mode — view recent job log
./scripts/sap_automation_qa.sh job log --id <JOB_ID> --tail 50
# Docker — follow container logs
docker logs -f sap-automation-qa
# Direct mode — capture output to file
./scripts/sap_automation_qa.sh --test-groups=HA_DB_HANA 2>&1 | tee run.logOutput Format
Setup Status Report
- Mode: Local / Docker
- Python: ✅ 3.12.x / ❌ Not found
- Virtual env: ✅ Active / ❌ Missing
- Azure CLI: ✅ Installed / ⚠️ Not found
- Docker: ✅ Running / ❌ Not available
- API Health: ✅ Responding / ❌ Not reachable
- Next step: [specific action]Error Handling
| Error | Cause | Fix |
python3: command not found | Python not installed | Install Python 3.10+ for your distro |
venv creation failed | Missing venv module | apt install python3.x-venv or use -p flag |
docker: command not found | Docker not installed | Install Docker |
Cannot connect to Docker daemon | Daemon not running | sudo systemctl start docker |
Port 8000 already in use | Port conflict | Stop conflicting process or change port |
pip install failed | Network or pip issue | Check internet, pip install --upgrade pip |
Pre-Completion Checklist
Before reporting setup complete, verify:
- Setup mode completed without errors
- For local:
.venv/bin/activateworks andansible --versionsucceeds - For Docker:
curl http://localhost:8000/healthzreturns{"status": "ok"} vars.yamlexists at project root with validTEST_TYPEandAUTHENTICATION_TYPE- Workspace directory exists under
WORKSPACES/SYSTEM/withsap-parameters.yamlandhosts.yaml - Credential file present (local) or Key Vault configured (remote)
- Managed identity configured and roles assigned
Copilot CLI Skills
The full /-prefixed CLI skill list (Copilot, Claude Code, Gemini CLI) lives
in .github/copilot-instructions.md §"Copilot CLI Skills" — the canonical
manifest for all three CLIs.
Related Skills
| After setup completes... | Use skill |
| Create a workspace for your SAP system | workspace-creator |
| Validate an existing workspace | workspace-validator |
| Run your first test | test-runner |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
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.

