roles.rst 1.2 KB

1234567891011121314151617181920212223242526272829303132
  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 = 'Normal Node',
  12. test = 'Test Node',
  13. backbone = 'Backbone Node',
  14. service = 'Service Node',
  15. },
  16. },
  17. The value of ``default`` is the role every node will initially own. This value should be part of ``list`` as well.
  18. If you want node owners to change the defined roles via config-mode you can add the package
  19. ``gluon-luci-node-role`` to your ``site.mk``. Then, you can select one of the defined roles from a dropdown list
  20. where the right-handed value is the one which is displayed and the left-handed key the one which is configured into
  21. the system.
  22. The role is saved in ``gluon-node-info.system.role``. To change the role using command line do::
  23. uci set gluon-node-info.system.role="$ROLE"
  24. uci commit
  25. Please replace ``$ROLE`` by the role you want the node to own.