open-nomad/command/agent/testdata/basic.hcl

251 lines
5.5 KiB
HCL
Raw Normal View History

2019-03-29 13:56:25 +00:00
# This file was used to generate basic.json from https://www.hcl2json.com/
region = "foobar"
2019-07-20 14:55:07 +00:00
datacenter = "dc2"
2019-07-20 14:55:07 +00:00
name = "my-web"
2019-07-20 14:55:07 +00:00
data_dir = "/tmp/nomad"
2019-07-20 14:55:07 +00:00
2018-08-30 20:43:09 +00:00
plugin_dir = "/tmp/nomad-plugins"
2019-07-20 14:55:07 +00:00
log_level = "ERR"
2019-07-20 14:55:07 +00:00
2019-01-11 19:36:26 +00:00
log_json = true
2019-07-20 14:55:07 +00:00
bind_addr = "192.168.0.1"
2019-07-20 14:55:07 +00:00
enable_debug = true
2019-07-20 14:55:07 +00:00
ports {
2019-07-20 14:55:07 +00:00
http = 1234
rpc = 2345
serf = 3456
}
2019-07-20 14:55:07 +00:00
addresses {
2019-07-20 14:55:07 +00:00
http = "127.0.0.1"
rpc = "127.0.0.2"
serf = "127.0.0.3"
}
2019-07-20 14:55:07 +00:00
advertise {
2019-07-20 14:55:07 +00:00
rpc = "127.0.0.3"
serf = "127.0.0.4"
}
client {
2019-07-20 14:55:07 +00:00
enabled = true
state_dir = "/tmp/client-state"
alloc_dir = "/tmp/alloc"
servers = ["a.b.c:80", "127.0.0.1:1234"]
node_class = "linux-medium-64bit"
meta {
foo = "bar"
baz = "zip"
}
server_join {
retry_join = ["1.1.1.1", "2.2.2.2"]
retry_max = 3
retry_interval = "15s"
}
options {
foo = "bar"
baz = "zip"
}
chroot_env {
"/opt/myapp/etc" = "/etc"
"/opt/myapp/bin" = "/bin"
}
network_interface = "eth0"
network_speed = 100
cpu_total_compute = 4444
reserved {
cpu = 10
memory = 10
disk = 10
reserved_ports = "1,100,10-12"
}
client_min_port = 1000
client_max_port = 2000
max_kill_timeout = "10s"
stats {
data_points = 35
collection_interval = "5s"
}
gc_interval = "6s"
gc_parallel_destroys = 6
gc_disk_usage_threshold = 82
gc_inode_usage_threshold = 91
gc_max_allocs = 50
no_host_uuid = false
disable_remote_exec = true
}
2019-07-20 14:55:07 +00:00
server {
2019-07-20 14:55:07 +00:00
enabled = true
authoritative_region = "foobar"
bootstrap_expect = 5
data_dir = "/tmp/data"
protocol_version = 3
raft_protocol = 3
num_schedulers = 2
enabled_schedulers = ["test"]
node_gc_threshold = "12h"
job_gc_threshold = "12h"
eval_gc_threshold = "12h"
deployment_gc_threshold = "12h"
heartbeat_grace = "30s"
min_heartbeat_ttl = "33s"
max_heartbeats_per_second = 11.0
retry_join = ["1.1.1.1", "2.2.2.2"]
start_join = ["1.1.1.1", "2.2.2.2"]
retry_max = 3
retry_interval = "15s"
rejoin_after_leave = true
non_voting_server = true
redundancy_zone = "foo"
upgrade_version = "0.8.0"
encrypt = "abc"
server_join {
retry_join = ["1.1.1.1", "2.2.2.2"]
retry_max = 3
retry_interval = "15s"
}
}
2019-07-20 14:55:07 +00:00
2017-08-13 20:46:47 +00:00
acl {
2019-07-20 14:55:07 +00:00
enabled = true
token_ttl = "60s"
policy_ttl = "60s"
replication_token = "foobar"
2017-08-13 20:46:47 +00:00
}
2019-07-20 14:55:07 +00:00
telemetry {
2019-07-20 14:55:07 +00:00
statsite_address = "127.0.0.1:1234"
statsd_address = "127.0.0.1:2345"
prometheus_metrics = true
disable_hostname = true
collection_interval = "3s"
publish_allocation_metrics = true
publish_node_metrics = true
disable_tagged_metrics = true
backwards_compatible_metrics = true
}
2019-07-20 14:55:07 +00:00
leave_on_interrupt = true
2019-07-20 14:55:07 +00:00
leave_on_terminate = true
2019-07-20 14:55:07 +00:00
enable_syslog = true
2019-07-20 14:55:07 +00:00
syslog_facility = "LOCAL1"
2019-07-20 14:55:07 +00:00
disable_update_check = true
2019-07-20 14:55:07 +00:00
disable_anonymous_signature = true
2019-07-20 14:55:07 +00:00
http_api_response_headers {
2019-07-20 14:55:07 +00:00
Access-Control-Allow-Origin = "*"
}
2019-07-20 14:55:07 +00:00
consul {
2019-07-20 14:55:07 +00:00
server_service_name = "nomad"
server_http_check_name = "nomad-server-http-health-check"
server_serf_check_name = "nomad-server-serf-health-check"
server_rpc_check_name = "nomad-server-rpc-health-check"
client_service_name = "nomad-client"
client_http_check_name = "nomad-client-http-health-check"
address = "127.0.0.1:9500"
token = "token1"
auth = "username:pass"
ssl = true
verify_ssl = true
ca_file = "/path/to/ca/file"
cert_file = "/path/to/cert/file"
key_file = "/path/to/key/file"
server_auto_join = true
client_auto_join = true
auto_advertise = true
checks_use_advertise = true
}
2019-07-20 14:55:07 +00:00
2016-08-06 01:13:06 +00:00
vault {
2019-07-20 14:55:07 +00:00
address = "127.0.0.1:9500"
allow_unauthenticated = true
task_token_ttl = "1s"
enabled = false
token = "12345"
ca_file = "/path/to/ca/file"
ca_path = "/path/to/ca"
cert_file = "/path/to/cert/file"
key_file = "/path/to/key/file"
tls_server_name = "foobar"
tls_skip_verify = true
create_from_role = "test_role"
2016-08-06 01:13:06 +00:00
}
2019-07-20 14:55:07 +00:00
2016-10-24 20:46:22 +00:00
tls {
2019-07-20 14:55:07 +00:00
http = true
rpc = true
verify_server_hostname = true
ca_file = "foo"
cert_file = "bar"
key_file = "pipe"
rpc_upgrade_mode = true
verify_https_client = true
tls_prefer_server_cipher_suites = true
tls_cipher_suites = "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256"
tls_min_version = "tls12"
2016-10-24 20:46:22 +00:00
}
2019-07-20 14:55:07 +00:00
2017-09-19 14:47:10 +00:00
sentinel {
2019-07-20 14:55:07 +00:00
import "foo" {
path = "foo"
args = ["a", "b", "c"]
}
import "bar" {
path = "bar"
args = ["x", "y", "z"]
}
2017-09-19 14:47:10 +00:00
}
2019-07-20 14:55:07 +00:00
autopilot {
2019-07-20 14:55:07 +00:00
cleanup_dead_servers = true
disable_upgrade_migration = true
last_contact_threshold = "12705s"
max_trailing_logs = 17849
enable_redundancy_zones = true
server_stabilization_time = "23057s"
enable_custom_upgrades = true
}
2019-07-20 14:55:07 +00:00
2018-08-29 23:26:44 +00:00
plugin "docker" {
args = ["foo", "bar"]
2019-07-20 14:55:07 +00:00
2018-08-29 23:26:44 +00:00
config {
foo = "bar"
2019-07-20 14:55:07 +00:00
2018-08-29 23:26:44 +00:00
nested {
bam = 2
}
}
}
2019-07-20 14:55:07 +00:00
2018-08-29 23:26:44 +00:00
plugin "exec" {
config {
foo = true
}
}