site.rst 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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. Combined in an dictionary, e.g.:
  50. ::
  51. wifi24 = {
  52. ssid = 'http://kiel.freifunk.net/',
  53. channel = 11,
  54. htmode = 'HT40-',
  55. mesh_ssid = 'ff:ff:ff:ee:ba:be',
  56. mesh_bssid = 'ff:ff:ff:ee:ba:be',
  57. mesh_mcast_rate = 12000,
  58. },
  59. wifi5
  60. Same as `wifi24` but for the 5Ghz radio.
  61. next_node : package
  62. Configuration of the local node feature of Gluon
  63. ::
  64. next_node = {
  65. ip4 = '10.23.42.1',
  66. ip6 = 'fdca:ffee:babe:1::1',
  67. mac = 'ca:ff:ee:ba:be'
  68. }
  69. fastd_mesh_vpn
  70. Remote server setup for vpn.
  71. ::
  72. fastd_mesh_vpn = {
  73. methods = {'salsa2012+gmac'},
  74. mtu = 1426,
  75. backbone = {
  76. limit = 2,
  77. peers = {
  78. ffki_rz = {
  79. key = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
  80. remotes = {'ipv4 "vpn1.entenhausen.freifunk.net" port 10000'},
  81. },
  82. }
  83. }
  84. }
  85. mesh_on_wan : optional
  86. Enables the mesh on the WAN port (``true`` or ``false``).
  87. autoupdater : package
  88. Configuration for the autoupdater feature of Gluon.
  89. ::
  90. autoupdater = {
  91. enabled = 1,
  92. branch = 'experimental',
  93. branches = {
  94. stable = {
  95. name = 'stable',
  96. mirrors = {
  97. 'http://{fdca:ffee:babe:1::fec1}/firmware/stable/sysupgrade/',
  98. 'http://{fdca:ffee:babe:1::fec2}/firmware/stable/sysupgrade/',
  99. },
  100. probability = 0.08,
  101. good_signatures = 2,
  102. pubkeys = {
  103. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someguy
  104. 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX', -- someother
  105. }
  106. }
  107. }
  108. }
  109. simple_tc : package
  110. Uplink traffic control
  111. ::
  112. simple_tc = {
  113. mesh_vpn = {
  114. ifname = 'mesh-vpn',
  115. enabled = false,
  116. limit_egress = 200,
  117. limit_ingress = 3000,
  118. },
  119. },
  120. config_mode : package
  121. Configuration Mode text blocks
  122. legacy : package
  123. Configuration for the legacy upgrade path.
  124. This is only required in communities upgrading from Lübeck's LFF-0.3.x.
  125. ::
  126. legacy = {
  127. version_files = {'/etc/.freifunk_version_keep', '/etc/.eff_version_keep'},
  128. old_files = {'/etc/config/config_mode', '/etc/config/ffeh', '/etc/config/freifunk'},
  129. config_mode_configs = {'config_mode', 'ffeh', 'freifunk'},
  130. fastd_configs = {'ffeh_mesh_vpn', 'mesh_vpn'},
  131. mesh_ifname = 'freifunk',
  132. tc_configs = {'ffki', 'freifunk'},
  133. wifi_names = {'wifi_freifunk', 'wifi_freifunk5', 'wifi_mesh', 'wifi_mesh5'},
  134. }
  135. Packages
  136. --------
  137. The ``site.mk`` is a Makefile which should define constants
  138. involved in the build process of Gluon.
  139. GLUON_SITE_PACKAGES
  140. Defines a list of packages which should installed additional
  141. to the ``gluon_core`` package.
  142. GLUON_RELEASE
  143. The current release version Gluon should use.
  144. GLUON_PRIORITY
  145. The default priority for the generated manifests (see the autoupdater documentation
  146. for more information).
  147. Examples
  148. --------
  149. site.mk
  150. ^^^^^^^
  151. .. literalinclude:: ../site-example/site.mk
  152. :language: makefile
  153. site.conf
  154. ^^^^^^^^^
  155. .. literalinclude:: ../site-example/site.conf
  156. :language: lua
  157. modules
  158. ^^^^^^^
  159. .. literalinclude:: ../site-example/modules
  160. :language: makefile
  161. site-repos in the wild
  162. ^^^^^^^^^^^^^^^^^^^^^^
  163. This is a non-exhaustive list of site-repos from various communities:
  164. * `site-ffbs <https://github.com/ffbs/site-ffbs>`_ (Braunschweig)
  165. * `site-ffhb <https://github.com/FreifunkBremen/gluon-site-ffhb>`_ (Bremen)
  166. * `site-ffhh <https://github.com/freifunkhamburg/site-ffhh>`_ (Hamburg)
  167. * `site-ffhgw <https://github.com/lorenzo-greifswald/site-ffhgw>`_ (Greifswald)
  168. * `site-ffhl <https://github.com/freifunk-gluon/site-ffhl>`_ (Lübeck)
  169. * `site-ffmd <https://github.com/FreifunkMD/site-ffmd>`_ (Magdeburg)
  170. * `site-ffmz <https://github.com/freifunk-mwu/site-ffmz>`_ (Mainz, Wiesbaden & Umgebung)
  171. * `site-ffm <https://github.com/freifunkMUC/site-ffm>`_ (München)
  172. * `site-ffnw <https://git.freifunk-ol.de/root/siteconf.git>`_ (Nordwest)
  173. * `site-ffpb <https://git.c3pb.de/freifunk-pb/site-ffpb>`_ (Paderborn)
  174. * `site-ffka <https://github.com/ffka/site-ffka>`_ (Karlsruhe)