Revert "fix(IPsecUtil): Delete keywords no longer used"
[csit.git] / fdio.infra.ansible / roles / nomad / defaults / main.yaml
1 ---
2 # file: roles/nomad/defaults/main.yaml
3
4 # Prerequisites
5 packages: "{{ packages_base + packages_by_distro[ansible_distribution | lower] + packages_by_arch[ansible_machine] }}"
6 packages_base:
7   - "curl"
8   - "unzip"
9 packages_by_distro:
10   ubuntu:
11     - []
12 packages_by_arch:
13   aarch64:
14     - []
15   x86_64:
16     - []
17
18 # Package
19 nomad_version: "1.4.3"
20 nomad_architecture_map:
21   amd64: "amd64"
22   x86_64: "amd64"
23   armv7l: "arm"
24   aarch64: "arm64"
25   32-bit: "386"
26   64-bit: "amd64"
27 nomad_architecture: "{{ nomad_architecture_map[ansible_architecture] }}"
28 nomad_pkg: "nomad_{{ nomad_version }}_linux_{{nomad_architecture}}.zip"
29 nomad_zip_url: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version }}_linux_{{nomad_architecture}}.zip"
30 nomad_checksum_file_url: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/nomad_{{ nomad_version}}_SHA256SUMS"
31 nomad_force_update: false
32
33 # Paths
34 nomad_inst_dir: "/opt"
35 nomad_bin_dir: "/usr/local/bin"
36 nomad_config_dir: "/etc/nomad.d"
37 nomad_data_dir: "/var/nomad"
38 nomad_plugin_dir: "{{ nomad_data_dir }}/plugins"
39 nomad_lockfile: "/var/lock/subsys/nomad"
40 nomad_run_dir: "/var/run/nomad"
41 nomad_ssl_dir: "/etc/nomad.d/ssl"
42
43 # Initialization and startup script templates
44 nomad_service_mgr: ""
45
46 # System user and group
47 nomad_group: "nomad"
48 nomad_user: "nomad"
49
50 # Nomad settings
51 nomad_datacenter: "dc1"
52 nomad_region: "global"
53 nomad_log_level: "INFO"
54 nomad_syslog_enable: true
55 nomad_iface: "{{ ansible_default_ipv4.interface }}"
56 nomad_node_name: "{{ inventory_hostname }}"
57 nomad_node_role: "server"
58 nomad_leave_on_terminate: true
59 nomad_leave_on_interrupt: false
60 nomad_disable_update_check: true
61 nomad_enable_debug: false
62
63 # Server settings
64 nomad_bootstrap_expect: 2
65 nomad_encrypt: ""
66 nomad_retry_join: true
67 # Specifies how long a node must be in a terminal state before it is garbage
68 # collected and purged from the system.
69 nomad_node_gc_threshold: "24h"
70 # Specifies the interval between the job garbage collections. Only jobs who have
71 # been terminal for at least job_gc_threshold will be collected.
72 nomad_job_gc_interval: "10m"
73 # Specifies the minimum time a job must be in the terminal state before it is
74 # eligible for garbage collection.
75 nomad_job_gc_threshold: "4h"
76 # Specifies the minimum time an evaluation must be in the terminal state before
77 # it is eligible for garbage collection.
78 nomad_eval_gc_threshold: "1h"
79 # Specifies the minimum time a deployment must be in the terminal state before
80 # it is eligible for garbage collection.
81 nomad_deployment_gc_threshold: "1h"
82 nomad_encrypt_enable: false
83 nomad_raft_protocol: 2
84
85 # Client settings
86 nomad_node_class: "compute"
87 nomad_no_host_uuid: true
88 nomad_max_kill_timeout: "30s"
89 nomad_gc_interval: "1m"
90 nomad_gc_disk_usage_threshold: 80
91 nomad_gc_inode_usage_threshold: 70
92 nomad_gc_parallel_destroys: 2
93 nomad_reserved:
94   cpu: "{{ nomad_reserved_cpu | default('0', true) }}"
95   memory: "{{ nomad_reserved_memory | default('0', true) }}"
96   disk: "{{ nomad_reserved_disk | default('0', true) }}"
97   ports: "{{ nomad_reserved_ports | default('22', true) }}"
98 nomad_volumes: []
99 nomad_options: {}
100 nomad_meta: {}
101 nomad_chroot_env: false
102 nomad_plugins: {}
103
104 # Addresses
105 nomad_bind_address: "{{ hostvars[inventory_hostname]['ansible_'+ nomad_iface ]['ipv4']['address'] }}"
106 nomad_advertise_address: "{{ hostvars[inventory_hostname]['ansible_' + nomad_iface]['ipv4']['address'] }}"
107
108 # Ports
109 nomad_ports:
110   http: "{{ nomad_ports_http | default('4646', true) }}"
111   rpc: "{{ nomad_ports_rpc | default('4647', true) }}"
112   serf: "{{ nomad_ports_serf | default('4648', true) }}"
113
114 # Servers
115 nomad_group_name: "nomad"
116 nomad_servers: "\
117   {% if nomad_use_consul==false %}\
118     {% set _nomad_servers = [] %}\
119     {% for host in groups[nomad_group_name] %}\
120       {% set _nomad_node_role = hostvars[host]['nomad_node_role'] | default('client', true) %}\
121       {% if (_nomad_node_role == 'server' or _nomad_node_role == 'both') %}\
122         {% if _nomad_servers.append(host) %}{% endif %}\
123       {% endif %}\
124     {% endfor %}\
125     {{ _nomad_servers }}\
126     {% else %}\
127     []\
128   {% endif %}"
129 nomad_gather_server_facts: false
130
131 # Consul
132 nomad_use_consul: true
133 nomad_consul_address: "localhost:8500"
134 nomad_consul_token: ""
135 nomad_consul_servers_service_name: "nomad"
136 nomad_consul_clients_service_name: "nomad-client"
137 nomad_consul_tags: {}
138 nomad_consul_use_ssl: false
139
140 # ACLs
141 nomad_acl_enabled: false
142 nomad_acl_token_ttl: "30s"
143 nomad_acl_policy_ttl: "30s"
144 nomad_acl_replication_token: ""
145
146 # Docker
147 nomad_docker_enable: false
148 nomad_docker_dmsetup: true
149
150 # Autopilot
151 nomad_autopilot_cleanup_dead_servers: true
152 nomad_autopilot_last_contact_threshold: "200ms"
153 nomad_autopilot_max_trailing_logs: 250
154 nomad_autopilot_server_stabilization_time: "10s"
155
156 # Telemetry.
157 nomad_use_telemetry: true
158 nomad_telemetry_disable_hostname: false
159 nomad_telemetry_collection_interval: "1s"
160 nomad_telemetry_use_node_name: false
161 nomad_telemetry_publish_allocation_metrics: true
162 nomad_telemetry_publish_node_metrics: true
163 nomad_telemetry_prometheus_metrics: true
164
165 # TLS.
166 nomad_use_tls: true
167 nomad_tls_ca_file: "{{ nomad_ssl_dir }}/nomad-ca.pem"
168 nomad_tls_cert_file: "{{ nomad_ssl_dir }}/nomad.pem"
169 nomad_tls_key_file: "{{ nomad_ssl_dir }}/nomad-key.pem"
170 nomad_tls_cli_cert_file: "{{ nomad_ssl_dir }}/nomad-cli.pem"
171 nomad_tls_cli_key_file: "{{ nomad_ssl_dir }}/nomad-cli-key.pem"
172 nomad_tls_http: false
173 nomad_tls_rpc: false
174 nomad_tls_rpc_upgrade_mode: false
175 nomad_tls_verify_https_client: false
176 nomad_tls_verify_server_hostname: false
177
178 # Vault
179 nomad_use_vault: false
180 nomad_vault_address: "http://vault.service.consul:8200"
181 nomad_vault_allow_unauthenticated: true
182 nomad_vault_enabled: false
183 nomad_vault_create_from_role: ""
184 nomad_vault_task_token_ttl: "72h"
185 nomad_vault_use_ssl: false
186 nomad_vault_ca_file: ""
187 nomad_vault_ca_path: ""
188 nomad_vault_cert_file: ""
189 nomad_vault_key_file: ""
190 nomad_vault_namespace: ""
191 nomad_vault_tls_server_name: ""
192 nomad_vault_tls_skip_verify: false
193 nomad_vault_token: ""