infrastruktur:salt:bootstrap

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Nächste Überarbeitung
Vorhergehende Überarbeitung
infrastruktur:salt:bootstrap [16.04.2017 19:25] – angelegt skorpyinfrastruktur:salt:bootstrap [19.06.2023 22:55] (aktuell) igor
Zeile 1: Zeile 1:
-wget -O bootstrap-salt.sh https://bootstrap.saltstack.com +Run the following commands on a new host: 
-sudo sh bootstrap-salt.sh -"salt.ffm.freifunk.net+  apt update && apt -y install gnupg2 
-echo "ipv6: True> /etc/salt/minion.d/98-ipv6.conf+  wget -O - "https://repo.saltproject.io/py3/debian/$(cat /etc/debian_version | sed 's/\..*//')/amd64/3004/SALTSTACK-GPG-KEY.pub" | apt-key add - 
 +  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 
 +  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 
 + 
 +Init the pillar config for the new host: 
 +<file yaml host/tld/domain/name/service/init.sls> 
 +roles: 
 +  gateway 
 +[...] 
 +</file> 
 +Potentially include service pillar like for example: 
 +<file yaml top.sls> 
 +base: 
 +[...] 
 +  'prometheus1.aixit.off.de.ffffm.net': 
 +    - services.cadvisor 
 +    - services.pretix 
 +</file> 
 + 
 +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 -a '<hostname>' 
 +  salt '<hostname>' test.ping 
 +  salt '<hostname>' state.apply -l quiet --state-verbose=false saltenv=base 
  • infrastruktur/salt/bootstrap.1492370719.txt.gz
  • Zuletzt geändert: 16.04.2017 19:25
  • von skorpy