Projet

Général

Profil

Tâche #23596

Scénario #23526: Epic 6 : Déployer la configuration sur les serveurs

Définir les états salt pour le déploiement des fichiers de configuration

Ajouté par Daniel Dehennin il y a environ 6 ans. Mis à jour il y a environ 6 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Début:
09/04/2018
Echéance:
% réalisé:

100%

Temps estimé:
8.00 h
Temps passé:
Restant à faire (heures):
0.0

Description

  • salt-master a les fichiers dans une arborescence locale
    • /srv/salt/eole/configuration/<MINION ID>/
  • salt-master dispose d’un SLS pour déployer ces deux fichiers
    • /srv/salt/eole/configuration/deploy.sls
    • Contient un état pour chaque fichier

Révisions associées

Révision 1df9e3b4 (diff)
Ajouté par Daniel Dehennin il y a environ 6 ans

Deploy aggregate.xml and config.eol to minions

The aggregate.xml and config.eol files must be present in “saltmaster”
under:

/srv/salt/eole/configuration/files/&lt;MINION ID&gt;/

Ref: #23596

Révision 334ac063 (diff)
Ajouté par Daniel Dehennin il y a environ 6 ans

SaltStack: install “eole.configuration” formula

Waiting for a decision to use gitfs, we install the formula directly
in the container.

The “aggregate.xml” and “config.eol” files need to be created
manually.

  • services/saltmaster/Dockerfile: clone the git repository of the
    formula and install files at the proper place

Ref: #23596

Historique

#1 Mis à jour par Scrum Master il y a environ 6 ans

  • Statut changé de Nouveau à En cours

#2 Mis à jour par Scrum Master il y a environ 6 ans

  • Assigné à mis à Daniel Dehennin

#3 Mis à jour par Daniel Dehennin il y a environ 6 ans

  • % réalisé changé de 0 à 100

#4 Mis à jour par Daniel Dehennin il y a environ 6 ans

  • Statut changé de En cours à Résolu

#5 Mis à jour par Daniel Dehennin il y a environ 6 ans

Pour tester

  1. Démarrer un Zéphir
  2. Démarrer un eolebase 2.6.2 et le raccorder à Zéphir
  3. Vérifier que le minion est bien accessible
    root@ubuntu:/home/zephir# ./bin/zephir-client execution.salt.exec '{"Minion_Pattern": "*base*", "Command": "test.ping"}'
    Username: yo
    Password: 
    {"return": [{"minions": ["eolebase.ac-test.fr"], "jid": "20180418143053514269"}]}
    
  4. Déployer la configuration du minion
    root@ubuntu:/home/zephir# ./bin/zephir-client execution.salt.configuration.deploy '{"Minion_Pattern": "*base*"}' | json_pp -json_opt pretty,canonical
    

    {
       "return" : [
          {
             "jid" : "20180418143217131263",
             "minions" : [
                "eolebase.ac-test.fr" 
             ]
          }
       ]
    }
    
  5. Vérifier l’état de la tâche
    root@ubuntu:/home/zephir# ./bin/zephir-client execution.salt.jobs.describe '{"JId": "20180418143217131263"}' | json_pp -json_opt pretty,canonical
    

    {
       "jobs" : [
          {
             "_stamp" : "2018-04-18T14:32:17.508107",
             "cmd" : "_return",
             "fun" : "state.apply",
             "fun_args" : [
                "eole.configuration.deploy" 
             ],
             "id" : "eolebase.ac-test.fr",
             "jid" : "20180418143217131263",
             "out" : "highstate",
             "retcode" : 2,
             "return" : {
                "file_|-Deploy aggregate.xml_|-/etc/eole/aggregate.xml_|-managed" : {
                   "__id__" : "Deploy aggregate.xml",
                   "__run_num__" : 0,
                   "__sls__" : "eole.configuration.deploy",
                   "changes" : null,
                   "comment" : "Source file salt://eole/configuration/files/eolebase.ac-test.fr/aggregate.xml not found",
                   "duration" : 36.175,
                   "name" : "/etc/eole/aggregate.xml",
                   "pchanges" : null,
                   "result" : false,
                   "start_time" : "16:32:17.457045" 
                },
                "file_|-Deploy config.eol_|-/etc/eole/config.eol_|-managed" : {
                   "__id__" : "Deploy config.eol",
                   "__run_num__" : 1,
                   "__sls__" : "eole.configuration.deploy",
                   "changes" : null,
                   "comment" : "Source file salt://eole/configuration/files/eolebase.ac-test.fr/config.eol not found",
                   "duration" : 9.254,
                   "name" : "/etc/eole/config.eol",
                   "pchanges" : null,
                   "result" : false,
                   "start_time" : "16:32:17.493471" 
                }
             },
             "success" : true
          }
       ]
    }
    

#6 Mis à jour par Daniel Dehennin il y a environ 6 ans

  • Restant à faire (heures) changé de 8.0 à 0.25

#7 Mis à jour par Daniel Dehennin il y a environ 6 ans

  • Statut changé de Résolu à Fermé
  • Restant à faire (heures) changé de 0.25 à 0.0

Formats disponibles : Atom PDF