Addon Updates

Hi Team,

How does the addon-update mechanism work? I’m trying to figure out but unable to find the relevant files. I got the Gateway update mechanism. Is it similar to that?

Abhijit

There are both automatic and manual add-on updates. The implementation of the scheduled automatic updates is here: https://github.com/mozilla-iot/gateway/blob/master/src/addon-manager.js#L1304. Simplifying out some of the logic, it fetches the list from https://github.com/mozilla-iot/addon-list/ and determines whether the semantic version of any installed add-on is lower than the most up-to-date version in the list. If there is an update available, it downloads and unpacks the new version’s package file then restarts the add-on.

Hi @hobinjk,

Thanks for the insight. I figured we also need to run the addon-proxy server to serve the list.json as required by the code.

Abhijit

Yes, you would also need to run the addon-proxy. The proxy pulls the list from GitHub, filters things, and returns them in a format expected by the gateway.

Hi I looks like addons repo is not more online:

curl -i https://api.mozilla-iot.org:8443/addons/info

curl: (7) Failed to connect to api.mozilla-iot.org port 8443: Connection timed out

Any opinion on supporting side repositories or other methods to install addons ?

Relate-to:

update: it’s back online , sorry for noise