How To Release a Gateway OTA Update
Michael Stegeman edited this page Apr 1, 2021
·
13 revisions
Pages 40
Clone this wiki locally
- Bump the semantic version in
package.json
. - Bump the version in
webthings-gateway.spec
. - Update the Debian changelog.
- Update the
gateway-addon
node dependency inpackage.json
and regeneratepackage-lock.json
(e.g.rm -rf node_modules package-lock.json && npm install
). - Update the
gateway_addon
python dependency inrequirements.txt
. - Push the bump to master.
- Tag the release, e.g.
git tag 1.0.0
and push the tag to GitHub. - The CI jobs will take care of most release tasks. Some packages may need to be built manually via
deb/build-deb-manual.sh
and/orrpm/build-rpm-manual.sh
. - Edit the release and add some release notes.
- Uncheck the prerelease flag on the release when ready.
What Comes Next
- Gateway's
cron
runs tools/check-for-update.js - This script notices the new release and runs tools/upgrade.sh.
- tools/upgrade.sh performs the upgrade process
The Upgrade Process
- Download and verify
gateway-<hash>.tar.gz
andnode_modules-<hash>.tar.gz
- Copy the current gateway into
/tmp/gateway_new
- Extract
gateway-<hash>.tar.gz
intogateway_new
, overwriting any matching files - Replace
gateway_new/node_modules
with the new release'snode_modules
- Stop
webthings-gateway.service
- Move the current gateway to
gateway_old
- Move the new gateway to
gateway
- Run
./tools/post-update.sh
- Start
webthings-gateway.service
Rolling Back
- Move the current gateway to
gateway_failed
- Move the the
gateway_old
togateway