Projet

Général

Profil

Development #63844

Regrouper les unités supervisord en deux groupes django/uwsgi

Ajouté par Emmanuel Cazenave il y a environ 2 ans. Mis à jour il y a environ 2 ans.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
12 avril 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non

Description

Pour pouvoir démarrer/couper tous les services django/uwsgi en une seule commande.

http://supervisord.org/configuration.html#group-x-section-settings

supervisor> help start
start <name>            Start a process
start <gname>:*         Start all processes in a group
start <name> <name>     Start multiple processes or groups
start all               Start all processes

Fichiers

Révisions associées

Révision 6d621ad5 (diff)
Ajouté par Emmanuel Cazenave il y a environ 2 ans

supervisor: put process in groups (#63844)

Historique

#1

Mis à jour par Emmanuel Cazenave il y a environ 2 ans

Ça donne un truc comme ça :

cazino@cazino-laptop:~$ sudo supervisorctl 
[sudo] password for cazino: 
hobo-agent                                  RUNNING   pid 84438, uptime 2:11:02
publik-django:authentic2-multitenant        RUNNING   pid 84439, uptime 2:11:02
publik-django:bijoe                         RUNNING   pid 84440, uptime 2:11:02
publik-django:chrono                        RUNNING   pid 84441, uptime 2:11:02
publik-django:combo                         RUNNING   pid 84442, uptime 2:11:02
publik-django:fargo                         RUNNING   pid 84444, uptime 2:11:02
publik-django:hobo                          RUNNING   pid 84443, uptime 2:11:02
publik-django:passerelle                    RUNNING   pid 84445, uptime 2:11:02
publik-django:wcs                           RUNNING   pid 84447, uptime 2:11:02
publik-django:welco                         RUNNING   pid 84446, uptime 2:11:02
publik-uwsgi:authentic2-multitenant-uwsgi   STOPPED   Not started
publik-uwsgi:bijoe-uwsgi                    STOPPED   Not started
publik-uwsgi:chrono-uwsgi                   STOPPED   Not started
publik-uwsgi:combo-uwsgi                    STOPPED   Not started
publik-uwsgi:fargo-uwsgi                    STOPPED   Not started
publik-uwsgi:hobo-uwsgi                     STOPPED   Not started
publik-uwsgi:passerelle-uwsgi               STOPPED   Not started
publik-uwsgi:wcs-uwsgi                      STOPPED   Not started
publik-uwsgi:welco-uwsgi                    STOPPED   Not started

Bénéfice des groupes : supervisorctl stop publik-django:*.

Inconvénient pour gérer un processus particulier, il faut maintenant spéficifier aussi le nom de son groupe : supervisorctl stop publik-django:chrono

#2

Mis à jour par Thomas Noël il y a environ 2 ans

C'est de toute beauté.

Je proposerais cependant les noms de groupes "runserver" et "uwsgi", sans le préfixe "publik" parce que ça va quoi non mais hé, faut être green IT et moins consommer d'octet.

#3

Mis à jour par Thomas Noël il y a environ 2 ans

  • Statut changé de Solution proposée à Solution validée

Et je valide quand même, tu fais ce que tu veux chef.

#4

Mis à jour par Emmanuel Cazenave il y a environ 2 ans

  • Statut changé de Solution validée à Solution déployée
  • Assigné à mis à Emmanuel Cazenave

Oui publik-machin trop lourdingue, j'ai opté pour django/uwsgi, j'ai peur que runserver soit trop obscur pour les millions de développeurs utilisateurs de devinst (en dehors de nous).

commit 6d621ad56a3ab2e0ea965aea8d09bbd4567de632
Author: Emmanuel Cazenave <ecazenave@entrouvert.com>
Date:   Tue Apr 12 14:34:55 2022 +0200

    supervisor: put process in groups (#63844)
#5

Mis à jour par Transition automatique il y a presque 2 ans

Automatic expiration

Formats disponibles : Atom PDF