github.com/superfly/nomad@v0.10.5-fly/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 100 server { 101 enabled = true 102 authoritative_region = "foobar" 103 bootstrap_expect = 5 104 data_dir = "/tmp/data" 105 protocol_version = 3 106 raft_protocol = 3 107 num_schedulers = 2 108 enabled_schedulers = ["test"] 109 node_gc_threshold = "12h" 110 job_gc_interval = "3m" 111 job_gc_threshold = "12h" 112 eval_gc_threshold = "12h" 113 deployment_gc_threshold = "12h" 114 heartbeat_grace = "30s" 115 min_heartbeat_ttl = "33s" 116 max_heartbeats_per_second = 11.0 117 retry_join = ["1.1.1.1", "2.2.2.2"] 118 start_join = ["1.1.1.1", "2.2.2.2"] 119 retry_max = 3 120 retry_interval = "15s" 121 rejoin_after_leave = true 122 non_voting_server = true 123 redundancy_zone = "foo" 124 upgrade_version = "0.8.0" 125 encrypt = "abc" 126 127 server_join { 128 retry_join = ["1.1.1.1", "2.2.2.2"] 129 retry_max = 3 130 retry_interval = "15s" 131 } 132 } 133 134 acl { 135 enabled = true 136 token_ttl = "60s" 137 policy_ttl = "60s" 138 replication_token = "foobar" 139 } 140 141 telemetry { 142 statsite_address = "127.0.0.1:1234" 143 statsd_address = "127.0.0.1:2345" 144 prometheus_metrics = true 145 disable_hostname = true 146 collection_interval = "3s" 147 publish_allocation_metrics = true 148 publish_node_metrics = true 149 disable_tagged_metrics = true 150 backwards_compatible_metrics = true 151 } 152 153 leave_on_interrupt = true 154 155 leave_on_terminate = true 156 157 enable_syslog = true 158 159 syslog_facility = "LOCAL1" 160 161 disable_update_check = true 162 163 disable_anonymous_signature = true 164 165 http_api_response_headers { 166 Access-Control-Allow-Origin = "*" 167 } 168 169 consul { 170 server_service_name = "nomad" 171 server_http_check_name = "nomad-server-http-health-check" 172 server_serf_check_name = "nomad-server-serf-health-check" 173 server_rpc_check_name = "nomad-server-rpc-health-check" 174 client_service_name = "nomad-client" 175 client_http_check_name = "nomad-client-http-health-check" 176 address = "127.0.0.1:9500" 177 allow_unauthenticated = true 178 token = "token1" 179 auth = "username:pass" 180 ssl = true 181 verify_ssl = true 182 ca_file = "/path/to/ca/file" 183 cert_file = "/path/to/cert/file" 184 key_file = "/path/to/key/file" 185 server_auto_join = true 186 client_auto_join = true 187 auto_advertise = true 188 checks_use_advertise = true 189 } 190 191 vault { 192 address = "127.0.0.1:9500" 193 allow_unauthenticated = true 194 task_token_ttl = "1s" 195 enabled = false 196 token = "12345" 197 ca_file = "/path/to/ca/file" 198 ca_path = "/path/to/ca" 199 cert_file = "/path/to/cert/file" 200 key_file = "/path/to/key/file" 201 tls_server_name = "foobar" 202 tls_skip_verify = true 203 create_from_role = "test_role" 204 } 205 206 tls { 207 http = true 208 rpc = true 209 verify_server_hostname = true 210 ca_file = "foo" 211 cert_file = "bar" 212 key_file = "pipe" 213 rpc_upgrade_mode = true 214 verify_https_client = true 215 tls_prefer_server_cipher_suites = true 216 tls_cipher_suites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 217 tls_min_version = "tls12" 218 } 219 220 sentinel { 221 import "foo" { 222 path = "foo" 223 args = ["a", "b", "c"] 224 } 225 226 import "bar" { 227 path = "bar" 228 args = ["x", "y", "z"] 229 } 230 } 231 232 autopilot { 233 cleanup_dead_servers = true 234 disable_upgrade_migration = true 235 last_contact_threshold = "12705s" 236 max_trailing_logs = 17849 237 enable_redundancy_zones = true 238 server_stabilization_time = "23057s" 239 enable_custom_upgrades = true 240 } 241 242 plugin "docker" { 243 args = ["foo", "bar"] 244 245 config { 246 foo = "bar" 247 248 nested { 249 bam = 2 250 } 251 } 252 } 253 254 plugin "exec" { 255 config { 256 foo = true 257 } 258 }