|
5 years ago | |
---|---|---|
.. | ||
00-run.sh | 5 years ago | |
01-run.sh | 5 years ago | |
02-run.sh | 5 years ago | |
03-run.sh | 5 years ago | |
README.md | 5 years ago | |
start.sh | 5 years ago | |
status.json | 5 years ago |
README.md
Over-The-Air (OTA) Updates
How over-the-air updates work on Umbrel.
Execution Flow
-
New developments across the any/entire fleet of Umbrel's services (bitcoind, lnd, dashboard, middleware, etc) are made, which maintain their own independent version-control and release-schedule. Subsequently, their new docker images are built, tagged and pushed to Docker Hub.
-
The newly built and tagged images are updated in the main repository's (this repo)
docker-compose.yml
. -
Any new developments to the main repository (this repo) are made, eg. adding a new directory or a new config file.
-
To prepare a new release of Umbrel, called
vX.Y.Z
, a PR is opened that updates theinfo.json
file to:
{
"version": "X.Y.Z",
"name": "Umbrel vX.Y.Z",
"notes": "This release contains a number of bug fixes and new features."
"requires": "A.B.C"
}
-
Once the PR is merged, the master branch is immediately tagged
vX.Y.Z
and released on GitHub. -
The new
info.json
will automatically be refreshed athttps://raw.github.com/getumbrel/umbrel/master/info.json
. This is what pushes the OTA update. -
When the user opens his
umbrel-dashboard
, it periodically pollsumbrel-manager
to check for new updates. -
umbrel-manager
fetches the latestinfo.json
from umbrel's main repo's master branch usingGET https://raw.github.com/getumbrel/umbrel/master/info.json
, compares it'sversion
with theversion
of the localinfo.json
file, and exits if both the versions are same. -
If fetched
version
> localversion
,umbrel-manager
checks if localversion
>=requires
in the fetchedinfo.json
. -
If not, umbrel-manager makes a
GET
request tohttps://raw.github.com/getumbrel/umbrel/vX.Y.Z/info.json
and repeats step 8 (until localversion
>=requires
). -
umbrel-manager
then returns theinfo.json
toumbrel-dashboard
. -
umbrel-dashboard
then alerts the user regarding the new update, and after thee user consents,umbrel-dashboard
makes aPOST
request toumbrel-manager
to start the update process. -
umbrel-manager
creates a signal file on the mounted host OS volume (/statuses/start-updated
) with the contentvX.Y.Z
, and returns200 OK
to theumbrel-dashboard
. -
fswatch
, a file monitoring tool that's continuosly monitoring the (/statuses/start-update
) files notices the change, and immeditaly runs./start.sh
-
start.sh
clones releasevX.Y.Z
from github in/tmp/umbrel-vX.Y.Z
-
start.sh
then executes all of the following update scripts in/tmp/umbrel-vX.Y.Z
one-by-one:
00-run.sh
: Pre-update preparation script (does things like make a backup)01-run.sh
: Install update script (installs the update)02-run.sh
: Post-update script (used to run unit-tests to make sure the update was successfully installed)03-run.sh
: Success script (runs after the updated has been successfully downloaded and installeed)
All of the above scripts continuosly update /bin/update/status.json
with the progress of upgrade, which the dashboard periodically fetches every 2s via umbrel-manager
to notify the user on the progress of update.