Project

General

Profile

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

Added by Daniel Dehennin about 3 years ago. Updated almost 3 years ago.

Status:
Fermé
Priority:
Normal
Assigned To:
Start date:
04/09/2018
Due date:
% Done:

100%

Estimated time:
8.00 h
Spent time:
Remaining (hours):
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

Associated revisions

Revision 1df9e3b4 (diff)
Added by Daniel Dehennin almost 3 years ago

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

Revision 334ac063 (diff)
Added by Daniel Dehennin almost 3 years ago

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

History

#1 Updated by Scrum Master about 3 years ago

  • Status changed from Nouveau to En cours

#2 Updated by Scrum Master about 3 years ago

  • Assigned To set to Daniel Dehennin

#3 Updated by Daniel Dehennin almost 3 years ago

  • % Done changed from 0 to 100

#4 Updated by Daniel Dehennin almost 3 years ago

  • Status changed from En cours to Résolu

#5 Updated by Daniel Dehennin almost 3 years ago

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 Updated by Daniel Dehennin almost 3 years ago

  • Remaining (hours) changed from 8.0 to 0.25

#7 Updated by Daniel Dehennin almost 3 years ago

  • Status changed from Résolu to Fermé
  • Remaining (hours) changed from 0.25 to 0.0

Also available in: Atom PDF