Freifunk:Salt: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
Ralf (Diskussion | Beiträge) |
Ralf (Diskussion | Beiträge) |
||
Zeile 17: | Zeile 17: | ||
== How to set up a new gateway == | == 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 <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 | ||
+ | |||
+ | === Debian 11 to Debian 12 === | ||
+ | |||
+ | * Before the Salt re-deploy, remove <code>/etc/apt/sources.list.d/nodesource.list</code> so that Salt properly re-generates it. | ||
== Dealing with Salt issues == | == Dealing with Salt issues == | ||
Zeile 30: | Zeile 44: | ||
sudo systemctl restart salt-master | sudo systemctl restart salt-master | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
[[Kategorie:Freifunk]] | [[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