vastai-enterprise-rbac
Configure Vast.ai enterprise SSO, role-based access control, and organization management. Use when implementing SSO integration, configuring role-based permissions, or setting up organization-level controls for Vast.ai. Trigger with phrases like "vastai SSO", "vastai RBAC", "vastai enterprise", "vastai roles", "vastai permissions", "vastai SAML".
- License 许可
- MIT
- 最近更新
- 2026-03-20
- Stars
- ★ 4
- Forks
- 0
01 前言 Front Matter
- name
- vastai-enterprise-rbac
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- Configure Vast.ai enterprise SSO, role-based access control, and organization management. Use when implementing SSO integration, configuring role-based permissions, or setting up organization-level controls for Vast.ai. Trigger with phrases like "vastai SSO", "vastai RBAC", "vastai enterprise", "vastai roles", "vastai permissions", "vastai SAML".
- allowed-tools
- Read, Write, Edit
- compatible-with
- claude-code, codex, openclaw
03 SKILL.md 正文
Vast.ai Enterprise RBAC
Overview
Control access to Vast.ai GPU cloud instances and spending through team billing and API key management. Vast.ai uses a marketplace model with per-GPU-hour pricing that varies by GPU type (RTX 4090 ~$0.20/hr, A100 ~$1.50/hr, H100 ~$3.00/hr).
Prerequisites
- Vast.ai account with team billing enabled
- API key from cloud.vast.ai
- Understanding of GPU pricing tiers on the Vast.ai marketplace
Instructions
Step 1: Create Scoped API Keys per Team
# Key for the ML training team (high-end GPUs, high budget)
vastai set api-key --name "ml-training-team" \
--spending-limit 5000 \ # 5000: 5 seconds in ms
--allowed-gpu-types "A100,H100" \
--max-instances 10
# Key for the inference team (cost-efficient GPUs)
vastai set api-key --name "inference-prod" \
--spending-limit 1000 \ # 1000: 1 second in ms
--allowed-gpu-types "RTX_4090,RTX_3090,A6000" \
--max-instances 20
Step 2: Implement GPU Provisioning Policies
// vastai-policy.ts - Enforce rules before provisioning
interface ProvisionPolicy {
allowedGpuTypes: string[];
maxPricePerHour: number;
maxInstances: number;
requireSpotInstance: boolean;
}
const TEAM_POLICIES: Record<string, ProvisionPolicy> = {
training: { allowedGpuTypes: ['A100', 'H100'], maxPricePerHour: 4.00, maxInstances: 10, requireSpotInstance: false },
inference: { allowedGpuTypes: ['RTX_4090', 'RTX_3090'], maxPricePerHour: 0.50, maxInstances: 20, requireSpotInstance: true },
research: { allowedGpuTypes: ['RTX_4090'], maxPricePerHour: 0.30, maxInstances: 3, requireSpotInstance: true },
};
Step 3: Set Spending Alerts
# Configure spending alerts via the Vast.ai CLI
vastai set spending-alert --threshold 1000 --email "ops@company.com" # 1000: 1 second in ms
vastai set spending-alert --threshold 4000 --email "ops@company.com,finance@company.com" # 4000: dev server port
vastai set auto-stop --daily-limit 500 # Auto-destroy instances if daily spend exceeds $500
Step 4: Monitor Active Instances and Costs
# List all running instances with cost data
vastai show instances --raw | jq '.[] | {
id, gpu_name, num_gpus,
cost_per_hr: .dph_total,
hours_running: ((.end_date // now) - .start_date) / 3600, # 3600: timeout: 1 hour
total_cost: .total_dph
}'
# Get team spending summary
vastai show invoices --last 30 | jq '.total_cost'
Step 5: Auto-Terminate Idle Instances
# Cron job: destroy instances idle for more than 2 hours
vastai show instances --raw | \
jq -r '.[] | select(.gpu_utilization < 5 and .duration > 7200) | .id' | \ # 7200: timeout: 2 hours
xargs -I{} vastai destroy instance {}
Error Handling
| Issue | Cause | Solution |
|---|---|---|
insufficient_funds |
Account balance depleted | Add credits or enable auto-recharge |
| Instance won't start | GPU type unavailable in region | Try different region or GPU type |
| Spending limit hit | Daily cap reached | Increase limit or wait for next day |
| SSH connection refused | Instance still initializing | Wait 2-3 minutes after creation |
Examples
Basic usage: Apply vastai enterprise rbac to a standard project setup with default configuration options.
Advanced scenario: Customize vastai enterprise rbac for production environments with multiple constraints and team-specific requirements.
Output
- Configuration files or code changes applied to the project
- Validation report confirming correct implementation
- Summary of changes made and their rationale
Resources
- Official Vastai Enterprise Rbac documentation
- Community best practices and patterns
- Related skills in this plugin pack
04 同仓库更多 Skills
azure-apim-architecture
Analyzes and explains Azure API Management architecture decisions for enterprise API marketplace implementations using VNet Internal mode, Front Door, hybrid authentication, and multi-environment strategies. Use when discussing APIM component selection, network topology, cost optimization, or comparing alternatives like workspaces vs instances, VNet Internal vs External mode, or Front Door vs Application Gateway.
apiops-deployment
Guides deployment of Azure API Management infrastructure using Infrastructure as Code (Bicep/Terraform), CI/CD pipelines (GitHub Actions/Azure DevOps), and APIOps workflows. Use when deploying APIM, creating pipelines, or implementing dev→test→prod promotion strategies.
apim-policy-authoring
Creates production-ready Azure API Management policy XML for authentication (OAuth 2.0, JWT validation, subscription keys), rate limiting, CORS configuration, error handling, and API transformations. Use when implementing API security, access control, or request/response processing logic.
api-security-review
Reviews Azure API Management configurations for security vulnerabilities, OWASP API Security Top 10 compliance, VNet Internal mode validation, Private Link verification, and Azure Security Benchmark alignment. Use when performing security audits, pre-deployment validation, or compliance reviews.
jira-cli
Interact with Jira from the command line to create, list, view, edit, and transition issues, manage sprints and epics, and perform common Jira workflows. Use when the user asks about Jira tasks, tickets, issues, sprints, or needs to manage project work items.
calculator
Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.