Skip to content
Weik.ioDocs
2026.2
Try Weik.io

Environments and promotion

Weik.io 2026.2

Copy a tested deployment to the next environment with weikio promote, without a rebuild. Product page · Video

Watch: From devtest to production, 4:22

The video promotes a tested version from devtest to production without a rebuild.

On this page

Every project deploys into the same environments, such as devtest and production, in the order a platform administrator set.

The environments#

Terminal
$ weikio get environments
You see
NAME         ORDER   PRODUCTION   EVENTS BUDGET   ENTITY EVENTS   ENTITY STORE   GATEWAYS            AGENTS       SCHEDULE RUNS
devtest      1       no           2 GiB           1 GiB           512 MiB        devtest (default)   1/1 online   256 MiB
production   2       yes          2 GiB           1 GiB           2 GiB          -                   0/0 online   256 MiB

A platform administrator creates the environments, usually as documents in a repository of the platform’s configuration:

platform/environments.yaml
apiVersion: weik.io/v1
kind: environment
metadata: { name: devtest }
spec: { displayName: Dev and test, order: 1, isProduction: false, protection: { allowSecretReveal: true, allowLatestVersion: true }, budgets: { entityStoreBytes: 536870912 } }
---
apiVersion: weik.io/v1
kind: environment
metadata: { name: production }
spec: { displayName: Production, order: 2, isProduction: true, protection: { allowSecretReveal: false }, budgets: { entityStoreBytes: 2147483648 } }

Each environment has its own event streams and entity store. It has a storage budget for each kind of data it keeps:

  • Events
  • Entity events
  • Schedule runs
  • Dead letters
  • Entity store
  • Handled events

In an environment document, you must set entityStoreBytes. Each budget you leave out gets the installation’s default.

To add a third environment, such as staging, write another environment document.

What a production environment changes#

Weik.io protects an environment with isProduction: true:

  • A command that changes it needs the environment from --env or WEIKIO_ENV, or from the metadata of the document it applies.
  • A deployment pins a version and can follow latest only when allowLatestVersion is set.
  • With allowSecretReveal: false, even a platform administrator can’t read a secret value there.

The CLI never uses a production environment from your context. Here the context’s environment is production, but the command has no --env. The CLI stops and prints the same command with --env added:

Terminal
$ weikio deploy finance/erp-invoice-export
You see
error: --env is required to write to production environment 'production'.
       To go ahead, run:
         weikio deploy finance/erp-invoice-export --env production

Promote#

weikio promote copies a deployment from one environment to the next. Production runs the version devtest ran, without a rebuild:

Terminal
$ weikio promote finance/erp-invoice-export --from devtest --to production
You see
Target: https://hub.example, project finance (argument), environment production (--to)
This will promote 'finance/erp-invoice-export' 1.1.0 to production environment 'production'.
Continue? [y/N] y
Promoting finance/erp-invoice-export 1.1.0 (latest) to production...
deployment production/finance/erp-invoice-export updated (version 1.0.0 -> 1.1.0, previous 1.0.0)
Agents: 1 of 1 running after 4.0 s

When devtest follows latest, production is pinned to the version latest points to at that moment. Production keeps the version it ran before, so weikio rollback can return to it.

/integrations/finance/erp-invoice-export
The page of finance/erp-invoice-export with version 1.2.0 running in devtest on the agent dev and in production on fi-01, where 1.1.0 ran before. The last hour of production has no failed messages. The log lines of production follow.The page of finance/erp-invoice-export with version 1.2.0 running in devtest on the agent dev and in production on fi-01, where 1.1.0 ran before. The last hour of production has no failed messages. The log lines of production follow.The page of finance/erp-invoice-export with version 1.2.0 in devtest and 1.1.0 in production, where 8 of 88 messages failed in 15 minutes. The last hour of production has its messages, failures, memory and the counter invoices_processed.The page of finance/erp-invoice-export with version 1.2.0 in devtest and 1.1.0 in production, where 8 of 88 messages failed in 15 minutes. The last hour of production has its messages, failures, memory and the counter invoices_processed.
The page of finance/erp-invoice-export shows the version and the agent of devtest and production side by side. It also shows the version production ran before.

When a secret the version needs has no value in production, the promote stops and prints the commands that set it:

Terminal
$ weikio promote finance/erp-invoice-export --from devtest --to production
You see
Target: https://hub.example, project finance (argument), environment production (--to)
error: Can't deploy finance/erp-invoice-export 1.1.0 to production: secret 'erp-api-key' has no value.
       To set 'erp-api-key', run:
         weikio secret set finance/erp-api-key --env production
       To set it for this integration only, run:
         weikio secret set finance/erp-api-key --integration erp-invoice-export --env production

To promote an API, run weikio api promote finance/invoices@v1 --from devtest --to production. Production then serves the definition devtest tested.

What changes per environment#

A promoted version is the same in every environment except for its configuration.

Differs per environment Where you set it
Values such as URLs, sizes and schedules Variables with an environment, and secrets
Which agents run it The agents’ environment capabilities
The API’s hostnames and certificates The environment’s gateways
A deployment’s overrides, Java options and trusted certificates The deployment

A promote leaves the overrides of the production deployment as they are.

Promotion from Git#

When you keep your integrations in Git, a promotion is a pull request that changes the version in finance/production/deployments/erp-invoice-export.yaml. The production workflow applies it after the required reviewers approve. Keep integrations in Git has the workflows.

Sign in to the live demo

Sign in with the shared viewer account. It can open every screen of the example projects but can't change anything.

E-mail
viewer@demo.weik.io
Password
try-weikio-live-demo
Open the live demo