autoupdater.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. Autoupdater
  2. ===========
  3. Gluon contains an automatic update system which can be configured in the site configuration.
  4. Building Images
  5. ---------------
  6. By default, the autoupdater is disabled (as it is usually not helpful to have unexpected updates
  7. during development), but it can be enabled by setting the variable GLUON_BRANCH when building
  8. to override the default branch set in the set in the site configuration.
  9. A manifest file for the updater can be generated with `make manifest`. A signing script (using
  10. ecdsautils) can by found in the `contrib` directory. When creating the manifest, ``GLUON_PRIORITY`` can
  11. be set on the command line, or it can be taken from the ``site.mk``.
  12. The priority defines the maximum number of days that may pass between releasing an update and installation
  13. of the images. The update probability with start at 0 after the release time mentioned in the manifest
  14. and then slowly rise to 1 after the number of days given by the priority has passed.
  15. The priority may be an integer or a decimal fraction.
  16. A fully automated nightly build could use the following commands:
  17. ::
  18. git pull
  19. (cd site && git pull)
  20. make update
  21. make clean
  22. make -j5 GLUON_BRANCH=experimental
  23. make manifest GLUON_BRANCH=experimental
  24. contrib/sign.sh $SECRETKEY images/sysupgrade/experimental.manifest
  25. rm -rf /where/to/put/this/experimental
  26. cp -r images /where/to/put/this/experimental
  27. ln -s experimental.manifest /where/to/put/this/experimental/sysupgrade/manifest
  28. Infrastructure
  29. --------------
  30. We suggest to have following directory tree accessible via http:
  31. ::
  32. firmware/
  33. stable/
  34. sysupgrade/
  35. factory/
  36. snapshot/
  37. sysupgrade/
  38. factory/
  39. experimental/
  40. sysupgrade/
  41. factory/
  42. The last level is generated by the Gluon build process. Do not forget
  43. to create symlinks from ``manifest`` to ``<branch>.manifest`` in the
  44. sysupgrade directories to allow upgrades from Gluon versions before 2014.3.
  45. The server should be available via IPv6.
  46. Command Line
  47. ------------
  48. These commands can be used on a node.
  49. ::
  50. # Update with some probability
  51. autoupdater
  52. ::
  53. # Force update check, even when the updater is disabled
  54. autoupdater -f