Tâche #26388
Scénario #26382: Modifier la configuration Salt-Master/EAD3 pour créer une instance dédiée
Modifier la configuration de salt-master
Status:
Fermé
Priority:
Normal
Assigned To:
Target version:
Remaining (hours):
0.0
Description
- Utiliser un
root_dir
dans les configurations master et minion :/etc/ead3/
- de ce fait il faudra recréer la structure de répertoires/fichiers nécessaire :
/etc/ead3/etc/salt
/etc/ead3/srv/salt
- de ce fait il faudra recréer la structure de répertoires/fichiers nécessaire :
- Créer un unit systemd spécifique à l'EAD3 :
salt-master-ead3
en spécifiant le chemin de configuration ci-dessus - Choisir des ports différents de ceux par défaut: +100 ?
- Forcer le chemin PKI qui est dans
/var/lib/salt/pki
par défaut à/etc/ead3/etc/salt/pki/
Associated revisions
Configuring SaltStack for EAD3 only
ref #26388
- 20_saltstack.xml renamed as 20_saltstack_ead3.xml
- New Family EAD3
- activer_saltstack variable renamed as activer_saltstack_ead3
- master, minion and api confs send to /etc/ead3/salt directory
- eole-saltstack.mk : create /etc/ead3/salt and /srv/ead3/salt directories
- init directory contains specific salt services for EAD3
- posttemplate/00-saltstack : accept local minion key with the new directory
- tmpl/master
- use root_dir for cache and pki
- customize master port for EAD3
- log to rsyslog
- tmpl/minion
- use root_dir for cache and pki
- set customized master port
- log to rsyslog
Specific salt configuration for EAD3
ref #26388
- dicos/29_ead3.xml
- mofify top.sls path
- move ead3_upload_path variable into the new family EAD3
- activer_saltstack renamed as activer_saltstack_ead3
Change package dependency due to new eole-saltstack package name
ref #26388
Configuring SaltStack for EAD3 only
ref #26388
- 20_saltstack.xml renamed as 20_saltstack_ead3.xml
- New Family EAD3
- activer_saltstack variable renamed as activer_saltstack_ead3
- master, minion and api confs send to /etc/ead3/salt directory
- eole-saltstack.mk : create /etc/ead3/salt and /srv/ead3/salt directories
- init directory contains specific salt services for EAD3
- posttemplate/00-saltstack : accept local minion key with the new directory
- tmpl/master
- use root_dir for cache and pki
- customize master port for EAD3
- log to rsyslog
- tmpl/minion
- use root_dir for cache and pki
- set customized master port
- log to rsyslog
Mask default salt services and install salt services for EAD3
New package name : eole-ead3-saltstack
ref #26388
- debian/rules : install salt services for EAD3
- debian/control : manage new package name
- debian/eole-ead3-saltstack.postinst : mask default salt services
History
#1 Updated by Fabrice Barconnière over 4 years ago
- Description updated (diff)
#2 Updated by Fabrice Barconnière over 4 years ago
- Description updated (diff)
#3 Updated by Fabrice Barconnière over 4 years ago
- Description updated (diff)
#4 Updated by Fabrice Barconnière over 4 years ago
- Status changed from Nouveau to En cours
#5 Updated by Fabrice Barconnière over 4 years ago
Voici ce qui a été décidé (#26397) :
Gestion du projet/paquet existant¶
- Renommer le dépôt redmine (GIT) eole-saltstack si possible en eole-ead3-saltstack
- Renommer le paquet eole-saltstack en eole-ead3-saltstack
- Dépendance dans ewt-portal
- gérer l'upgrade du paquet (provides, conflicts, replaces)
- désactivation des services fournis par les paquets salt
- Fournir les services salt dédiés à l'EAD3
- salt-master-ead3
- salt-minion-ead3
- salt-api-ead3
- Configuration dans /etc/ead3/salt/
- Choix des ports salt pour l'EAD3 : +100 (4605 et 4606)
- Utilisation d'un root_dir : /var/lib/ead3/ (ATTENTION : place utilisée par les différents répertoires log, cache, ...)
- Configurer rsyslog
- modules et states : /srv/ead3/salt/
#6 Updated by Fabrice Barconnière over 4 years ago
- % Done changed from 0 to 100
- Remaining (hours) changed from 6.0 to 0.0
#7 Updated by Fabrice Barconnière over 4 years ago
- Status changed from En cours to Résolu
#8 Updated by Gérald Schwartzmann over 4 years ago
- paquet OK
Maj-Auto -D
Les paquets suivants seront ENLEVÉS : eole-saltstack* Les NOUVEAUX paquets suivants seront installés : eole-ead3-saltstack
- fichiers de conf OK
root@eolebase:~# ll /etc/ead3/ total 12 drwxr-xr-x 3 root root 4096 janv. 11 16:45 ./ drwxr-xr-x 103 root root 4096 janv. 11 16:57 ../ drwxr-xr-x 4 root root 4096 janv. 11 16:45 salt/ root@eolebase:~# ll /etc/ead3/salt/ total 16 drwxr-xr-x 4 root root 4096 janv. 11 16:45 ./ drwxr-xr-x 3 root root 4096 janv. 11 16:45 ../ drwxr-xr-x 2 root root 4096 janv. 11 14:30 master.d/ drwxr-xr-x 2 root root 4096 janv. 11 14:30 minion.d/ root@eolebase:~#
- les services avant activations de l'EAD3
root@eolebase:~# service salt-master-ead3 status ● salt-master-ead3.service Loaded: masked (/dev/null; bad) Active: inactive (dead) root@eolebase:~# service salt-minion-ead3 status ● salt-minion-ead3.service Loaded: masked (/dev/null; bad) Active: inactive (dead) root@eolebase:~# service salt-api-ead3 status ● salt-api-ead3.service Loaded: masked (/dev/null; bad) Active: inactive (dead) root@eolebase:~#
#9 Updated by Gérald Schwartzmann over 4 years ago
root@eolebase:~# CreoleGet --list | grep salt activer_saltstack_ead3="oui" salt_api_port="8880" root@eolebase:~#
#10 Updated by Gérald Schwartzmann over 4 years ago
Ok pour les ports :
tcp 0 0 0.0.0.0:4605 0.0.0.0:* LISTEN 780/python3 tcp 0 0 0.0.0.0:4606 0.0.0.0:* LISTEN 786/python3
#11 Updated by Gérald Schwartzmann over 4 years ago
OK pour les modules et les states
root@eolebase:~# ll /srv/ead3/salt/ total 20 drwxr-xr-x 4 root root 4096 janv. 14 09:21 ./ drwxr-xr-x 3 root root 4096 janv. 11 16:45 ../ drwxr-x--- 7 root root 4096 janv. 14 09:21 ead/ drwxr-xr-x 3 root root 4096 janv. 14 09:21 _modules/ -rw-r--r-- 1 root root 29 janv. 14 09:20 top.sls root@eolebase:~#
#12 Updated by Gérald Schwartzmann over 4 years ago
les journaux :
root@eolebase:~# tail /var/log/rsyslog/local/salt-api-ead3/*.log /var/log/rsyslog/local/salt-master-ead3/*.log /var/log/rsyslog/local/salt-minion-ead3/*.log==> /var/log/rsyslog/local/salt-api-ead3/salt-api-ead3.info.log <== ==> /var/log/rsyslog/local/salt-master-ead3/salt-master-ead3.crit.log <== ==> /var/log/rsyslog/local/salt-master-ead3/salt-master-ead3.err.log <== ==> /var/log/rsyslog/local/salt-master-ead3/salt-master-ead3.info.log <== ==> /var/log/rsyslog/local/salt-master-ead3/salt-master-ead3.warning.log <== ==> /var/log/rsyslog/local/salt-minion-ead3/salt-minion-ead3.err.log <== ==> /var/log/rsyslog/local/salt-minion-ead3/salt-minion-ead3.info.log <== ==> /var/log/rsyslog/local/salt-minion-ead3/salt-minion-ead3.warning.log <==
root@eolebase:~# journalctl -f -u salt-minion -- Logs begin at Thu 2018-12-20 18:28:22 CET. -- déc. 25 19:34:17 eolebase salt-minion[849]: [ERROR ] DNS lookup or connection check of 'salt' failed. déc. 25 19:34:17 eolebase salt-minion[849]: [ERROR ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds déc. 25 19:34:47 eolebase salt-minion[849]: [ERROR ] DNS lookup or connection check of 'salt' failed. déc. 25 19:34:47 eolebase salt-minion[849]: [ERROR ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds déc. 25 19:35:17 eolebase salt-minion[849]: [ERROR ] DNS lookup or connection check of 'salt' failed. déc. 25 19:35:17 eolebase salt-minion[849]: [ERROR ] Master hostname: 'salt' not found or not responsive. Retrying in 30 seconds déc. 25 19:35:23 eolebase systemd[1]: Stopping The Salt Minion... déc. 25 19:35:23 eolebase salt-minion[849]: [WARNING ] Minion received a SIGTERM. Exiting. déc. 25 19:35:23 eolebase salt-minion[849]: The Salt Minion is shutdown. Minion received a SIGTERM. Exited. déc. 25 19:35:24 eolebase systemd[1]: Stopped The Salt Minion. ^C root@eolebase:~#
#13 Updated by Gérald Schwartzmann over 4 years ago
root@eolebase:~# ll /var/lib/ead3/ total 12 drwxr-xr-x 3 root root 4096 janv. 11 17:25 ./ drwxr-xr-x 43 root root 4096 janv. 11 17:25 ../ drwxr-xr-x 6 root root 4096 janv. 11 17:25 var/ root@eolebase:~# ll /var/lib/ead3/var/ total 24 drwxr-xr-x 6 root root 4096 janv. 11 17:25 ./ drwxr-xr-x 3 root root 4096 janv. 11 17:25 ../ drwxr-xr-x 3 root root 4096 janv. 11 17:25 cache/ drwxr-xr-x 3 root root 4096 janv. 11 17:25 lib/ drwxr-x--- 3 root root 4096 janv. 11 17:25 log/ drwxr-xr-x 3 root root 4096 janv. 14 10:18 run/ root@eolebase:~#
#14 Updated by Gérald Schwartzmann over 4 years ago
- Status changed from Résolu to Fermé