infrastructurelisted
Install: claude install-skill aiskillstore/marketplace
# Infrastructure Skill for Guts
You are managing infrastructure for a decentralized application with multiple node types.
## Deployment Targets
1. **Local Development**: Docker Compose
2. **Testing**: Kubernetes (k3s/kind)
3. **Production**: Cloud-agnostic Kubernetes + Terraform
## Terraform Patterns
### Module Structure
```
infra/
├── terraform/
│ ├── modules/
│ │ ├── network/
│ │ ├── compute/
│ │ └── storage/
│ ├── environments/
│ │ ├── dev/
│ │ ├── staging/
│ │ └── prod/
│ └── main.tf
```
### Example Module
```hcl
# modules/guts-node/main.tf
variable "node_count" {
type = number
description = "Number of Guts nodes to deploy"
default = 3
}
variable "instance_type" {
type = string
description = "Instance type for nodes"
default = "t3.medium"
}
resource "aws_instance" "guts_node" {
count = var.node_count
ami = data.aws_ami.ubuntu.id
instance_type = var.instance_type
tags = {
Name = "guts-node-${count.index}"
Environment = var.environment
Project = "guts"
}
}
```
## Docker Best Practices
### Multi-stage Builds
```dockerfile
# Build stage
FROM rust:1.75-slim as builder
WORKDIR /app
COPY . .
RUN cargo build --release --bin guts-node
# Runtime stage
FROM debian:bookworm-slim
RUN apt-get update && apt-get install -y ca-certificates && rm -rf /var/lib/apt/lists/*
COPY --from=builder /app/target/release/guts-node /usr/local/bin/
EXPOSE 8080 9000
ENTRYPOIN