Infra Lang — 5-minute quickstart¶
Install¶
pip install 'git+https://github.com/TuviDev/infra-lang.git'
# with the language server (recommended for VS Code):
pip install 'git+https://github.com/TuviDev/infra-lang.git[lsp]'
Verify: infra --version
PyPI publishing is coming soon; until then install from Git. Requires Python 3.11+.
Create your first .infra file¶
Save as app.infra:
service api {
image: "nginx:1.25.3"
port: 8080
health: http("/health")
resources {
requests { cpu: 100m, memory: 128Mi }
limits { cpu: 500m, memory: 256Mi }
}
}
database db {
type: postgres
version: "15"
storage: 10Gi
ssl: true
backup { enabled: true, schedule: "0 2 * * *" }
}
secret db-creds {
url: from env "DATABASE_URL"
}
Validate¶
Compile to Kubernetes¶
Compile to Docker Compose¶
See what it looks like¶
Check the diff between two configs¶
What's next¶
- Read the tutorial:
docs/tutorial.md - See examples:
examples/