Skip to content

How To Release a Gateway OTA Update

Michael Stegeman edited this page Apr 1, 2021 · 13 revisions
  1. Bump the semantic version in package.json.
  2. Bump the version in webthings-gateway.spec.
  3. Update the Debian changelog.
  4. Update the gateway-addon node dependency in package.json and regenerate package-lock.json (e.g. rm -rf node_modules package-lock.json && npm install).
  5. Update the gateway_addon python dependency in requirements.txt.
  6. Push the bump to master.
  7. Tag the release, e.g. git tag 1.0.0 and push the tag to GitHub.
  8. The CI jobs will take care of most release tasks. Some packages may need to be built manually via deb/ and/or rpm/
  9. Edit the release and add some release notes.
  10. Uncheck the prerelease flag on the release when ready.

What Comes Next

  1. Gateway's cron runs tools/check-for-update.js
  2. This script notices the new release and runs tools/
  3. tools/ performs the upgrade process

The Upgrade Process

  1. Download and verify gateway-<hash>.tar.gz and node_modules-<hash>.tar.gz
  2. Copy the current gateway into /tmp/gateway_new
  3. Extract gateway-<hash>.tar.gz into gateway_new, overwriting any matching files
  4. Replace gateway_new/node_modules with the new release's node_modules
  5. Stop webthings-gateway.service
  6. Move the current gateway to gateway_old
  7. Move the new gateway to gateway
  8. Run ./tools/
  9. Start webthings-gateway.service

Rolling Back

  1. Move the current gateway to gateway_failed
  2. Move the the gateway_old to gateway

Testing an OTA release

See Testing prerelease OTA updates.