infra-engineer by samhvw8/dotfiles
npx skills add https://github.com/samhvw8/dotfiles --skill infra-engineer现代基础设施工程综合指南,涵盖 DevOps 实践、多云平台(AWS、Azure、GCP、Cloudflare)、FinOps 成本优化和 DevSecOps 安全实践。
在以下情况下使用此技能:
最适合:
关键服务:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
成本概况: 按需付费、预留实例(最高 72% 折扣)、Savings Plans、竞价实例(最高 90% 折扣)
最适合:
关键服务:
成本概况: 按需付费、预留实例、适用于 Windows/SQL Server 许可证的 Azure 混合权益
最适合:
关键产品:
成本概况: 按请求付费、慷慨的免费套餐、零出口费用
最适合:
关键特性:
托管选项: EKS(AWS)、AKS(Azure)、GKE(GCP)、托管 k8s 提供商
成本概况: 集群管理费 + 节点成本(通过竞价实例、集群自动扩缩容进行优化)
最适合:
关键能力:
成本概况: 仅基础设施成本(计算 + 存储),无编排开销
最适合:
关键服务:
成本概况: 多样化的定价、持续使用折扣、承诺使用合同
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install
# Configure credentials
aws configure
# Create Lambda function with SAM
sam init --runtime python3.11
sam build && sam deploy --guided
参见:references/aws-lambda.md
# Install eksctl
brew install eksctl # or curl download
# Create cluster
eksctl create cluster \
--name my-cluster \
--region us-west-2 \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 3 \
--nodes-min 1 \
--nodes-max 4
参见:references/kubernetes-basics.md
# Install Azure CLI
curl -L https://aka.ms/InstallAzureCli | bash
# Login and create resources
az login
az group create --name myResourceGroup --location eastus
az webapp create --resource-group myResourceGroup \
--name myapp --runtime "NODE:18-lts"
参见:references/azure-basics.md
# Install Wrangler CLI
npm install -g wrangler
# Create and deploy Worker
wrangler init my-worker
cd my-worker
wrangler deploy
参见:references/cloudflare-workers-basics.md
# Create deployment
kubectl create deployment nginx --image=nginx:latest
kubectl expose deployment nginx --port=80 --type=LoadBalancer
# Apply from manifest
kubectl apply -f deployment.yaml
# Check status
kubectl get pods,services,deployments
参见:references/kubernetes-basics.md
# Create Dockerfile
cat > Dockerfile <<EOF
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
EOF
# Build and run
docker build -t myapp .
docker run -p 3000:3000 myapp
参见:references/docker-basics.md
aws-overview.md - AWS 基础、账户设置、IAM 基础aws-ec2.md - EC2 实例、AMI、安全组、自动扩缩容aws-lambda.md - 无服务器函数、SAM、事件源、层aws-ecs-eks.md - 容器编排、ECS 与 EKS、Fargateaws-s3-rds.md - S3 存储、RDS 数据库、备份策略aws-cloudformation.md - 基础设施即代码、CDK、最佳实践aws-networking.md - VPC、子网、安全组、负载均衡器azure-basics.md - Azure 基础、订阅、资源组azure-compute.md - 虚拟机、应用服务、AKS、Azure 函数azure-storage.md - 存储账户、Blob、文件、托管磁盘cloudflare-platform.md - 边缘计算概述、关键组件cloudflare-workers-basics.md - 入门、处理器类型、基本模式cloudflare-workers-advanced.md - 高级模式、性能、优化cloudflare-workers-apis.md - 运行时 API、绑定、集成cloudflare-r2-storage.md - R2 对象存储、S3 兼容性、最佳实践cloudflare-d1-kv.md - D1 SQLite 数据库、KV 存储、用例browser-rendering.md - Cloudflare 上的 Puppeteer/Playwright 自动化kubernetes-basics.md - 核心概念、Pod、部署、服务kubernetes-advanced.md - StatefulSet、操作器、自定义资源kubernetes-networking.md - 入口、服务网格、网络策略helm-charts.md - 包管理、图表、仓库docker-basics.md - 核心概念、Dockerfile、镜像、容器docker-compose.md - 多容器应用、网络、卷docker-security.md - 镜像扫描、密钥、最佳实践gcloud-platform.md - GCP 概述、gcloud CLI、身份验证gcloud-services.md - 计算引擎、GKE、Cloud Run、应用引擎cicd-github-actions.md - GitHub Actions 工作流、运行器、密钥cicd-gitlab.md - GitLab CI/CD 流水线、制品、缓存gitops-argocd.md - ArgoCD 设置、应用的应用模式、同步策略gitops-flux.md - Flux 控制器、GitOps 工具包、多租户finops-basics.md - 成本优化原则、FinOps 生命周期finops-aws.md - AWS 成本优化、RI、Savings Plans、竞价实例finops-azure.md - Azure 成本管理、预留、混合权益finops-gcp.md - GCP 成本优化、承诺使用、持续使用finops-tools.md - 成本分析工具、Kubecost、CloudHealth、Infracostdevsecops-basics.md - 安全最佳实践、左移安全devsecops-scanning.md - SAST、DAST、SCA、容器扫描secrets-management.md - Vault、AWS Secrets Manager、密封密钥compliance.md - SOC2、HIPAA、PCI-DSS、审计日志记录terraform-basics.md - Terraform 基础、提供者、状态terraform-advanced.md - 模块、工作区、远程状态cloudformation-basics.md - CloudFormation 模板、堆栈、变更集scripts/cloudflare-deploy.py - 自动化 Cloudflare Worker 部署scripts/docker-optimize.py - 分析和优化 Dockerfilescripts/cost-analyzer.py - 云成本分析和报告scripts/security-scanner.py - 自动化安全扫描# Edge Layer: Cloudflare Workers (global routing, caching)
# Compute Layer: AWS ECS/Lambda or Azure App Service (application logic)
# Data Layer: AWS RDS or Azure SQL (persistent storage)
# CDN/Storage: Cloudflare R2 or AWS S3 (static assets)
Benefits:
- Best-of-breed services per layer
- Geographic redundancy
- Cost optimization across providers
# GitHub Actions workflow
name: Deploy to ECS
on: push
jobs:
deploy:
- Build Docker image
- Push to ECR
- Update ECS task definition
- Deploy to ECS service
- Wait for deployment stabilization
# Git repository structure
/apps
/production
- deployment.yaml
- service.yaml
- ingress.yaml
/staging
- deployment.yaml
# ArgoCD syncs cluster state from Git
# Changes: Git commit → ArgoCD detects → Auto-sync to cluster
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
CMD ["node", "dist/server.js"]
# 1. Discovery: Identify untagged resources
# 2. Analysis: Right-size instances (CPU/memory utilization)
# 3. Optimization:
# - Convert to reserved instances (predictable workloads)
# - Use spot instances (fault-tolerant workloads)
# - Schedule start/stop (dev environments)
# 4. Monitoring: Set budget alerts, track savings
# 5. Governance: Enforce tagging policies
# 1. Code Commit
# 2. SAST Scan: SonarQube, Semgrep (static code analysis)
# 3. Dependency Check: Snyk, Trivy (vulnerability scanning)
# 4. Build: Docker image
# 5. Container Scan: Trivy, Grype (image vulnerabilities)
# 6. DAST Scan: OWASP ZAP (runtime security testing)
# 7. Deploy: Only if all scans pass
# 8. Runtime Protection: Falco, AWS GuardDuty
# 1. Write: Define infrastructure in .tf files
# 2. Init: terraform init (download providers)
# 3. Plan: terraform plan (preview changes)
# 4. Apply: terraform apply (create/update resources)
# 5. State: Store state in S3 with DynamoDB locking
# 6. Modules: Reuse common patterns across environments
| 需求 | 选择 |
|---|---|
| 计算 | |
| 全球范围内低于 50 毫秒的延迟 | Cloudflare Workers |
| 无服务器函数(AWS 生态系统) | AWS Lambda |
| 无服务器函数(Azure 生态系统) | Azure Functions |
| 容器化工作负载(托管) | AWS ECS/Fargate、Azure AKS、GCP Cloud Run |
| 大规模 Kubernetes | AWS EKS、Azure AKS、GCP GKE |
| 具有完全控制权的虚拟机 | AWS EC2、Azure 虚拟机、GCP 计算引擎 |
| 存储 | |
| 对象存储(S3 兼容) | AWS S3、Cloudflare R2(零出口)、Azure Blob |
| 用于虚拟机的块存储 | AWS EBS、Azure 托管磁盘、GCP 持久磁盘 |
| 文件存储(NFS/SMB) | AWS EFS、Azure 文件、GCP Filestore |
| 数据库 | |
| 托管 SQL(AWS) | AWS RDS(PostgreSQL、MySQL、SQL Server) |
| 托管 SQL(Azure) | Azure SQL 数据库 |
| 托管 SQL(GCP) | Cloud SQL |
| NoSQL 键值存储 | AWS DynamoDB、Azure Cosmos DB、Cloudflare KV |
| 全局 SQL(边缘读取) | Cloudflare D1、AWS Aurora Global |
| CI/CD 和 GitOps | |
| GitHub 集成的 CI/CD | GitHub Actions |
| 自托管 CI/CD | GitLab CI/CD、Jenkins |
| Kubernetes GitOps | ArgoCD、Flux |
| 成本优化 | |
| 可预测的工作负载 | 预留实例、Savings Plans |
| 容错工作负载 | 竞价实例(AWS)、可抢占虚拟机(GCP) |
| 开发/测试环境 | 自动调度、预算告警 |
| 安全 | |
| 密钥管理 | HashiCorp Vault、AWS Secrets Manager、Azure Key Vault |
| 容器扫描 | Trivy、Snyk、AWS ECR 扫描 |
| SAST/DAST | SonarQube、Semgrep、OWASP ZAP |
| 特殊用例 | |
| 静态站点 + 边缘函数 | Cloudflare Pages、AWS Amplify |
| WebSocket/实时 | Cloudflare Durable Objects、AWS API Gateway WebSocket |
| ML/AI 流水线 | AWS SageMaker、GCP Vertex AI、Azure ML |
| 浏览器自动化 | Cloudflare Browser Rendering、AWS Lambda + Puppeteer |
sam local invoke 在本地测试sam deploy 部署az login 登录wrangler dev 在本地测试wrangler deploy 部署每周安装数
78
仓库
GitHub 星标数
12
首次出现
2026 年 1 月 21 日
安全审计
安装于
opencode67
codex64
gemini-cli63
claude-code63
cursor62
github-copilot58
Comprehensive guide for modern infrastructure engineering covering DevOps practices, multi-cloud platforms (AWS, Azure, GCP, Cloudflare), FinOps cost optimization, and DevSecOps security practices.
Use this skill when:
Best For:
Key Services:
Cost Profile: Pay-as-you-go, reserved instances (up to 72% discount), savings plans, spot instances (up to 90% discount)
Best For:
Key Services:
Cost Profile: Pay-as-you-go, reserved instances, Azure Hybrid Benefit for Windows/SQL Server licenses
Best For:
Key Products:
Cost Profile: Pay-per-request, generous free tier, zero egress fees
Best For:
Key Features:
Managed Options: EKS (AWS), AKS (Azure), GKE (GCP), managed k8s providers
Cost Profile: Cluster management fees + node costs (optimize with spot instances, cluster autoscaling)
Best For:
Key Capabilities:
Cost Profile: Infrastructure cost only (compute + storage), no orchestration overhead
Best For:
Key Services:
Cost Profile: Varied pricing, sustained use discounts, committed use contracts
# Install AWS CLI
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip && sudo ./aws/install
# Configure credentials
aws configure
# Create Lambda function with SAM
sam init --runtime python3.11
sam build && sam deploy --guided
See: references/aws-lambda.md
# Install eksctl
brew install eksctl # or curl download
# Create cluster
eksctl create cluster \
--name my-cluster \
--region us-west-2 \
--nodegroup-name standard-workers \
--node-type t3.medium \
--nodes 3 \
--nodes-min 1 \
--nodes-max 4
See: references/kubernetes-basics.md
# Install Azure CLI
curl -L https://aka.ms/InstallAzureCli | bash
# Login and create resources
az login
az group create --name myResourceGroup --location eastus
az webapp create --resource-group myResourceGroup \
--name myapp --runtime "NODE:18-lts"
See: references/azure-basics.md
# Install Wrangler CLI
npm install -g wrangler
# Create and deploy Worker
wrangler init my-worker
cd my-worker
wrangler deploy
See: references/cloudflare-workers-basics.md
# Create deployment
kubectl create deployment nginx --image=nginx:latest
kubectl expose deployment nginx --port=80 --type=LoadBalancer
# Apply from manifest
kubectl apply -f deployment.yaml
# Check status
kubectl get pods,services,deployments
See: references/kubernetes-basics.md
# Create Dockerfile
cat > Dockerfile <<EOF
FROM node:20-alpine
WORKDIR /app
COPY package*.json ./
RUN npm ci --production
COPY . .
EXPOSE 3000
CMD ["node", "server.js"]
EOF
# Build and run
docker build -t myapp .
docker run -p 3000:3000 myapp
See: references/docker-basics.md
aws-overview.md - AWS fundamentals, account setup, IAM basicsaws-ec2.md - EC2 instances, AMIs, security groups, auto-scalingaws-lambda.md - Serverless functions, SAM, event sources, layersaws-ecs-eks.md - Container orchestration, ECS vs EKS, Fargateaws-s3-rds.md - S3 storage, RDS databases, backup strategiesaws-cloudformation.md - Infrastructure as code, CDK, best practicesaws-networking.md - VPC, subnets, security groups, load balancersazure-basics.md - Azure fundamentals, subscriptions, resource groupsazure-compute.md - VMs, App Service, AKS, Azure Functionsazure-storage.md - Storage Accounts, Blob, Files, managed diskscloudflare-platform.md - Edge computing overview, key componentscloudflare-workers-basics.md - Getting started, handler types, basic patternscloudflare-workers-advanced.md - Advanced patterns, performance, optimizationcloudflare-workers-apis.md - Runtime APIs, bindings, integrationscloudflare-r2-storage.md - R2 object storage, S3 compatibility, best practicescloudflare-d1-kv.md - D1 SQLite database, KV store, use casesbrowser-rendering.md - Puppeteer/Playwright automation on Cloudflarekubernetes-basics.md - Core concepts, pods, deployments, serviceskubernetes-advanced.md - StatefulSets, operators, custom resourceskubernetes-networking.md - Ingress, service mesh, network policieshelm-charts.md - Package management, charts, repositoriesdocker-basics.md - Core concepts, Dockerfile, images, containersdocker-compose.md - Multi-container apps, networking, volumesdocker-security.md - Image scanning, secrets, best practicesgcloud-platform.md - GCP overview, gcloud CLI, authenticationgcloud-services.md - Compute Engine, GKE, Cloud Run, App Enginecicd-github-actions.md - GitHub Actions workflows, runners, secretscicd-gitlab.md - GitLab CI/CD pipelines, artifacts, cachinggitops-argocd.md - ArgoCD setup, app of apps pattern, sync policiesgitops-flux.md - Flux controllers, GitOps toolkit, multi-tenancyfinops-basics.md - Cost optimization principles, FinOps lifecyclefinops-aws.md - AWS cost optimization, RI, savings plans, spotfinops-azure.md - Azure cost management, reservations, hybrid benefitfinops-gcp.md - GCP cost optimization, committed use, sustained usefinops-tools.md - Cost analysis tools, Kubecost, CloudHealth, Infracostdevsecops-basics.md - Security best practices, shift-left securitydevsecops-scanning.md - SAST, DAST, SCA, container scanningsecrets-management.md - Vault, AWS Secrets Manager, sealed secretscompliance.md - SOC2, HIPAA, PCI-DSS, audit loggingterraform-basics.md - Terraform fundamentals, providers, stateterraform-advanced.md - Modules, workspaces, remote statecloudformation-basics.md - CloudFormation templates, stacks, change setsscripts/cloudflare-deploy.py - Automate Cloudflare Worker deploymentsscripts/docker-optimize.py - Analyze and optimize Dockerfilesscripts/cost-analyzer.py - Cloud cost analysis and reportingscripts/security-scanner.py - Automated security scanning# Edge Layer: Cloudflare Workers (global routing, caching)
# Compute Layer: AWS ECS/Lambda or Azure App Service (application logic)
# Data Layer: AWS RDS or Azure SQL (persistent storage)
# CDN/Storage: Cloudflare R2 or AWS S3 (static assets)
Benefits:
- Best-of-breed services per layer
- Geographic redundancy
- Cost optimization across providers
# GitHub Actions workflow
name: Deploy to ECS
on: push
jobs:
deploy:
- Build Docker image
- Push to ECR
- Update ECS task definition
- Deploy to ECS service
- Wait for deployment stabilization
# Git repository structure
/apps
/production
- deployment.yaml
- service.yaml
- ingress.yaml
/staging
- deployment.yaml
# ArgoCD syncs cluster state from Git
# Changes: Git commit → ArgoCD detects → Auto-sync to cluster
# Build stage
FROM node:20-alpine AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
# Production stage
FROM node:20-alpine
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=build /app/node_modules ./node_modules
USER node
CMD ["node", "dist/server.js"]
# 1. Discovery: Identify untagged resources
# 2. Analysis: Right-size instances (CPU/memory utilization)
# 3. Optimization:
# - Convert to reserved instances (predictable workloads)
# - Use spot instances (fault-tolerant workloads)
# - Schedule start/stop (dev environments)
# 4. Monitoring: Set budget alerts, track savings
# 5. Governance: Enforce tagging policies
# 1. Code Commit
# 2. SAST Scan: SonarQube, Semgrep (static code analysis)
# 3. Dependency Check: Snyk, Trivy (vulnerability scanning)
# 4. Build: Docker image
# 5. Container Scan: Trivy, Grype (image vulnerabilities)
# 6. DAST Scan: OWASP ZAP (runtime security testing)
# 7. Deploy: Only if all scans pass
# 8. Runtime Protection: Falco, AWS GuardDuty
# 1. Write: Define infrastructure in .tf files
# 2. Init: terraform init (download providers)
# 3. Plan: terraform plan (preview changes)
# 4. Apply: terraform apply (create/update resources)
# 5. State: Store state in S3 with DynamoDB locking
# 6. Modules: Reuse common patterns across environments
| Need | Choose |
|---|---|
| Compute | |
| Sub-50ms latency globally | Cloudflare Workers |
| Serverless functions (AWS ecosystem) | AWS Lambda |
| Serverless functions (Azure ecosystem) | Azure Functions |
| Containerized workloads (managed) | AWS ECS/Fargate, Azure AKS, GCP Cloud Run |
| Kubernetes at scale | AWS EKS, Azure AKS, GCP GKE |
| VMs with full control | AWS EC2, Azure VMs, GCP Compute Engine |
| Storage | |
| Object storage (S3-compatible) | AWS S3, Cloudflare R2 (zero egress), Azure Blob |
| Block storage for VMs | AWS EBS, Azure Managed Disks, GCP Persistent Disk |
| File storage (NFS/SMB) | AWS EFS, Azure Files, GCP Filestore |
| Database |
sam local invokesam deployaz loginwrangler devwrangler deployWeekly Installs
78
Repository
GitHub Stars
12
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykWarn
Installed on
opencode67
codex64
gemini-cli63
claude-code63
cursor62
github-copilot58
| Managed SQL (AWS) | AWS RDS (PostgreSQL, MySQL, SQL Server) |
| Managed SQL (Azure) | Azure SQL Database |
| Managed SQL (GCP) | Cloud SQL |
| NoSQL key-value | AWS DynamoDB, Azure Cosmos DB, Cloudflare KV |
| Global SQL (edge reads) | Cloudflare D1, AWS Aurora Global |
| CI/CD & GitOps |
| GitHub-integrated CI/CD | GitHub Actions |
| Self-hosted CI/CD | GitLab CI/CD, Jenkins |
| Kubernetes GitOps | ArgoCD, Flux |
| Cost Optimization |
| Predictable workloads | Reserved Instances, Savings Plans |
| Fault-tolerant workloads | Spot Instances (AWS), Preemptible VMs (GCP) |
| Dev/test environments | Auto-scheduling, budget alerts |
| Security |
| Secrets management | HashiCorp Vault, AWS Secrets Manager, Azure Key Vault |
| Container scanning | Trivy, Snyk, AWS ECR scanning |
| SAST/DAST | SonarQube, Semgrep, OWASP ZAP |
| Special Use Cases |
| Static site + edge functions | Cloudflare Pages, AWS Amplify |
| WebSocket/real-time | Cloudflare Durable Objects, AWS API Gateway WebSocket |
| ML/AI pipelines | AWS SageMaker, GCP Vertex AI, Azure ML |
| Browser automation | Cloudflare Browser Rendering, AWS Lambda + Puppeteer |