infrastruktur:salt:bootstrap

Dies ist eine alte Version des Dokuments!


Run the following commands on a new host:

wget -O - https://repo.saltstack.com/py3/debian/10/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
echo "deb http://repo.saltstack.com/py3/debian/10/amd64/archive/2019.2.5/ buster main\n" > /etc/apt/sources.list.d/saltstack.list
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:

host/tld/domain/name/service/init.sls
roles:
  gateway
[...]

Potentially include service pillar like for example:

top.sls
base:
[...]
  'prometheus1.aixit.off.de.ffffm.net':
    - services.cadvisor
    - services.pretix

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.1592777246.txt.gz
  • Zuletzt geändert: 21.06.2020 22:07
  • von skorpy