aboutsummaryrefslogtreecommitdiffstats
path: root/fdio.infra.ansible/roles
diff options
context:
space:
mode:
authorpmikus <pmikus@cisco.com>2021-05-12 18:55:13 +0000
committerPeter Mikus <pmikus@cisco.com>2021-05-12 18:57:10 +0000
commit92dacd47b512d8f97c7dfbed7a6043eec11d7e9e (patch)
treed3df9209e603c960482aad3a2eb787239bd59e36 /fdio.infra.ansible/roles
parentbd5eec0c49d4db896eab08ab3feb467f5d14ccc8 (diff)
Infra: Nomad
+ Cleanup vault + Add native GC + add raid to skx Signed-off-by: pmikus <pmikus@cisco.com> Change-Id: I402cb96fb7d1dc0c7d026ae69bf29d84be171269
Diffstat (limited to 'fdio.infra.ansible/roles')
-rw-r--r--fdio.infra.ansible/roles/nomad/defaults/main.yaml15
-rw-r--r--fdio.infra.ansible/roles/nomad/templates/server.hcl.j220
2 files changed, 35 insertions, 0 deletions
diff --git a/fdio.infra.ansible/roles/nomad/defaults/main.yaml b/fdio.infra.ansible/roles/nomad/defaults/main.yaml
index da9a872f83..01f020ad81 100644
--- a/fdio.infra.ansible/roles/nomad/defaults/main.yaml
+++ b/fdio.infra.ansible/roles/nomad/defaults/main.yaml
@@ -85,6 +85,21 @@ nomad_volumes: []
nomad_bootstrap_expect: 2
nomad_encrypt: ""
nomad_retry_join: true
+# Specifies how long a node must be in a terminal state before it is garbage
+# collected and purged from the system.
+nomad_node_gc_threshold: "24h"
+# Specifies the interval between the job garbage collections. Only jobs who have
+# been terminal for at least job_gc_threshold will be collected.
+nomad_job_gc_interval: "1m"
+# Specifies the minimum time a job must be in the terminal state before it is
+# eligible for garbage collection.
+nomad_job_gc_threshold: "1m"
+# Specifies the minimum time an evaluation must be in the terminal state before
+# it is eligible for garbage collection.
+nomad_eval_gc_threshold: "1m"
+# Specifies the minimum time a deployment must be in the terminal state before
+# it is eligible for garbage collection.
+nomad_deployment_gc_threshold: "1m"
# Conf - telemetry.hcl
nomad_disable_hostname: false
diff --git a/fdio.infra.ansible/roles/nomad/templates/server.hcl.j2 b/fdio.infra.ansible/roles/nomad/templates/server.hcl.j2
index b581de9ad0..5ccf45c1ac 100644
--- a/fdio.infra.ansible/roles/nomad/templates/server.hcl.j2
+++ b/fdio.infra.ansible/roles/nomad/templates/server.hcl.j2
@@ -7,6 +7,26 @@ server {
encrypt = "{{ nomad_encrypt }}"
+ {% if nomad_node_gc_threshold -%}
+ node_gc_threshold = "{{ nomad_node_gc_threshold }}"
+ {%- endif %}
+
+ {% if nomad_job_gc_interval -%}
+ job_gc_interval = "{{ nomad_job_gc_interval }}"
+ {%- endif %}
+
+ {% if nomad_job_gc_threshold -%}
+ job_gc_threshold = "{{ nomad_job_gc_threshold }}"
+ {%- endif %}
+
+ {% if nomad_eval_gc_threshold -%}
+ eval_gc_threshold = "{{ nomad_eval_gc_threshold }}"
+ {%- endif %}
+
+ {% if nomad_deployment_gc_threshold -%}
+ deployment_gc_threshold = "{{ nomad_deployment_gc_threshold }}"
+ {%- endif %}
+
{% if nomad_retry_join | bool -%}
server_join {
retry_join = [ {% for ip_port in nomad_retry_servers -%} "{{ ip_port }}" {% if not loop.last %},{% endif %}{%- endfor -%} ]