Hosted Early-Dev Runbook¶
This is the operator runbook for bringing up the first low-cost EchoSpire tester environment.
Use this runbook when the goal is not infrastructure experimentation, but a working hosted environment that external testers can reach.
This runbook assumes the repository already contains the hosted deployment assets, including the root render.yaml Blueprint.
Outcome¶
When this runbook is complete, you should have:
- a public docs site on Cloudflare Pages
- a public Admin site on Render
- a public API on Render
- PostgreSQL hosted on Neon
- Redis hosted on Upstash
- JSON fallback telemetry enabled in the API container
Preflight¶
Before starting, confirm the following:
- The latest deployment commit is pushed to the repository default branch.
- You have logins for Render, Neon, Upstash, and Cloudflare.
- You have authority to connect the repository to those providers.
- You have one AI API key available if you want AI-generated hero names on day one.
If you do not have an AI API key yet, continue anyway. The API will fall back to non-AI hero naming.
Step 1: Create PostgreSQL In Neon¶
- Sign in to Neon.
- Create a new project.
- Choose a project name like
echospire-early-dev. - Keep the default Postgres version unless you have a reason to pin another one.
- After the project is created, open the dashboard and locate the connection details.
- Copy the PostgreSQL connection string.
Store this value for the Render API service as:
ConnectionStrings__Postgres
Use the raw Neon connection string value only.
Do not prefix it with a variable name.
Checkpoint:
- you have one valid Neon connection string copied and ready
Step 2: Create Redis In Upstash¶
- Sign in to Upstash.
- Create a new Redis database.
- Name it something like
echospire-early-dev. - Use the default region unless you have a latency reason to match Render more closely.
- Open the database details page.
- Copy the Redis connection string.
Store this value for the Render API service as:
ConnectionStrings__Redis
Use the raw Upstash Redis URL only.
Do not paste REDIS_URL= or surrounding quotes into the Render value.
Checkpoint:
- you have one valid Upstash Redis connection string copied and ready
Step 3: Deploy API And Admin In Render¶
- Sign in to Render.
- Choose
New. - Choose
Blueprint. - Connect the GitHub repository if it is not already connected.
- Select this repository.
- Render should detect the root
render.yamlfile automatically. - Continue with Blueprint import.
You should see two services:
echospire-apiechospire-admin
Render Values To Enter¶
For echospire-api, provide these values when prompted:
ConnectionStrings__Postgres: paste the raw Neon connection stringConnectionStrings__Redis: paste the raw Upstash Redis URLAiCompletion__ApiKey: paste an AI key if you want AI naming enabled
Leave these Blueprint defaults as they are unless you have a deliberate reason to change them:
ASPNETCORE_ENVIRONMENT=ProductionJwt__Issuer=EchoSpireJwt__Audience=EchoSpire.ClientsTelemetry__Kusto__ClusterUri=blankTelemetry__Kusto__Database=EchoSpireTelemetry__JsonFallbackPath=/tmp/echospire-api-telemetry.ndjsonHosting__DisableHttpsRedirection=trueAiCompletion__Provider=OpenAIAiCompletion__Endpoint=https://api.openai.com/v1/chat/completionsAiCompletion__Model=gpt-4o-mini
For echospire-admin, set ApiBaseUrl to the public Render API URL:
https://echospire-api.onrender.com
If you later move the API behind a custom domain, update ApiBaseUrl to that public HTTPS URL.
Render Deployment Checks¶
- Start the Blueprint deployment.
- Wait for
echospire-apito finish building and become healthy. - Wait for
echospire-adminto finish building and become healthy. - Open the API public URL and verify the health endpoint returns success.
- Open the Admin public URL and verify the site loads.
Primary health URL:
/api/v1/health/api/v1/health/db
Checkpoint:
- Render shows both services as live
- the API health endpoint responds successfully
- the Admin UI loads in a browser
Step 4: Publish Docs On Cloudflare Pages¶
- Sign in to Cloudflare.
- Open
Workers & Pages. - Choose
Create application. - Choose
Pages. - Connect the GitHub repository if needed.
- Select this repository.
-
Use these build settings:
-
Framework preset:
None - Build command:
pip install -r requirements-docs.txt && mkdocs build --clean - Build output directory:
site -
Root directory: repository root
-
Start the deployment.
- Wait for the Pages build to complete.
- Open the generated Pages URL.
Checkpoint:
- the docs home page loads
- the official docs index loads
- the hosted deployment docs are visible in navigation
Step 5: Smoke Test The Environment¶
Run this smoke test after all three surfaces are live.
Docs¶
- Open the docs site.
- Navigate to the official docs index.
- Open the hosted deployment guide.
- Open this runbook page.
API¶
- Open the API health endpoint.
- Open the database health endpoint.
- Confirm both responses are successful.
- Confirm the database health response includes nonzero
factionsandclassescounts after seeding. - If Swagger is enabled in the deployed environment, verify it loads.
Admin¶
- Open the Admin site.
- Confirm the first page renders without a server error.
- Navigate to one or two API-backed screens.
- Confirm those screens do not fail because of API connectivity.
Persistence And Cache¶
- Exercise one API path that hits the database.
- Exercise one Admin action that results in an API call.
- Watch Render logs for connection or auth errors.
Recommended DB verification URL:
/api/v1/health/db
If the API is failing on startup, the first things to check are:
- invalid Neon connection string
- invalid Upstash connection string
- malformed JWT secret or missing generated secret
- accidental override of
ApiBaseUrlin Admin
Step 6: Optional Custom Domains¶
Only do this after the default provider URLs are working.
Recommended final hostnames:
docs.<your-domain>for Cloudflare Pagesadmin.<your-domain>for Render Adminapi.<your-domain>for Render API
Provider actions:
- Add the custom domain in the provider dashboard.
- Copy the DNS records the provider asks for.
- Create the DNS records in your DNS host.
- Wait for provider verification and TLS issuance.
- Re-run the smoke test on the custom domains.
Step 7: Release Flow After First Bring-Up¶
Once the hosted environment exists, the ongoing release loop is simple:
- Push changes to the branch used by the connected providers.
- Render auto-deploys the API and Admin changes.
- Cloudflare Pages rebuilds the docs site.
- Re-run the smoke test after each significant deploy.
If you want stricter release control later, switch Render services from auto-deploy to manual deploy and treat the provider dashboards as the release gate.
Step 8: Build And Distribute The Console EXE¶
Use the Build ConsoleGame Client GitHub Actions workflow to produce a downloadable Windows client that points at the hosted API.
Workflow location:
.github/workflows/consolegame-client-release.yml
How to run it:
- Open GitHub Actions.
- Run
Build ConsoleGame Clientmanually. - Leave the default
api_base_urlashttps://echospire-api.onrender.comunless the API moved to a custom domain. - Set
artifact_nameto something release-shaped, such astester-drop-001. - Wait for the workflow to finish.
- Download the uploaded artifact ZIP from the workflow run.
What the ZIP contains:
EchoSpire.ConsoleGame.exeappsettings.jsonREADME.txt
Distribution rule:
- send the ZIP as-is to testers
- do not send only the EXE by itself
- keep
appsettings.jsonnext to the EXE
Why this works:
- the packaged
appsettings.jsonis stamped with the hosted API URL - the client already authenticates against the live API at startup
- testers do not need a local API running
Manual override for support cases:
- set
ECHOSPIRE_Api__BaseUrlto another API URL if you need to retarget the client without editing files
Tester verification steps:
- Unzip the package.
- Launch
EchoSpire.ConsoleGame.exe. - Confirm the console shows
Connecting to API at https://echospire-api.onrender.com... - Confirm the console then shows
Authenticated. - If it fails, check internet access and confirm the API health endpoint still works.
Rollback¶
If a bad deploy lands:
Render¶
- Open the affected service.
- Open the deploy history.
- Redeploy the last known good deploy.
Cloudflare Pages¶
- Open the project.
- Open deployment history.
- Promote or redeploy the last known good build.
Data Services¶
Do not change Neon or Upstash during an application rollback unless the failure is clearly caused by a credentials or schema issue.
Troubleshooting¶
API unhealthy on Render¶
Check these first:
ConnectionStrings__PostgresConnectionStrings__Redis- Render service logs
- whether the container is binding to the expected port
- whether the service is running the image entrypoint instead of an overridden
dockerCommand
Admin loads but API-backed screens fail¶
Check these first:
- whether
echospire-apiis healthy - whether Render kept the
ApiBaseUrlservice reference intact - whether the API auth/login endpoint is reachable from Admin
Docs build fails on Cloudflare Pages¶
Check these first:
- the build command matches
pip install -r requirements-docs.txt && mkdocs build --clean - the output directory is exactly
site - the root directory is the repository root
AI naming does not work¶
Check these first:
AiCompletion__ApiKeyAiCompletion__EndpointAiCompletion__Model
If those remain unset, the system should continue to function with fallback hero naming.
Definition Of Done¶
This rollout is done when all of the following are true:
- docs are public and readable
- API health is green
- Admin is reachable and can talk to the API
- Postgres and Redis connectivity are stable
- the environment can survive a normal code redeploy