AI Initiative logoAI Initiative
Reading room / Manthan

Manthan Phase 5 — `infra/`

Manthan Phase 5 — `infra/`. Covers Layout; D-001 — Build & smoke-test the testnet-node image; Build (BuildKit picks up infra/docker/Dockerfile.dockerignore automatically); Run a single node (mounts genesis-alpha's Charter/LOTS/privacy-policy).

Deployment / operations method; execution not repeated
This is the retained source text, not a new validation of its claims. Numerical results and comparative claims require the accompanying source review before public reuse.

Read the connected case study or article →

Not explicitly stated in source · Date not established

Provenance, authorship and editorial notes

Manthan Phase 5 — `infra/`

Id

manthan-infra-readme

Project

Manthan

Source path

manthan/infra/README.md

Source sha256

1dea4895fa715d54223f23a3094118f35ec5ca7e93a43c41db4108fa7e82f9b2

Local copy sha256

1dea4895fa715d54223f23a3094118f35ec5ca7e93a43c41db4108fa7e82f9b2

Repo head

3a94084024a3434cef331fecac91c2c3b43f0313

Date
Not recorded
Date basis

Original publication date not established; Git revision date retained separately.

Author

Not explicitly stated in source

Author basis

Unknown; Git committer not substituted for document author.

Last source commit

8b75d1b0157c20a0a463f0e31008ef9f73099beb

Last source commit date

2026-06-08T07:40:14Z

Document status

Deployment / operations method; execution not repeated

Summary

Manthan Phase 5 — `infra/`. Covers Layout; D-001 — Build & smoke-test the testnet-node image; Build (BuildKit picks up infra/docker/Dockerfile.dockerignore automatically); Run a single node (mounts genesis-alpha's Charter/LOTS/privacy-policy).

Topics
  • Operating the system
  • Layout
  • D-001 — Build & smoke-test the testnet-node image
  • Build (BuildKit picks up infra/docker/Dockerfile.dockerignore automatically)
Theme

Operating the system

Priority

reference

Related ids
  • manthan-infra-compose-readme
  • manthan-infra-terraform-readme
Evidence concerns
  • Recovered source text is preserved verbatim. Assertions, comparisons, commands and results belong to its original context; they were not re-executed or externally re-verified during this corpus review.
Word count

546

Bytes

4317

Source relative

infra/README.md

Remote mirror

manthan/infra/README.md

Full text preserved

True

Manthan Phase 5 — infra/

Infrastructure-as-code and container artifacts for the AWS deployment.

Layout

infra/
├── README.md           # this file
├── docker/             # D-001: testnet-node container image
│   ├── Dockerfile
│   ├── Dockerfile.dockerignore
│   └── docker-compose.yml      # local-dev 3-node ring
├── nats/               # phase-1 substrate dev infra (predates Phase 5)
├── postgres/           # phase-1 substrate dev infra (predates Phase 5)
└── terraform/          # D-002: AWS resources (TBD)

D-001 — Build & smoke-test the testnet-node image

From the repo root:

# Build (BuildKit picks up infra/docker/Dockerfile.dockerignore automatically)
docker build -f infra/docker/Dockerfile -t manthan-testnet-node:0.2.0 .

# Run a single node (mounts genesis-alpha's Charter/LOTS/privacy-policy)
docker run --rm \
  -p 9120:9120 -p 9220:9220 \
  -v "$PWD/herald-protocol/services/testnet/nodes/genesis-alpha/charter.md:/etc/manthan/charter.md:ro" \
  -v "$PWD/herald-protocol/services/testnet/nodes/genesis-alpha/lots.md:/etc/manthan/lots.md:ro" \
  -v "$PWD/herald-protocol/services/testnet/nodes/genesis-alpha/privacy-policy.md:/etc/manthan/privacy-policy.md:ro" \
  manthan-testnet-node:0.2.0

# In another shell:
curl -sS local-service/healthz
curl -sS local-service/readyz
curl -sS local-service/metrics | head -20

To run the full 3-node ring locally:

docker compose -f infra/docker/docker-compose.yml up --build

Env vars accepted by the container

VariableDefaultNotes
MANTHAN_NODE_NAMEgenesis-alphaLogical node identity. Must be one of genesis-{alpha,beta,gamma} unless MANTHAN_NODE_SEED_HEX is also set.
MANTHAN_NODE_SEED_HEX(unset)32-byte hex seed; production deploys source this from Secrets Manager (D-002).
MANTHAN_HTTP_PORT9120HTTP API port.
MANTHAN_MWP_PORT9220MWP (WebSocket) port for envelope gossip.
MANTHAN_BIND_HOST0.0.0.0Bind interface. The container forces 0.0.0.0; ALB / Service Discovery fronts it.
MANTHAN_DATA_DIR/dataSQLite ledger location. Mount EFS here in production.
MANTHAN_BEHIND_TLS_PROXYfalseSet true when ALB terminates TLS at the edge.
MANTHAN_CHARTER_PATH/etc/manthan/charter.mdCharter document.
MANTHAN_LOTS_PATH/etc/manthan/lots.mdLimits-of-Trust Statement.
MANTHAN_PRIVACY_POLICY_PATH/etc/manthan/privacy-policy.mdPrivacy policy.

Two deployment tracks

TrackWhereWhen to use
Compose / OSS (default)compose/Internal / research / pre-product. Runs on a single host (the genesis EC2 is the obvious target). Vanilla Prometheus + Alertmanager + Grafana. Zero managed-service spend.
Terraform / AWS managed (production roadmap)terraform/Once you have paying users / SLAs / compliance / cross-AZ HA needs. Fargate + AMP + ALB + EFS + KMS + Secrets Manager + Route 53. ~$80–120/mo for a 3-node testnet.

Both tracks consume the same manthan-testnet-node:0.2.0 image and the
same services/testnet/observability/alerts.yaml. The receivers
(PagerDuty + MS Teams + Slack) are identical end-points across both — only
the transport (managed AMP-Alertmanager vs. self-hosted Alertmanager) differs.

Compose track — quick start

See compose/README.md for the full guide.

docker build -f infra/docker/Dockerfile -t manthan-testnet-node:0.2.0 .
cp infra/compose/.env.example infra/compose/.env
$EDITOR infra/compose/.env       # paste real PagerDuty / Teams / Slack URLs
docker-compose -f infra/compose/docker-compose.yml up -d

Terraform track — quick start

terraform/ holds the full IaC for VPC + ALB + ECS Fargate + EFS + KMS +
Secrets Manager + S3 + ECR + Route 53 + CloudWatch + AMP. See
terraform/README.md for the apply workflow.

Quick checks (no AWS credentials required):

terraform -chdir=infra/terraform init -backend=false
terraform -chdir=infra/terraform validate

Both pass on the current tree; full terraform plan against a real (empty)
AWS account is the operator's production smoke test.

Continue exploring