From 49d3af1cd6d0bc7555e06d59454661b81930b234 Mon Sep 17 00:00:00 2001 From: Yann Etrillard Date: Sat, 3 Feb 2024 15:27:06 +0100 Subject: [PATCH 1/3] Mise en place d'un stockage CSI --- pscload-v2.nomad.tpl | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/pscload-v2.nomad.tpl b/pscload-v2.nomad.tpl index eac3c6af..ac04bca4 100644 --- a/pscload-v2.nomad.tpl +++ b/pscload-v2.nomad.tpl @@ -10,6 +10,16 @@ job "pscload" { group "pscload-services" { count = "1" + + // Volume portworx CSI + volume "pscload" { + attachment_mode = "file-system" + access_mode = "single-node-writer" + type = "csi" + read_only = false + source = "vs-${nomad_namespace}-pscload-data" + } + restart { attempts = 3 delay = "60s" @@ -32,13 +42,17 @@ job "pscload" { kill_timeout = "90s" kill_signal = "SIGTERM" driver = "docker" + + // Monter le volume portworx CSI + volume_mount { + volume = "pscload" + destination = "/app/files-repo" + read_only = false + } + config { extra_hosts = [ "psc-api-maj.internal:$\u007BNOMAD_IP_http\u007D" ] image = "${artifact.image}:${artifact.tag}" - volumes = [ - "name=${nomad_namespace}-pscload-data,io_priority=high,size=10,repl=2:/app/files-repo" - ] - volume_driver = "pxd" ports = ["http"] } template { From 738812d3cd0e3c981ce420a4a7a4ae359d843c2b Mon Sep 17 00:00:00 2001 From: Yann Etrillard Date: Sat, 3 Feb 2024 17:57:28 +0100 Subject: [PATCH 2/3] =?UTF-8?q?Remplacement=20du=20bloc=20contrainte=20par?= =?UTF-8?q?=20un=20affinit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pscload-v2.nomad.tpl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pscload-v2.nomad.tpl b/pscload-v2.nomad.tpl index ac04bca4..2a4a1d1a 100644 --- a/pscload-v2.nomad.tpl +++ b/pscload-v2.nomad.tpl @@ -27,9 +27,9 @@ job "pscload" { mode = "fail" } - constraint { + affinity { attribute = "$\u007Bnode.class\u007D" - value = "data" + value = "compute" } network { From 2f753bfb31b9d7298ec3847c59af8177abcc754e Mon Sep 17 00:00:00 2001 From: Yann Etrillard Date: Thu, 8 Feb 2024 17:33:07 +0100 Subject: [PATCH 3/3] Modification de l'url du repository --- waypoint.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/waypoint.hcl b/waypoint.hcl index 1f78e247..0d939adb 100644 --- a/waypoint.hcl +++ b/waypoint.hcl @@ -9,7 +9,7 @@ runner { enabled = true profile = "secpsc-${workspace.name}" data_source "git" { - url = "https://github.com/prosanteconnect/pscload-v2.git" + url = "https://github.com/ansforge/psc-rass-loader.git" ref = "${workspace.name}" } poll {