Outil AdminClient

Le framework propose un outil intitulé AdminClient permettant d’effectuer des tâches d’administration sur les serveurs de développement local ou de production à distance.

Il permet de :

  • se connecter à un serveur SAINet
  • activer/désactiver des logs
  • faire du monitoring
  • modifier des ressources (paramétrage des modules) à partir de ressources locales
  • modifier du code Java à chaud
  • récupérer des fichiers de l’EDMS
  • récupérer les logs
  • effectuer des requêtes SQL

Chemin de l'outil

Lancement

L’outil est un jar exécutable situé dans le dossier tools du projet SAINet. Une aide concernant les paramètres est disponible via l’option --help.

> sainet (master)
$ java -jar tools/AdminClient.jar --help
Usage: java -jar AdminClient.jar [flags]

  FLAGS
  ----------------------------------------------------------------------------------------------------
  --secure or -s        Enforces a trusted certificated recognized by a CA.
  --unsecure or -u      Allow to connect to a server with a self signed certificate.
                        If no set, a self-signred certificate will be allowed to connect to an IP.
  --help or -h          Shows this help.
  --url <urlOrHost>     The URL or host to connect to. This can contain only the host or the whole SAINet URL.
                        If this flag is set, then a user mus also be defined.
  --user <user>         The username. Mandatory if the url is set.
  --password <password> The password. If the password is not set and the user is, it will be asked in the prompt.
  --query <query>       An SQL query which the result will be printed as CSV in the output. The GUI is not displayed.
  --runtime <dir>       A local dir of a running SAINet server. The AdminClient will be directly connected by
                        using either the user/password from command line, or fallback to <dir>/auth.properties to know
                        the credentials to use (properties used are 'admin.user' and 'admin.password').
                        If not defined, then it won't be connected.