github.com/hernad/nomad@v1.6.112/command/agent/testdata/basic.hcl (about) 1 # Copyright (c) HashiCorp, Inc. 2 # SPDX-License-Identifier: MPL-2.0 3 4 # This file was used to generate basic.json from https://www.hcl2json.com/ 5 region = "foobar" 6 7 datacenter = "dc2" 8 9 name = "my-web" 10 11 data_dir = "/tmp/nomad" 12 13 plugin_dir = "/tmp/nomad-plugins" 14 15 log_level = "ERR" 16 17 log_json = true 18 19 log_file = "/var/log/nomad.log" 20 21 bind_addr = "192.168.0.1" 22 23 enable_debug = true 24 25 ports { 26 http = 1234 27 rpc = 2345 28 serf = 3456 29 } 30 31 addresses { 32 http = "127.0.0.1" 33 rpc = "127.0.0.2" 34 serf = "127.0.0.3" 35 } 36 37 advertise { 38 rpc = "127.0.0.3" 39 serf = "127.0.0.4" 40 } 41 42 client { 43 enabled = true 44 state_dir = "/tmp/client-state" 45 alloc_dir = "/tmp/alloc" 46 servers = ["a.b.c:80", "127.0.0.1:1234"] 47 node_class = "linux-medium-64bit" 48 49 meta { 50 foo = "bar" 51 baz = "zip" 52 } 53 54 server_join { 55 retry_join = ["1.1.1.1", "2.2.2.2"] 56 retry_max = 3 57 retry_interval = "15s" 58 } 59 60 options { 61 foo = "bar" 62 baz = "zip" 63 } 64 65 chroot_env { 66 "/opt/myapp/etc" = "/etc" 67 "/opt/myapp/bin" = "/bin" 68 } 69 70 network_interface = "eth0" 71 network_speed = 100 72 cpu_total_compute = 4444 73 74 reserved { 75 cpu = 10 76 memory = 10 77 disk = 10 78 reserved_ports = "1,100,10-12" 79 } 80 81 client_min_port = 1000 82 client_max_port = 2000 83 max_kill_timeout = "10s" 84 85 stats { 86 data_points = 35 87 collection_interval = "5s" 88 } 89 90 gc_interval = "6s" 91 gc_parallel_destroys = 6 92 gc_disk_usage_threshold = 82 93 gc_inode_usage_threshold = 91 94 gc_max_allocs = 50 95 no_host_uuid = false 96 disable_remote_exec = true 97 98 host_volume "tmp" { 99 path = "/tmp" 100 } 101 102 cni_path = "/tmp/cni_path" 103 bridge_network_name = "custom_bridge_name" 104 bridge_network_subnet = "custom_bridge_subnet" 105 } 106 107 server { 108 enabled = true 109 authoritative_region = "foobar" 110 bootstrap_expect = 5 111 data_dir = "/tmp/data" 112 raft_protocol = 3 113 num_schedulers = 2 114 enabled_schedulers = ["test"] 115 node_gc_threshold = "12h" 116 job_gc_interval = "3m" 117 job_gc_threshold = "12h" 118 eval_gc_threshold = "12h" 119 deployment_gc_threshold = "12h" 120 csi_volume_claim_gc_interval = "3m" 121 csi_volume_claim_gc_threshold = "12h" 122 csi_plugin_gc_threshold = "12h" 123 acl_token_gc_threshold = "12h" 124 heartbeat_grace = "30s" 125 min_heartbeat_ttl = "33s" 126 max_heartbeats_per_second = 11.0 127 failover_heartbeat_ttl = "330s" 128 retry_join = ["1.1.1.1", "2.2.2.2"] 129 start_join = ["1.1.1.1", "2.2.2.2"] 130 retry_max = 3 131 retry_interval = "15s" 132 rejoin_after_leave = true 133 non_voting_server = true 134 redundancy_zone = "foo" 135 upgrade_version = "0.8.0" 136 encrypt = "abc" 137 raft_multiplier = 4 138 enable_event_broker = false 139 event_buffer_size = 200 140 job_default_priority = 100 141 job_max_priority = 200 142 143 plan_rejection_tracker { 144 enabled = true 145 node_threshold = 100 146 node_window = "41m" 147 } 148 149 server_join { 150 retry_join = ["1.1.1.1", "2.2.2.2"] 151 retry_max = 3 152 retry_interval = "15s" 153 } 154 155 default_scheduler_config { 156 scheduler_algorithm = "spread" 157 158 preemption_config { 159 batch_scheduler_enabled = true 160 system_scheduler_enabled = true 161 service_scheduler_enabled = true 162 } 163 } 164 165 license_path = "/tmp/nomad.hclic" 166 } 167 168 acl { 169 enabled = true 170 token_ttl = "60s" 171 policy_ttl = "60s" 172 role_ttl = "60s" 173 token_min_expiration_ttl = "1h" 174 token_max_expiration_ttl = "100h" 175 replication_token = "foobar" 176 } 177 178 audit { 179 enabled = true 180 181 sink "file" { 182 type = "file" 183 delivery_guarantee = "enforced" 184 format = "json" 185 path = "/opt/nomad/audit.log" 186 rotate_bytes = 100 187 rotate_duration = "24h" 188 rotate_max_files = 10 189 } 190 191 filter "default" { 192 type = "HTTPEvent" 193 endpoints = ["/v1/metrics"] 194 stages = ["*"] 195 operations = ["*"] 196 } 197 } 198 199 telemetry { 200 statsite_address = "127.0.0.1:1234" 201 statsd_address = "127.0.0.1:2345" 202 prometheus_metrics = true 203 disable_hostname = true 204 collection_interval = "3s" 205 publish_allocation_metrics = true 206 publish_node_metrics = true 207 } 208 209 leave_on_interrupt = true 210 211 leave_on_terminate = true 212 213 enable_syslog = true 214 215 syslog_facility = "LOCAL1" 216 217 disable_update_check = true 218 219 disable_anonymous_signature = true 220 221 http_api_response_headers { 222 Access-Control-Allow-Origin = "*" 223 } 224 225 consul { 226 server_service_name = "nomad" 227 server_http_check_name = "nomad-server-http-health-check" 228 server_serf_check_name = "nomad-server-serf-health-check" 229 server_rpc_check_name = "nomad-server-rpc-health-check" 230 client_service_name = "nomad-client" 231 client_http_check_name = "nomad-client-http-health-check" 232 address = "127.0.0.1:9500" 233 allow_unauthenticated = true 234 token = "token1" 235 auth = "username:pass" 236 ssl = true 237 verify_ssl = true 238 ca_file = "/path/to/ca/file" 239 cert_file = "/path/to/cert/file" 240 key_file = "/path/to/key/file" 241 server_auto_join = true 242 client_auto_join = true 243 auto_advertise = true 244 checks_use_advertise = true 245 timeout = "5s" 246 } 247 248 vault { 249 address = "127.0.0.1:9500" 250 allow_unauthenticated = true 251 task_token_ttl = "1s" 252 enabled = false 253 token = "12345" 254 ca_file = "/path/to/ca/file" 255 ca_path = "/path/to/ca" 256 cert_file = "/path/to/cert/file" 257 key_file = "/path/to/key/file" 258 tls_server_name = "foobar" 259 tls_skip_verify = true 260 create_from_role = "test_role" 261 } 262 263 tls { 264 http = true 265 rpc = true 266 verify_server_hostname = true 267 ca_file = "foo" 268 cert_file = "bar" 269 key_file = "pipe" 270 rpc_upgrade_mode = true 271 verify_https_client = true 272 tls_prefer_server_cipher_suites = true 273 tls_cipher_suites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 274 tls_min_version = "tls12" 275 } 276 277 sentinel { 278 import "foo" { 279 path = "foo" 280 args = ["a", "b", "c"] 281 } 282 283 import "bar" { 284 path = "bar" 285 args = ["x", "y", "z"] 286 } 287 } 288 289 autopilot { 290 cleanup_dead_servers = true 291 disable_upgrade_migration = true 292 last_contact_threshold = "12705s" 293 max_trailing_logs = 17849 294 min_quorum = 3 295 enable_redundancy_zones = true 296 server_stabilization_time = "23057s" 297 enable_custom_upgrades = true 298 } 299 300 plugin "docker" { 301 args = ["foo", "bar"] 302 303 config { 304 foo = "bar" 305 306 nested { 307 bam = 2 308 } 309 } 310 } 311 312 plugin "exec" { 313 config { 314 foo = true 315 } 316 }