DataTalksClub / DataTalksClub/relay
R1.1 Relay production environment
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 16m
- Merged PRs (30d)
- 5
Description
Mirrors issue R1.1 Relay production environment from the DataTalksClub/community-base unification plan (docs/plan/phase-1.md). Repository: DataTalksClub/relay (code) and DataTalksClub/aws-infra (Terraform, by pull request). Depends on: nothing.
Goal
Give Relay a production deployment path: a manually approved production deploy workflow, the production tenant provisioning for the first client (the DTC website), and operator documentation. The plan issue's live checks (canary email, SES identity in the AWS console, prod system.echo) are owner-gated and stay open after the code lands.
Scope
deploy-prod.yml: aworkflow_dispatchproduction deploy workflow gated on theproductionGitHub environment with a required reviewer. It reusesscripts/deploy_relay_sandbox.shparameterised by--environment production; sandbox behaviour of the script is unchanged.scripts/provision_production_tenant.sh: provisions organisationdatatalksclub, audiencedtc, clientdtc-website, default senderDataTalks.Club <hello@datatalks.club>(final address to be confirmed by the owner in the pull request), and one client API key. The key is generated on the host into the0600runtime env file, following the sandboxRELAY_BOOTSTRAP_API_KEYmechanism; the script never prints or embeds key material. The owner copies the key into the DTC deployment secrets.docs/production.md: the production environment, on-call checks, and rollback. Explicit that production is not deployed yet.
Note on the Terraform half
The plan's aws-infra step (a production Relay root) is already satisfied by the merged main/relay root in DataTalksClub/aws-infra, with documented deviations from the issue text (no Elastic IP: the host is private behind the shared ALB; one ingress queue: the inbound path is deliberately out of scope; the datatalks.club SES identity, DKIM, SPF and DMARC records live in main/common and main/website-static). That conflict is reported to the plan owner as a plan fix; nothing is applied.
Acceptance criteria
deploy-prod.ymldeploys only on manual dispatch frommain, only after lint/checks/tests pass, and only after the environment reviewer approves.- Sandbox deploy path of
scripts/deploy_relay_sandbox.shis byte-for-byte behaviour-identical. - The provisioning script has a dry-run mode and never prints key material.
docs/production.mdstates production is not deployed and lists the owner-gated checks.
Test notes
uv run pytest(full suite),uv run ruff check ..python -c yaml.safe_loadon both workflows.bash -nand--help/--dry-runfor both scripts.- Live checks (curl
system.echoagainst prod,/internal/ops/status, SES identity verified in the console) need the owner to apply the Terraform pull request and run the prod deploy:Not run here, needs: owner approved and applied the Terraform root and the first production deploy.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the scope for deploy-prod.yml, scripts/deploy_relay_sandbox.sh, scripts/provision_production_tenant.sh, and docs/production.md first. Run uv run pytest, uv run ruff check ., yaml.safe_load on both workflows, and bash -n with --help/--dry-run for both scripts. Done means the manual, reviewer-gated deployment, safe dry-run provisioning, and owner-gated production documentation checks are in place; live checks require the owner.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- github-actions, python, shell, terraform
- Domain
- ci-cd, cloud, devops, documentation
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100