github.com/manicqin/nomad@v0.9.5/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 enforce_node = true 137 token = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee" 138 token_ttl = "60s" 139 policy_ttl = "60s" 140 replication_token = "foobar" 141 } 142 143 telemetry { 144 statsite_address = "127.0.0.1:1234" 145 statsd_address = "127.0.0.1:2345" 146 prometheus_metrics = true 147 disable_hostname = true 148 collection_interval = "3s" 149 publish_allocation_metrics = true 150 publish_node_metrics = true 151 disable_tagged_metrics = true 152 backwards_compatible_metrics = true 153 } 154 155 leave_on_interrupt = true 156 157 leave_on_terminate = true 158 159 enable_syslog = true 160 161 syslog_facility = "LOCAL1" 162 163 disable_update_check = true 164 165 disable_anonymous_signature = true 166 167 http_api_response_headers { 168 Access-Control-Allow-Origin = "*" 169 } 170 171 consul { 172 server_service_name = "nomad" 173 server_http_check_name = "nomad-server-http-health-check" 174 server_serf_check_name = "nomad-server-serf-health-check" 175 server_rpc_check_name = "nomad-server-rpc-health-check" 176 client_service_name = "nomad-client" 177 client_http_check_name = "nomad-client-http-health-check" 178 address = "127.0.0.1:9500" 179 token = "token1" 180 auth = "username:pass" 181 ssl = true 182 verify_ssl = true 183 ca_file = "/path/to/ca/file" 184 cert_file = "/path/to/cert/file" 185 key_file = "/path/to/key/file" 186 server_auto_join = true 187 client_auto_join = true 188 auto_advertise = true 189 checks_use_advertise = true 190 } 191 192 vault { 193 address = "127.0.0.1:9500" 194 allow_unauthenticated = true 195 task_token_ttl = "1s" 196 enabled = false 197 token = "12345" 198 ca_file = "/path/to/ca/file" 199 ca_path = "/path/to/ca" 200 cert_file = "/path/to/cert/file" 201 key_file = "/path/to/key/file" 202 tls_server_name = "foobar" 203 tls_skip_verify = true 204 create_from_role = "test_role" 205 } 206 207 tls { 208 http = true 209 rpc = true 210 verify_server_hostname = true 211 ca_file = "foo" 212 cert_file = "bar" 213 key_file = "pipe" 214 rpc_upgrade_mode = true 215 verify_https_client = true 216 tls_prefer_server_cipher_suites = true 217 tls_cipher_suites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256" 218 tls_min_version = "tls12" 219 } 220 221 sentinel { 222 import "foo" { 223 path = "foo" 224 args = ["a", "b", "c"] 225 } 226 227 import "bar" { 228 path = "bar" 229 args = ["x", "y", "z"] 230 } 231 } 232 233 autopilot { 234 cleanup_dead_servers = true 235 disable_upgrade_migration = true 236 last_contact_threshold = "12705s" 237 max_trailing_logs = 17849 238 enable_redundancy_zones = true 239 server_stabilization_time = "23057s" 240 enable_custom_upgrades = true 241 } 242 243 plugin "docker" { 244 args = ["foo", "bar"] 245 246 config { 247 foo = "bar" 248 249 nested { 250 bam = 2 251 } 252 } 253 } 254 255 plugin "exec" { 256 config { 257 foo = true 258 } 259 }