carlos / carloku Public

Clone
git clone https://amadan.net/carlos/carloku

Plain git — no account needed to clone.

Download

Download this file

1# Channels
2
3A channel is a pointer with a name. It says which shipped version an app
4is serving, and promoting is the act of moving it. Nothing is rebuilt
5between one channel and the next — the bytes that were tested are the
6bytes that go live, which is the whole reason the platform separates
7shipping from promoting.
8
9## You start with one
10
11Every app is created with a single channel called `edge`, and
12`carlos deploy` lands there. That is enough for most apps: you deploy,
13and it is live. To see where things stand:
14
15```sh
16carlos channels -app hello
17```
18
19Nothing is ever promoted *onto* the entry channel. Deploys land there, and
20promotion moves a version from it to whatever comes next — so with one
21channel there is no promotion step at all.
22
23## Adding a stage in front of production
24
25When you want a version to sit somewhere before a wider audience sees it,
26declare a pipeline. The starter template adds a `production` channel
27behind `edge`:
28
29```sh
30carlos pipeline init -app hello -template edge-production
31```
32
33That gives `production` a 24-hour bake window, a passkey requirement on
34promotion, and an approval on any change to those rules — so the
35protection cannot be quietly removed later either. The other template,
36`full-ladder`, sets up `edge → beta → stable` with bakes of 24 and 72
37hours and the passkey on `stable`.
38
39Once a pipeline exists, deploys still land on `edge` and you move a
40version forward by naming it:
41
42```sh
43carlos promote -app hello a1b2c3d production
44```
45
46A channel is entered from the one immediately before it and no other, so
47"it ran on edge for a day first" is a fact about the bytes rather than a
48claim about process. Promoting the same version twice succeeds and
49changes nothing.
50
51The rules a channel can carry — bake windows, passkeys, approval counts —
52are all editable after the fact with
53[carlos pipeline](https://carlosframework.com/docs/cli/#carlos-pipeline),
54and [carlos promote](https://carlosframework.com/docs/cli/#carlos-promote)
55documents the rest of its own flags.
56
57## Putting a version back
58
59Rollback points a channel at whatever it was serving before:
60
61```sh
62carlos rollback -app hello production
63```
64
65The outgoing version goes onto the channel's history as it leaves, so
66running the same command again returns you to where you started — useful
67when the rollback turns out to be the wrong call. A bake window does not
68delay it: a box already has the version it is going back to, so there is
69nothing to hold.
70
71Two things are worth doing before you need this. Give your ships a
72`-label` people can read, because that is what you will be squinting at
73during a rollback. And get familiar with
74[carlos releases](https://carlosframework.com/docs/cli/#carlos-releases)
75while nothing is on fire: it answers "what is there to run", where
76`carlos channels` answers "what is running".
77
78## What reaching stable means
79
80The `full-ladder` shape has a `stable` channel at the top, and a
81promotion onto it can cut a semver tag: one name pointing at one release,
82with the changelog of every iteration that led there compiled into it.
83
84That happens when the version being promoted is an iteration of a target
85rather than a commit sha, so set the target once:
86
87```sh
88carlos version target -app hello 0.5.0
89```
90
91From then on `carlos ship` with no `-version` mints the next iteration
92under it. Promote a sha-named build to stable instead and the promotion
93still lands. There is no tag to cut, and the promotion says so.
94
95Tags are a naming convenience and an audit record, nothing more. No part
96of getting your app running reads one, so an app that never uses them
97loses nothing.
98
99Full flags for the commands on this page:
100[channels](https://carlosframework.com/docs/cli/#carlos-channels) and
101[rollback](https://carlosframework.com/docs/cli/#carlos-rollback).
102