livepeer / livepeer/clearinghouse

deploy/: Railway deploy CI for clearinghouse stack

Open
#26 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature infra
Dominant language
Go
Stars
1
Forks
3
Avg merge
1h 47m
Merged PRs (30d)
3

Description

## Summary

Add per-service Railway manifests, deploy scripts, and a GitHub Actions workflow for pushing the deploy/ stack to Railway — mirroring pymthouse's pattern but without a hardcoded project ID and without a separate signer-DMZ service.

## Tasks

- `deploy/{kafka,openmeter-collector,remote-signer}/railway.json` — per-service manifests (builder=DOCKERFILE, watchPatterns, ON_FAILURE restart, numReplicas=1).
- `scripts/lib/railway-auth.sh` — `railway_export_auth`, `railway_pe_flags`, `railway_retry` helpers; `RAILWAY_PROJECT_ID` required (no hardcoded default).
- `scripts/railway-deploy-from-manifest.sh` — generic manifest-swap + `railway up -s `.
- `scripts/railway-deploy-stack.sh` — orchestrates kafka → openmeter-collector → remote-signer.
- `scripts/railway-apply-stack-env.sh` — sets per-service env vars; uses `kafka.railway.internal:9092` for Railway private networking.
- `.github/workflows/deploy-railway.yml` — push to main + `workflow_dispatch`; **off by default** (`RAILWAY_AUTO_DEPLOY` repo var).

## Prerequisites (one-time operator setup)

1. Create a Railway project and three services named `kafka`, `openmeter-collector`, `remote-signer`.
2. Set GitHub secrets: `RAILWAY_API_TOKEN`, `RAILWAY_PROJECT_ID`, `OPENMETER_URL`, `OPENMETER_API_KEY`, `OPENMETER_INGEST_URL`, `WEBHOOK_SECRET`, `REMOTE_SIGNER_WEBHOOK_URL`.
3. Set repo variable `RAILWAY_AUTO_DEPLOY=true` to enable auto-deploy.

## References

- pymthouse `scripts/railway-*.sh`, `.github/workflows/deploy-railway-production.yml`
- Implemented in PR #22

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the listed deploy/ manifests, scripts/lib/railway-auth.sh, the three scripts/railway-*.sh files, and .github/workflows/deploy-railway.yml with the referenced pymthouse implementation. Done means the three services deploy in order with the required environment and private-networking settings, while automatic deployment remains disabled unless RAILWAY_AUTO_DEPLOY is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
dockerfile, github-actions, shell
Domain
ci-cd, cloud, devops, infrastructure
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.