Solutions · Multi-environment
Development, staging and production, kept apart
Each environment talks to the same providers with different accounts, keys, URLs and settings. Ahena gives every environment its own connections, credentials and secrets, applies stricter rules to production, and checks that environments don't leak into each other.
Why environments drift apart
Provider configuration rarely lines up across environments on its own:
- Different keys, webhook URLs, redirect URLs and domains per environment, all set by hand.
- Staging that was set up once and no longer resembles production.
- A development credential that ends up in production, or a production one used for testing.
- Nobody can say for sure which settings differ, and which differences are intended.
Ahena's environment model
Every environment stands alone
Each one has its own provider connections, credentials, secrets, plans and Doctor results. Nothing falls back from one environment to another.
Per-environment declaration
ahena.config.tsvalues can be one value or keyed by environment, including a different provider per environment (for example a local AI model in development).Production is stricter
Production changes and secrets need an admin, and changes that aren't safe are approved in the signed-in dashboard. An environment holding a live Stripe key is treated as production whatever it's called.
Separation checks
Doctor flags test keys in production, live keys elsewhere, and the same secret value shared between production and another environment.
Monitoring per environment
Each environment has its own Continuous Doctor schedule; production is checked daily by default.
Adding a staging environment
$ ahena env create Staging --kind staging$ ahena connect stripe -e staging # its own credential$ ahena plan -e staging # what staging needs, from ahena.config.ts$ ahena doctor -e staging
Good to know
- Ahena doesn't copy configuration or data from one environment to another automatically; each environment is planned from what
ahena.config.tsdeclares for it. - Only Stripe keys say for certain whether they're live; for other providers, give production environments the production kind.
Questions
How do I manage development, staging and production provider configuration?
Give each environment its own connections and secrets in Ahena, declare per-environment values in ahena.config.ts, and run ahena plan and ahena doctor per environment. Production changes need an admin and dashboard approval, and Doctor flags credentials or secrets that cross environments.