-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.yml
137 lines (116 loc) · 4.01 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
## General
# Version
nomad_version: 1.0.3
nomad_release_system: linux_amd64
# Package URL
nomad_release_name: "nomad_{{ nomad_version }}_{{ nomad_release_system }}"
nomad_package: "{{ nomad_release_name }}.zip"
nomad_url: "https://releases.hashicorp.com/nomad/{{ nomad_version }}/{{ nomad_package }}"
# Required libs
nomad_required_libs:
- unzip
# Package paths
nomad_download_path: /usr/src
nomad_package_path: "{{ nomad_download_path }}/{{ nomad_package }}"
nomad_src_bin: "{{ nomad_download_path }}/{{ nomad_exec_name }}"
# Set true to force the download and installation of the binary
nomad_force_reinstall: False
nomad_exec_name: nomad
## Paths
nomad_root_path: /opt/nomad
nomad_data_path: "{{ nomad_root_path }}/data"
nomad_bin_path: "{{ nomad_root_path }}/bin"
nomad_config_path: "/etc/nomad.d"
nomad_plugin_path: "{{ nomad_data_path }}/plugins"
nomad_skeleton_paths:
- "{{ nomad_data_path }}"
- "{{ nomad_bin_path }}"
- "{{ nomad_config_path }}"
- "{{ nomad_plugin_path }}"
## Templates
nomad_base_config_template_path: "nomad.hcl.j2"
nomad_server_template_path: "server.hcl.j2"
nomad_client_template_path: "client.hcl.j2"
## Service options
# Documentation
nomad_documentation_link: https://learn.hashicorp.com/nomad
# Owner
nomad_user: nomad
nomad_group: nomad
nomad_user_shell: "/usr/sbin/nologin"
# Maximum number of files limit
nomad_max_files: 32768
# Start on boot
nomad_service_enabled: true
# Current state: started, stopped
nomad_service_state: started
# Logs
# If wanted to output the logs to a file define the following variable
# More information at https://www.freedesktop.org/software/systemd/man/systemd.exec.html#StandardOutput=
nomad_log_output: "journal"
nomad_private_tmp: true
## Base config
nomad_log_level: "DEBUG"
nomad_agent_name: server
nomad_region: "global"
nomad_datacenter: "dc1"
nomad_mode: server # Possible options: server, client, both
nomad_http_port: 4646
nomad_rpc_port: 4647
nomad_serf_port: 4648
nomad_bind_address: 0.0.0.0
nomad_advertise_address: ""
# Base config - Consul https://www.nomadproject.io/docs/configuration/consul#consul-parameters
nomad_consul: False
nomad_consul_address: ""
nomad_consul_token: ""
nomad_consul_servers_service_name: "nomad"
nomad_consul_clients_service_name: "nomad-client"
nomad_consul_server_auto_join: True
nomad_consul_client_auto_join: True
nomad_consul_auto_advertise: True
# Base config - Vault https://www.nomadproject.io/docs/configuration/vault#vault-parameters
nomad_vault_enabled: False
nomad_vault_ca_path: ""
nomad_vault_cert_file: ""
nomad_vault_key_file: ""
nomad_vault_address: ""
nomad_vault_create_from_role: ""
nomad_vault_allow_unauthenticated: False
nomad_vault_task_token_ttl: ""
nomad_vault_ca_file: ""
nomad_vault_namespace: ""
nomad_vault_tls_server_name: ""
nomad_vault_tls_skip_verify: False
# Telemetry config
nomad_telemetry_enabled: True
nomad_telemetry_collection_interval: "1s"
nomad_telemetry_disable_hostname: True
nomad_telemetry_prometheus_metrics: True
nomad_telemetry_publish_allocation_metrics: True
nomad_telemetry_publish_node_metrics: True
## Server config
nomad_bootstrap_expect: 3 # Always 3 minimum for production
nomad_retry_max: 10
nomad_retry_interval: "10s"
nomad_rejoin_after_leave: True
nomad_leave_on_interrupt: False
nomad_leave_on_terminate: False
## Nomad DNI Plugins
nomad_cni_install: False
nomad_cni_version: v0.9.0
nomad_cni_package: "cni-plugins-linux-amd64-{{ nomad_cni_version }}.tgz"
nomad_cni_url: "https://github.com/containernetworking/plugins/releases/download/{{ nomad_cni_version }}/{{ nomad_cni_package }}"
nomad_cni_download_path: /usr/src
nomad_cni_package_path: "{{ nomad_cni_download_path }}/{{ nomad_cni_package }}"
nomad_cni_bin_path: "/opt/cni/bin"
# Client config
nomad_servers:
- "{{ nomad_advertise_address }}:{{ nomad_http_port }}"
- "{{ nomad_advertise_address }}:{{ nomad_rpc_port }}"
- "{{ nomad_advertise_address }}:{{ nomad_serf_port }}"
nomad_plugins_enable_docker: True
# Example for host volumes in clients
# nomad_client_host_volume:
# - { name: "test", path: "/mnt", read_only: false }