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