From 97f3326fb68d48866b5faee2297b242f952829b8 Mon Sep 17 00:00:00 2001 From: Elise Date: Wed, 13 Mar 2024 12:41:04 +0100 Subject: [PATCH] traduction mono + multi + k3S + colmet.nix + opensearch-dashboard.nix --- colmet.nix | 8 ++++---- opensearch-mono/composition.nix | 23 +++++++++++------------ opensearch-multi/composition.nix | 17 ++++++++--------- 3 files changed, 23 insertions(+), 25 deletions(-) diff --git a/colmet.nix b/colmet.nix index c0cb904..a0b420e 100644 --- a/colmet.nix +++ b/colmet.nix @@ -9,17 +9,17 @@ with lib; { config.environment.systemPackages = with pkgs; [ nur.repos.kapack.colmet ]; - #option to enable the colmet collector + # option to enable the colmet collector options.services.colmet-collector = { enable = mkEnableOption (mdDoc "Enable the Colmet collector service"); }; - #option to enable colmet nodes + # option to enable colmet nodes options.services.colmet-node = { enable = mkEnableOption (mdDoc "Enable the Colmet node service"); }; - #if colmet-collector is enable + # if colmet-collector is enable config.systemd.services.colmet-collector = mkIf cfg-collector.enable { description = "Colmet collector"; wantedBy = [ "multi-user.target" ]; @@ -36,7 +36,7 @@ with lib; }; }; - #if colmet-node is enable + # if colmet-node is enable config.systemd.services.colmet-node = mkIf cfg-node.enable { description = "Colmet node"; wantedBy = [ "multi-user.target" ]; diff --git a/opensearch-mono/composition.nix b/opensearch-mono/composition.nix index 02325c0..1bf2d89 100644 --- a/opensearch-mono/composition.nix +++ b/opensearch-mono/composition.nix @@ -95,18 +95,18 @@ in settings."plugins.security.ssl.http.truststore_type" = "PKCS12"; settings."plugins.security.ssl.http.truststore_password" = truststore-password; settings."plugins.security.authcz.admin_dn" = [ "CN=localhost" ]; - # Configuration des options Java supplémentaires (uniquement pour le service "opensearch") - # Les machines virtuelles créées avec `nxc build -f vm` n'ont qu'un Mo de mémoire vive - # Par défaut, la JVM demande plus de mémoire que ça et ne peut pas démarrer - # Avec ces options, on limite son utilisation de la RAM + # Additional Java options configuration (only for the "opensearch" service) + # Virtual machines created with `nxc build -f vm` only have 1MB of RAM + # By default, the JVM asks for more memory than that and cannot start + # With these options, we limit its RAM usage extraJavaOptions = [ - "-Xmx512m" # Limite maximale de la mémoire utilisée par la machine virtuelle Java à 512 Mo - "-Xms512m" # Mémoire initiale allouée par la machine virtuelle Java à 512 Mo + "-Xmx512m" # Limit Java VM memory usage to 512 MB + "-Xms512m" # Java VM initial memory allocation set to 512 MB ]; }; - # Vector est système de gestion de logs + # Vector is a log management system services.vector = { enable = enable-vector; journaldAccess = true; @@ -146,11 +146,10 @@ in services.colmet-node.enable = enable-colmet; environment.variables = lib.mkIf enable-vector { - # La variable "VECTOR_CONFIG" défini le chemin de la configuration à utiliser quand on - # lance la commande `vector`. Le service Systemd génère une config à partir de `services.vector.settings` - # et s'assure que le service utilise bien ce fichier. Mais il faut aussi indiquer où ce trouve - # ce fichier de configuration à l'outil en ligne de commande disponible dans le PATH. - # On parse la configuration systemd pour récupérer le chemin du fichier. + # The variable "VECTOR_CONFIG" defines the path to the configuration to use when running the `vector` command. + # The Systemd service generates a config from `services.vector.settings` and ensures that the service uses this file. + # However, it is also necessary to specify the location of this configuration file to the command line tool available in the PATH. + # We parse the systemd configuration to retrieve the path to the file. VECTOR_CONFIG = lib.lists.last ( builtins.split " " config.systemd.services.vector.serviceConfig.ExecStart ); diff --git a/opensearch-multi/composition.nix b/opensearch-multi/composition.nix index 28fa824..1910468 100644 --- a/opensearch-multi/composition.nix +++ b/opensearch-multi/composition.nix @@ -13,8 +13,8 @@ let package = opensearch-fixed; extraJavaOptions = [ - "-Xmx512m" # Limite maximale de la mémoire utilisée par la machine virtuelle Java à 512 Mo - "-Xms512m" # Mémoire initiale allouée par la machine virtuelle Java à 512 Mo + "-Xmx512m" # Limit Java VM memory usage to 512 MB + "-Xms512m" # Java VM initial memory allocation set to 512 MB ]; settings = { @@ -39,8 +39,8 @@ let settings."node.roles" = [ role ]; }; }; - # On ne connait pas les IP des nœuds à l'avance donc on - # génère ça dynamiquement + # We don't know the node IPs in advance + # so we generate them dynamically. populate-hosts-script = [ "${ pkgs.writeShellScriptBin "configure-opensearch" '' @@ -127,11 +127,10 @@ in { }; environment.variables = { - # La variable "VECTOR_CONFIG" défini le chemin de la configuration à utiliser quand on - # lance la commande `vector`. Le service Systemd génère une config à partir de `services.vector.settings` - # et s'assure que le service utilise bien ce fichier. Mais il faut aussi indiquer où ce trouve - # ce fichier de configuration à l'outil en ligne de commande disponible dans le PATH. - # On parse la configuration systemd pour récupérer le chemin du fichier. + # The variable "VECTOR_CONFIG" defines the path to the configuration to use when running the `vector` command. + # The Systemd service generates a config from `services.vector.settings` and ensures that the service uses this file. + # However, it is also necessary to specify the location of this configuration file to the command line tool available in the PATH. + # We parse the systemd configuration to retrieve the path to the file. VECTOR_CONFIG = lib.lists.last (builtins.split " " config.systemd.services.vector.serviceConfig.ExecStart); };