roles.rst 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. Roles
  2. =====
  3. It is possible to define a set of roles you want to distinguish at backend side. One node can own one
  4. role which it will announce via alfred inside the mesh. This will make it easier to differentiate
  5. nodes when parsing alfred data. E.g to count only **normal** nodes and not the gateways
  6. or servers (nodemap). A lot of things are possible.
  7. For this the section ``roles`` in ``site.conf`` is needed::
  8. roles = {
  9. default = 'node',
  10. list = {
  11. 'node',
  12. 'test',
  13. 'backbone',
  14. 'service',
  15. },
  16. },
  17. The strings to display in the LuCI interface are configured per language in the
  18. ``i18n/en.po``, ``i18n/de.po``, etc. files of the site repository using message IDs like
  19. ``gluon-luci-node-role:role:node`` and ``gluon-luci-node-role:role:backbone``.
  20. The value of ``default`` is the role every node will initially own. This value should be part of ``list`` as well.
  21. If you want node owners to change the defined roles via config-mode you can add the package
  22. ``gluon-luci-node-role`` to your ``site.mk``.
  23. The role is saved in ``gluon-node-info.system.role``. To change the role using command line do::
  24. uci set gluon-node-info.system.role="$ROLE"
  25. uci commit
  26. Please replace ``$ROLE`` by the role you want the node to own.