autoupdater.rst 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 will start at 0 after the release time mentioned in the manifest
  14. and then slowly rise to 1 up to the point when 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. NUM_CORES_PLUS_ONE=$(expr $(nproc) + 1)
  23. make -j$NUM_CORES_PLUS_ONE GLUON_TARGET=ar71xx-generic GLUON_BRANCH=experimental
  24. make manifest GLUON_BRANCH=experimental
  25. contrib/sign.sh $SECRETKEY output/images/sysupgrade/experimental.manifest
  26. rm -rf /where/to/put/this/experimental
  27. cp -r output/images /where/to/put/this/experimental
  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 server must be available via IPv6.
  43. Command Line
  44. ------------
  45. These commands can be used on a node:
  46. ::
  47. # Update with some probability
  48. autoupdater
  49. ::
  50. # Force update check, even when the updater is disabled
  51. autoupdater -f
  52. ::
  53. # If fallback is true the updater will perform an update only if
  54. # the timespan given by the priority and another 24h have passed
  55. autoupdater --fallback