Releases and rollback
A release is a frozen copy of a host workspace that runs on its own machine with production secrets. Your URL switches to it only once it is built and healthy, the workspace stays free for development, and rolling back is one click.
Releases exist only for hosts. Each plan keeps a number of releases per host: 5 on PRO, 20 on ULTRA, 50 on ENTERPRISE. After each new release, the oldest one beyond that number is deleted, except the one being served.
Create a release#
- Open Releases On the host's workspace page, open Releases.
- Choose Release Add Release notes if you like (at most 500 characters). Keep Serve it when ready on to switch the URL automatically.
- Wait for it The workspace is copied while it keeps running; its disk is frozen for a few seconds at the end. The release then boots on its own machine.
- Check the URL When the release shows Serving, visitors get it. Edits in the workspace no longer reach them.
What runs in a release#
flowchart TD
copy["Copy of /workspace"] --> rt["runtime"]
rt --> b["build"]
b --> r["release"]
r --> svc["Services with env.prod"]
svc --> h{"Health checks pass?"}
h -- "Yes" --> t(["URL switches to it"])
h -- "No" --> f["Failed, with a Log"]
f --> old(["Previous version keeps serving"])- Runtimes, build and release steps run at every boot of the release machine, including when you serve an older release again.
[setup]does not run: the release is a copy of a workspace where it already ran. - Services get the prod secrets and
[env.prod]. The workspace keeps the dev secrets and[env.dev]. [cron.*]jobs run only in the release, on their UTC schedule.- A version 1
izcode.tomlhas no steps: its services start as soon as the release boots.
The previous release, or the live workspace, serves until the new one is running. If there is not enough room to run both, the old one stops first and visitors briefly see a Deploying… page.
Release states#
stateDiagram-v2
[*] --> Copying
Copying --> Ready
Ready --> Deploying: serve it
Deploying --> Running: healthy
Deploying --> Failed: step or health fails
Running --> Stopped: another version serves
Stopped --> Deploying: Serve this release| State | Meaning |
|---|---|
| Copying… | The workspace is being copied |
| Ready | Copied; not started |
| Deploying… | Booting and running its steps |
| Running | Up; Serving marks the one visitors get |
| Stopped | Not running |
| Failed | A step failed, a service crash-looped or failed its health check, or izcode.toml was invalid |
When a release fails because of izcode.toml or your code, the app says so and shows a Log with the last output. It is not retried automatically and the previous version keeps serving. Fix the problem in the workspace (izc build, izc logs build), then create a new release.
Roll back and go back to live#
| Action | How | Effect |
|---|---|---|
| Roll back | Serve this release on an older release | It boots, runs its steps and takes over when running |
| Serve a new release | Serve this release | Same as rollback, forward |
| Back to live | Serve live workspace | The URL shows the workspace as it is now; the release machine stops |
| Delete | Delete release | Removes its copy; not possible for the one being served |
The same actions are on izcode.dev/workspaces under the host's Releases: Activate and Back to live.
Secrets#
Open Environment secrets and pick an environment:
| Environment | Who gets it |
|---|---|
| dev | The workspace's services and terminals (open a new terminal to get a change), and agent forks |
| prod | The services of the running release, never the workspace |
| Rule | Limit |
|---|---|
| Name | A–Z, 0–9 and _, starting with a letter or _, at most 64 characters |
| Value | At most 32 KiB; stored encrypted and never shown again |
| Count | At most 100 per environment |
Adding, changing or deleting a secret restarts the services that receive it. Secret values are masked in service logs, and backups never contain them.
Tips#
- Test steps in the workspace first with
izc buildandizc run release. - Keep the workspace for development: with a release serving, an idle workspace can be suspended while the release keeps serving.
- An agent's fork can become a release with Promote; see Background agents.
Related#
[build], [release], [cron] and [env.prod].ReferenceTroubleshootingWhy a release failed.Fix problems