infrastruktur:salt:bootstrap

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
Letzte ÜberarbeitungBeide Seiten der Revision
infrastruktur:salt:bootstrap [26.06.2017 18:47] christfinfrastruktur:salt:bootstrap [07.05.2023 14:30] igor
Zeile 1: Zeile 1:
-Auf der Maschine wo der Salt Minion läuft +Run the following commands on a new host: 
-  wget -O bootstrap-salt.sh https://bootstrap.saltstack.com +  apt update && apt -y install gnupg2 
-  sudo sh bootstrap-salt.sh -"salt.ffm.freifunk.net+  wget -O - "https://repo.saltstack.com/py3/debian/$(cat /etc/debian_version | sed 's/\..*//')/amd64/latest/SALTSTACK-GPG-KEY.pub" | apt-key add - 
-  echo "ipv6: True> /etc/salt/minion.d/98-ipv6.conf +  echo "deb https://repo.saltproject.io/py3/debian/$(cat /etc/debian_version | sed 's/\..*//')/amd64/3004 bullseye main> /etc/apt/sources.list.d/saltstack.list 
-  systemctl  restart salt-minion+  apt update 
 +  mkdir -p /etc/salt/minion.d/ 
 +  echo 'ipv6: True> /etc/salt/minion.d/ipv6.conf 
 +  echo 'master: salt.ffm.freifunk.net' > /etc/salt/minion.d/master.conf 
 +  apt install -y salt-minion
   salt-call --local key.finger   salt-call --local key.finger
  
-Im Git die pillar config erweitern+Init the pillar config for the new host:
 <file yaml host/tld/domain/name/service/init.sls> <file yaml host/tld/domain/name/service/init.sls>
 roles: roles:
   gateway   gateway
 +[...]
 </file> </file>
 +Potentially include service pillar like for example:
 <file yaml top.sls> <file yaml top.sls>
-[...] 
 base: base:
 [...] [...]
-  'service.host.domain.tld': +  'prometheus1.aixit.off.de.ffffm.net': 
-    - host.tld.domain.host.service+    - services.cadvisor 
 +    - services.pretix
 </file> </file>
  
-Und nun auf den Salt Master+And now check the key on the Salt Master, add the new host and run state.apply for the first time:
   salt-key -F   salt-key -F
-  salt-key -a 'hostname.ffffm.net+  salt-key -a '<hostname>
-  salt 'hostname.ffffm.net' state.apply+  salt '<hostname>' test.ping 
 +  salt '<hostname>' state.apply -l quiet --state-verbose=false saltenv=base
  
  • infrastruktur/salt/bootstrap.txt
  • Zuletzt geändert: 19.06.2023 22:55
  • von igor