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