Promoting deployments¶
To send an ESP32 build to 10% of devices first, create the deployment with a rollout percentage of 10, watch what those devices report, then raise the percentage on the same deployment. Each device's place in the rollout comes from a hash of the deployment's seed and the device, so raising 10 to 25 only adds devices, and the ones already on the new build stay in (Cohorts and rollout math).
API="https://simpleota.com/api/v1/projects/$PROJECT_ID"
AUTH="Authorization: Bearer $SIMPLEOTA_TOKEN"
# Create a 10% canary of an uploaded artifact on one release channel, then start it.
DEPLOYMENT_ID=$(curl --fail-with-body -s -X POST "$API/deployments/" \
-H "$AUTH" -H "Content-Type: application/json" \
-d "{\"artifact_id\": \"$ARTIFACT_ID\", \"target_channel_ids\": [\"$CHANNEL_ID\"],
\"rollout_strategy\": \"canary\", \"rollout_percentage\": 10}" | jq -r .id)
curl --fail-with-body -X POST "$API/deployments/$DEPLOYMENT_ID/transition/" \
-H "$AUTH" -H "Content-Type: application/json" -d '{"action": "start"}'
# Later, once the canary looks healthy, widen the same deployment.
curl --fail-with-body -X POST "$API/deployments/$DEPLOYMENT_ID/transition/" \
-H "$AUTH" -H "Content-Type: application/json" \
-d '{"action": "ramp", "rollout_percentage": 25}'
In the dashboard (Advanced mode), create a canary deployment at 10% and use
the Ramp rollout panel on its page. The
GitHub Actions deploy and promote
actions wrap the same calls, and the
staged rollout walkthrough
takes one build from 10% to 100%.
Limits worth knowing:
- The percentage applies to the devices the deployment targets and that are compatible with the build. Over a small fleet the share is approximate: with five devices, a 10% rollout may reach none of them, or more than one.
- Ramping only goes up. A lower percentage is rejected; cancel the deployment and create a new one instead.
- Ramping is manual. SimpleOTA does not raise the percentage on a schedule.
A safe default ramp¶
| Step | Percentage | Wait for |
|---|---|---|
| 1 | 5% | At least 24h and a healthy success rate. |
| 2 | 25% | At least 24h, no spike in failed reports. |
| 3 | 50% | A few hours, watching for support tickets. |
| 4 | 100% | Done. |
Same rollout_seed throughout. The cohort math means buckets that were
already exposed at 5% are still exposed at 25%; you only add
buckets, never reshuffle.
What to watch¶
The deployment detail page surfaces, from what devices report to
/api/v1/ota/status/:
- Offered: devices that fell inside the cohort cutoff.
- Downloaded: reported
event: downloaded. - Confirmed: reported
event: confirmed, the terminal success. The device booted the new image and confirmed it. - Failed: reported
event: failed. Thereasonis surfaced too. - Rolled back: reported
event: rolled_backafter a trial install crashed, reset or ran out of time before it confirmed. - Pending: offered, with no terminal status yet.
After a failure, a device starts a new attempt when it reports
download_started or confirms the deployment's build. After a rollback, it
starts one when it reports download_started while it is within the retries
allowed. The row and timeline then show that attempt. A failure reported
before the download starts, such as a refused signature, leaves the row on
the earlier result.
The project audit log keeps the first five failures for each device and
deployment, and notes on the fifth that later failures are not logged.
A typical canary failure pattern: Failed > 2% of Offered within the first hour. That's your cue to pause the deployment (it's a button), investigate, and either roll forward (next build) or cut a revert deployment. Cancel is also available at any percentage if you want it stopped rather than held.
Stopping at 100%: when is it "done"?¶
A deployment with percentage = 100 and pending = 0 is effectively
finished, but it stays active until you say otherwise. Click Complete
(or POST {"action": "complete"}) when you are satisfied. Completion is
deliberate rather than automatic, because only you know whether the
stragglers matter.
Completed deployments stay in the audit trail; they just don't participate in the offer-decision query path.