Freifunk:Salt

Aus Hacksaar Wiki
Version vom 12. Januar 2025, 10:48 Uhr von Ralf (Diskussion | Beiträge)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Zur Navigation springen Zur Suche springen

How to deploy the salt state

Deploy on all gateways:

  cd /srv/salt && sudo git pull && sudo salt --state-output=changes 'gw*.*' state.apply -t 32

Deploy on mgmt:

  cd /srv/salt && sudo git pull && sudo salt --state-output=changes 'mgmt.*' state.apply -t 32

Some other salt commands

 salt '*' pkg.upgrade refresh=True dist_upgrade=True
 salt '*' system.reboot

How to set up a new gateway

  • auf mgmt: per `salt-key -d <hostname>` altes GW löschen
  • auf dem alten GW Salt ausschalten
  • auf dem neuen GW den hostname setzen
  • https://docs.saltstack.com/en/latest/topics/installation/index.html#installation
  • apt install salt-minion
  • `/etc/salt/minion`, sehr weit oben: `master: mgmt.saar.freifunk.net`
  • auf mgmt: per `salt-key` neues GW freischalten
  • vor dem deployen: IP und eth0-name in pillar aktualisieren.

Dist-upgrade notes

Generally, the precedure is:

  • Update sources.list
  • Run apt update && apt full-upgrade, reboot
  • Clean up old packages that are still installed (this is best done with aptitude)
  • Re-deploy Salt

Debian 11 to Debian 12

  • Before the Salt re-deploy, remove /etc/apt/sources.list.d/nodesource.list so that Salt properly re-generates it.

Dealing with Salt issues

If you get an error saying "Salt request timed out. The master is not responding.", it seems to help to restart the Salt master:

 sudo systemctl restart salt-master