autoupdater.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. (Note: The priority
  15. doesn't have an effect as the moment, this is yet to be implemented)
  16. The priority may be an integer or a decimal fraction.
  17. A fully automated nightly build could use the following commands:
  18. ::
  19. git pull
  20. (cd site && git pull)
  21. make update
  22. make clean
  23. make -j5 GLUON_BRANCH=experimental
  24. make manifest GLUON_BRANCH=experimental
  25. contrib/sign.sh $SECRETKEY images/sysupgrade/experimental.manifest
  26. cp -r images /where/to/put/this/experimental
  27. ln -s experimental.manifest /where/to/put/this/experimental/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. autoupdate
  52. ::
  53. # Force update check, even when the updater is disabled
  54. autoupdater -f