Freifunk:Salt: Unterschied zwischen den Versionen

Aus Hacksaar Wiki
Zur Navigation springen Zur Suche springen
Die Seite wurde neu angelegt: „== 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 De…“
 
Keine Bearbeitungszusammenfassung
 
(2 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 17: Zeile 17:
== How to set up a new gateway ==
== How to set up a new gateway ==


0. auf mgmt: per `salt-key -d <hostname>` altes GW löschen
* 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.


0. auf dem alten GW salt ausschalten
== Dist-upgrade notes ==


0. auf dem neuen GW den hostname setzen
Generally, the precedure is:


1. https://docs.saltstack.com/en/latest/topics/installation/index.html#installation
* Update <code>sources.list</code>
* Run <code>apt update && apt full-upgrade</code>, reboot
* Clean up old packages that are still installed (this is best done with aptitude)
* Re-deploy Salt


2. apt install salt-minion
=== Debian 11 to Debian 12 ===


3. `/etc/salt/minion`, sehr weit oben: `master: mgmt.saar.freifunk.net`
* Before the Salt re-deploy, remove <code>/etc/apt/sources.list.d/nodesource.list</code> so that Salt properly re-generates it.


4. auf mgmt: per `salt-key` neues GW freischalten
== Dealing with Salt issues ==


5. vor dem deployen: IP und eth0-name in pillar aktualisieren.
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
 
[[Kategorie:Freifunk]]

Aktuelle Version vom 12. Januar 2025, 10:48 Uhr

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