site.rst 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242
  1. Site
  2. ====
  3. The ``site`` consists of the files ``site.conf`` and ``site.mk``.
  4. In the first community based values are defined, which both are processed
  5. during the build process and runtime.
  6. The last is directly included in the make process of Gluon.
  7. Configuration
  8. -------------
  9. The ``site.conf`` is a lua dictionary with the following defined keys.
  10. hostname_prefix
  11. A string which shall prefix the default hostname of a device.
  12. site_name
  13. The name of your community.
  14. site_code
  15. The code of your community. It is good practice to use the TLD of
  16. your community here.
  17. prefix4
  18. The IPv4 Subnet of your community mesh network in CIDR notation, e.g.
  19. ::
  20. prefix4 = '10.111.111.0/18'
  21. prefix6
  22. The IPv6 subnet of your community mesh network, e.g.
  23. ::
  24. prefix6 = 'fdca::ffee:babe:1::/64'
  25. timezone
  26. The timezone of your community live in, e.g.
  27. ::
  28. -- Europe/Berlin
  29. timezone = 'CET-1CEST,M3.5.0,M10.5.0/3'
  30. ntp_server
  31. List of NTP servers available in your community or used by your community, e.g.:
  32. ::
  33. ntp_servers = {'1.ntp.services.ffeh','2.tnp.services.ffeh'}
  34. opkg_repo : optional
  35. Overwrite the default ``opkg`` repository server, e.g.:
  36. ::
  37. opkg_repo = 'http://opkg.services.ffeh/attitude_adjustment/12.09/%S/packages'
  38. The `%S` is a variable, which is replaced with the platform of an device
  39. during the build process.
  40. regdom
  41. The wireless regulatory domain responsible for your area, e.g.:
  42. ::
  43. regdom = 'DE'
  44. wifi24
  45. WLAN Configuration of your community in the 2.4Ghz radio. Consisting
  46. of ``ssid`` of your client network, the ``channel`` your community is using,
  47. ``htmode``, the adhoc ssid ``mesh_ssid`` used between devices, the adhoc
  48. bssid ``mesh_bssid`` and the adhoc multicast rate ``mesh_mcast_rate``.
  49. Optionally ``mesh_vlan`` can be used to setup VLAN on top of the 802.11
  50. ad-hoc interface.
  51. Combined in an dictionary, e.g.:
  52. ::
  53. wifi24 = {
  54. ssid = 'http://kiel.freifunk.net/',
  55. channel = 11,
  56. htmode = 'HT40-',
  57. mesh_ssid = 'ff:ff:ff:ee:ba:be',
  58. mesh_bssid = 'ff:ff:ff:ee:ba:be',
  59. mesh_mcast_rate = 12000,
  60. },
  61. wifi5
  62. Same as `wifi24` but for the 5Ghz radio.
  63. next_node : package
  64. Configuration of the local node feature of Gluon
  65. ::
  66. next_node = {
  67. ip4 = '10.23.42.1',
  68. ip6 = 'fdca:ffee:babe:1::1',
  69. mac = 'ca:ff:ee:ba:be'
  70. }
  71. fastd_mesh_vpn
  72. Remote server setup for vpn.
  73. ::
  74. fastd_mesh_vpn = {
  75. methods = {'salsa2012+gmac'},
  76. mtu = 1426,
  77. backbone = {
  78. limit = 2,
  79. peers = {
  80. ffki_rz = {
  81. key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  82. remotes = {'ipv4 "vpn1.entenhausen.freifunk.net" port 10000'},
  83. },
  84. }
  85. }
  86. }
  87. mesh_on_wan : optional
  88. Enables the mesh on the WAN port (``true`` or ``false``).
  89. autoupdater : package
  90. Configuration for the autoupdater feature of Gluon.
  91. ::
  92. autoupdater = {
  93. enabled = 1,
  94. branch = 'experimental',
  95. branches = {
  96. stable = {
  97. name = 'stable',
  98. mirrors = {
  99. 'http://[fdca:ffee:babe:1::fec1]/firmware/stable/sysupgrade/',
  100. 'http://[fdca:ffee:babe:1::fec2]/firmware/stable/sysupgrade/',
  101. },
  102. probability = 0.08,
  103. good_signatures = 2,
  104. pubkeys = {
  105. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someguy
  106. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someother
  107. }
  108. }
  109. }
  110. }
  111. simple_tc : package
  112. Uplink traffic control
  113. ::
  114. simple_tc = {
  115. mesh_vpn = {
  116. ifname = 'mesh-vpn',
  117. enabled = false,
  118. limit_egress = 200,
  119. limit_ingress = 3000,
  120. },
  121. },
  122. setup_mode : package
  123. Allows skipping setup mode (config mode) at first boot when attribute
  124. ``skip`` is set to ``true``. This is optional and may be left out.
  125. ::
  126. setup_mode {
  127. skip = true,
  128. },
  129. config_mode : package
  130. Configuration Mode text blocks
  131. legacy : package
  132. Configuration for the legacy upgrade path.
  133. This is only required in communities upgrading from Lübeck's LFF-0.3.x.
  134. ::
  135. legacy = {
  136. version_files = {'/etc/.freifunk_version_keep', '/etc/.eff_version_keep'},
  137. old_files = {'/etc/config/config_mode', '/etc/config/ffeh', '/etc/config/freifunk'},
  138. config_mode_configs = {'config_mode', 'ffeh', 'freifunk'},
  139. fastd_configs = {'ffeh_mesh_vpn', 'mesh_vpn'},
  140. mesh_ifname = 'freifunk',
  141. tc_configs = {'ffki', 'freifunk'},
  142. wifi_names = {'wifi_freifunk', 'wifi_freifunk5', 'wifi_mesh', 'wifi_mesh5'},
  143. }
  144. Packages
  145. --------
  146. The ``site.mk`` is a Makefile which should define constants
  147. involved in the build process of Gluon.
  148. GLUON_SITE_PACKAGES
  149. Defines a list of packages which should installed additional
  150. to the ``gluon_core`` package.
  151. GLUON_RELEASE
  152. The current release version Gluon should use.
  153. GLUON_PRIORITY
  154. The default priority for the generated manifests (see the autoupdater documentation
  155. for more information).
  156. Examples
  157. --------
  158. site.mk
  159. ^^^^^^^
  160. .. literalinclude:: ../site-example/site.mk
  161. :language: makefile
  162. site.conf
  163. ^^^^^^^^^
  164. .. literalinclude:: ../site-example/site.conf
  165. :language: lua
  166. modules
  167. ^^^^^^^
  168. .. literalinclude:: ../site-example/modules
  169. :language: makefile
  170. site-repos in the wild
  171. ^^^^^^^^^^^^^^^^^^^^^^
  172. This is a non-exhaustive list of site-repos from various communities:
  173. * `site-ffbs <https://github.com/ffbs/site-ffbs>`_ (Braunschweig)
  174. * `site-ffhb <https://github.com/FreifunkBremen/gluon-site-ffhb>`_ (Bremen)
  175. * `site-ffda <https://github.com/freifunk-darmstadt/site-ffda>`_ (Darmstadt)
  176. * `site-ffgoe <https://github.com/freifunk-goettingen/site-ffgoe>`_ (Göttingen)
  177. * `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
  178. * `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
  179. * `site-ffhl <https://github.com/freifunk-gluon/site-ffhl>`_ (Lübeck)
  180. * `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
  181. * `site-ffmwu <https://github.com/freifunk-mwu/site-ffmwu>`_ (Mainz, Wiesbaden & Umgebung)
  182. * `site-ffmyk <https://github.com/FreifunkMYK/site-ffmyk>`_ (Mayen-Koblenz)
  183. * `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
  184. * `site-ffms <https://github.com/FreiFunkMuenster/site-ffms>`_ (Münster)
  185. * `site-ffnw <https://git.freifunk-ol.de/root/siteconf.git>`_ (Nordwest)
  186. * `site-ffpb <https://git.c3pb.de/freifunk-pb/site-ffpb>`_ (Paderborn)
  187. * `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)
  188. * `site-ffrl <https://github.com/ffrl/sites-ffrl>`_ (Rheinland)
  189. * `site-ffrg <https://github.com/ffruhr/site-ffruhr>`_ (Ruhrgebiet)
  190. * `site-ffs <https://github.com/freifunk-stuttgart/site-ffs>`_ (Stuttgart)