Merge pull request #5987 from hashicorp/dani/format-samples

chore: Format hcl configurations
This commit is contained in:
Danielle 2019-07-20 18:21:43 +02:00 committed by GitHub
commit 4a09bc237a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
52 changed files with 572 additions and 470 deletions

View file

@ -1 +1 @@
bind_addr = "0.0.0.0"
bind_addr = "0.0.0.0"

View file

@ -1,207 +1,248 @@
# This file was used to generate basic.json from https://www.hcl2json.com/
region = "foobar"
datacenter = "dc2"
name = "my-web"
data_dir = "/tmp/nomad"
plugin_dir = "/tmp/nomad-plugins"
log_level = "ERR"
log_json = true
bind_addr = "192.168.0.1"
enable_debug = true
ports {
http = 1234
rpc = 2345
serf = 3456
http = 1234
rpc = 2345
serf = 3456
}
addresses {
http = "127.0.0.1"
rpc = "127.0.0.2"
serf = "127.0.0.3"
http = "127.0.0.1"
rpc = "127.0.0.2"
serf = "127.0.0.3"
}
advertise {
rpc = "127.0.0.3"
serf = "127.0.0.4"
rpc = "127.0.0.3"
serf = "127.0.0.4"
}
client {
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
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
}
server {
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"
}
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"
}
}
acl {
enabled = true
token_ttl = "60s"
policy_ttl = "60s"
replication_token = "foobar"
enabled = true
token_ttl = "60s"
policy_ttl = "60s"
replication_token = "foobar"
}
telemetry {
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
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
}
leave_on_interrupt = true
leave_on_terminate = true
enable_syslog = true
syslog_facility = "LOCAL1"
disable_update_check = true
disable_anonymous_signature = true
http_api_response_headers {
Access-Control-Allow-Origin = "*"
Access-Control-Allow-Origin = "*"
}
consul {
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
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
}
vault {
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"
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"
}
tls {
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"
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"
}
sentinel {
import "foo" {
path = "foo"
args = ["a", "b", "c"]
}
import "bar" {
path = "bar"
args = ["x", "y", "z"]
}
import "foo" {
path = "foo"
args = ["a", "b", "c"]
}
import "bar" {
path = "bar"
args = ["x", "y", "z"]
}
}
autopilot {
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
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
}
plugin "docker" {
args = ["foo", "bar"]
config {
foo = "bar"
nested {
bam = 2
}
}
}
plugin "exec" {
config {
foo = true

View file

@ -1,3 +1,3 @@
client {
memory_total_mb = 5555
memory_total_mb = 5555
}

View file

@ -1,5 +1,5 @@
client {
options {
driver.whitelist = "docker"
}
options {
driver.whitelist = "docker"
}
}

View file

@ -1,11 +1,13 @@
client {
memory_total_mb = 5555
}
plugin "docker" {
plugin "docker" {
config {
allow_privileged = true
}
}
plugin "raw_exec" {
config {
enabled = true

View file

@ -1,6 +1,6 @@
"advertise" = {
"http" = "host.example.com"
"rpc" = "host.example.com"
"rpc" = "host.example.com"
"serf" = "host.example.com"
}
@ -11,7 +11,7 @@
"consul" = {
"client_auto_join" = false
"server_auto_join" = false
"token" = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
"token" = "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee"
}
vault = {

View file

@ -1,5 +1,9 @@
data_dir = "/opt/nomad"
log_level = "DEBUG"
enable_debug = true
bind_addr = "0.0.0.0"
disable_update_check = true

View file

@ -1,3 +1,3 @@
namespace "default" {
policy = "write"
policy = "write"
}

View file

@ -1,3 +1,3 @@
node {
policy = "read"
policy = "read"
}

View file

@ -13,9 +13,11 @@ enable_debug = true
# Enable the client
client {
enabled = true
server_join {
retry_join = ["127.0.0.1:4647", "127.0.0.1:5647", "127.0.0.1:6647"]
}
meta {
tag = "foo"
}

View file

@ -13,9 +13,11 @@ enable_debug = true
# Enable the client
client {
enabled = true
server_join {
retry_join = ["127.0.0.1:4647", "127.0.0.1:5647", "127.0.0.1:6647"]
}
meta {
tag = "foo"
}

View file

@ -13,9 +13,11 @@ enable_debug = true
# Enable the client
client {
enabled = true
server_join {
retry_join = ["127.0.0.1:4647", "127.0.0.1:5647", "127.0.0.1:6647"]
}
meta {
tag = "bar"
}

View file

@ -21,6 +21,6 @@ server {
ports {
http = 5646
rpc = 5647
rpc = 5647
serf = 5648
}

View file

@ -3,6 +3,7 @@ log_level = "DEBUG"
# Setup data dir
data_dir = "/tmp/server3"
# Give the agent a unique name. Defaults to hostname
name = "server3"
@ -20,6 +21,6 @@ server {
ports {
http = 6646
rpc = 6647
rpc = 6647
serf = 6648
}

View file

@ -1,5 +1,5 @@
client {
options {
"docker.privileged.enabled" = "true"
}
options {
"docker.privileged.enabled" = "true"
}
}

View file

@ -1,4 +1,5 @@
log_level = "DEBUG"
data_dir = "/tmp/nomad-server"
server {
@ -10,6 +11,7 @@ server {
client {
enabled = true
options {
"docker.privileged.enabled" = "true"
}

1
dist/client.hcl vendored
View file

@ -1,4 +1,5 @@
bind_addr = "127.0.0.1"
data_dir = "/var/lib/nomad/"
client {

3
dist/server.hcl vendored
View file

@ -1,4 +1,5 @@
bind_addr = "0.0.0.0"
data_dir = "/var/lib/nomad"
advertise {
@ -8,6 +9,6 @@ advertise {
}
server {
enabled = true
enabled = true
bootstrap_expect = 3
}

View file

@ -7,6 +7,7 @@ datacenter = "dc1"
client {
enabled = true
servers = ["127.0.0.1:4647"]
meta {
secondary = 1
}
@ -15,4 +16,3 @@ client {
ports {
http = 5656
}

View file

@ -7,6 +7,7 @@ datacenter = "dc1"
client {
enabled = true
servers = ["127.0.0.1:4647"]
meta {
secondary = 0
}
@ -15,4 +16,3 @@ client {
ports {
http = 5657
}

View file

@ -7,4 +7,3 @@ server {
bootstrap_expect = 1
}

View file

@ -3,11 +3,10 @@ log_level = "DEBUG"
data_dir = "/tmp/server1_acl"
server {
enabled = true
enabled = true
bootstrap_expect = 1
}
acl {
enabled = true
}

View file

@ -15,11 +15,11 @@ job "test" {
}
update {
canary = 3
max_parallel = 1
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
canary = 3
max_parallel = 1
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
progress_deadline = "3s"
}

View file

@ -15,10 +15,10 @@ job "demo2" {
}
update {
max_parallel = 1
min_healthy_time = "1s"
auto_revert = false
healthy_deadline = "2s"
max_parallel = 1
min_healthy_time = "1s"
auto_revert = false
healthy_deadline = "2s"
progress_deadline = "10s"
}
@ -29,7 +29,7 @@ job "demo2" {
reschedule {
unlimited = "true"
delay = "5s"
delay = "5s"
}
}
}

View file

@ -15,10 +15,10 @@ job "demo3" {
}
update {
max_parallel = 1
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
max_parallel = 1
min_healthy_time = "1s"
auto_revert = true
healthy_deadline = "2s"
progress_deadline = "3s"
}

View file

@ -15,10 +15,10 @@ job "demo2" {
}
update {
max_parallel = 1
min_healthy_time = "1s"
auto_revert = false
healthy_deadline = "2s"
max_parallel = 1
min_healthy_time = "1s"
auto_revert = false
healthy_deadline = "2s"
progress_deadline = "30s"
}
@ -28,9 +28,9 @@ job "demo2" {
}
reschedule {
unlimited = "true"
unlimited = "true"
delay_function = "constant"
delay = "5s"
delay = "5s"
}
}
}

View file

@ -15,10 +15,10 @@ job "test4" {
}
update {
max_parallel = 1
min_healthy_time = "3s"
auto_revert = false
healthy_deadline = "5s"
max_parallel = 1
min_healthy_time = "3s"
auto_revert = false
healthy_deadline = "5s"
progress_deadline = "10s"
}

View file

@ -1,11 +1,15 @@
enable_debug = true
log_level = "DEBUG"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "DEBUG"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the client
client {
enabled = true
options {
# Allow jobs to run as root
"user.blacklist" = ""
@ -28,9 +32,9 @@ vault {
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,15 +1,20 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the client
client {
enabled = true
options {
"driver.raw_exec.enable" = "1"
"driver.raw_exec.enable" = "1"
"docker.privileged.enabled" = "true"
}
meta {
"rack" = "r1"
}
@ -25,9 +30,9 @@ vault {
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,15 +1,20 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the client
client {
enabled = true
options {
"driver.raw_exec.enable" = "1"
"driver.raw_exec.enable" = "1"
"docker.privileged.enabled" = "true"
}
meta {
"rack" = "r2"
}
@ -25,9 +30,9 @@ vault {
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,17 +1,22 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
datacenter = "dc2"
# Enable the client
client {
enabled = true
options {
"driver.raw_exec.enable" = "1"
"driver.raw_exec.enable" = "1"
"docker.privileged.enabled" = "true"
}
meta {
"rack" = "r1"
}
@ -27,9 +32,9 @@ vault {
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,16 +1,22 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
datacenter = "dc2"
# Enable the client
client {
enabled = true
options {
"driver.raw_exec.enable" = "1"
"driver.raw_exec.enable" = "1"
"docker.privileged.enabled" = "true"
}
meta {
"rack" = "r2"
}
@ -26,9 +32,9 @@ vault {
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,11 +1,14 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the server
server {
enabled = true
enabled = true
bootstrap_expect = 3
}
@ -14,17 +17,17 @@ consul {
}
vault {
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
create_from_role = "nomad-cluster"
token = ""
token = ""
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,11 +1,14 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the server
server {
enabled = true
enabled = true
bootstrap_expect = 3
}
@ -14,17 +17,17 @@ consul {
}
vault {
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
create_from_role = "nomad-cluster"
token = ""
token = ""
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,11 +1,14 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the server
server {
enabled = true
enabled = true
bootstrap_expect = 3
}
@ -14,17 +17,17 @@ consul {
}
vault {
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
create_from_role = "nomad-cluster"
token = ""
token = ""
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,11 +1,14 @@
enable_debug = true
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
log_level = "debug"
data_dir = "/opt/nomad/data"
bind_addr = "0.0.0.0"
# Enable the server
server {
enabled = true
enabled = true
bootstrap_expect = 3
}
@ -14,18 +17,17 @@ consul {
}
vault {
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
enabled = false
address = "http://active.vault.service.consul:8200"
task_token_ttl = "1h"
create_from_role = "nomad-cluster"
token = ""
token = ""
}
telemetry {
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
collection_interval = "1s"
disable_hostname = true
prometheus_metrics = true
publish_allocation_metrics = true
publish_node_metrics = true
publish_node_metrics = true
}

View file

@ -1,12 +1,12 @@
backend "consul" {
path = "vault/"
address = "IP_ADDRESS:8500"
cluster_addr = "https://IP_ADDRESS:8201"
path = "vault/"
address = "IP_ADDRESS:8500"
cluster_addr = "https://IP_ADDRESS:8201"
redirect_addr = "http://IP_ADDRESS:8200"
}
listener "tcp" {
address = "IP_ADDRESS:8200"
address = "IP_ADDRESS:8200"
cluster_address = "IP_ADDRESS:8201"
tls_disable = 1
tls_disable = 1
}

View file

@ -10,9 +10,11 @@ name = "client1"
# Enable the client
client {
enabled = true
server_join {
retry_join = ["127.0.0.1:4647", "127.0.0.1:5647", "127.0.0.1:6647"]
}
options = {
"driver.raw_exec.enable" = "1"
}

View file

@ -21,6 +21,6 @@ server {
ports {
http = 5646
rpc = 5647
rpc = 5647
serf = 5648
}

View file

@ -3,6 +3,7 @@ log_level = "DEBUG"
# Setup data dir
data_dir = "/tmp/server3"
# Give the agent a unique name. Defaults to hostname
name = "server3"
@ -20,6 +21,6 @@ server {
ports {
http = 6646
rpc = 6647
rpc = 6647
serf = 6648
}

View file

@ -1,23 +1,25 @@
job "binstore-storagelocker" {
group "binsl" {
task "binstore" {
driver = "docker"
group "binsl" {
task "binstore" {
driver = "docker"
artifact {
source = "http://foo.com/bar"
destination = ""
options {
foo = "bar"
}
}
artifact {
source = "http://foo.com/bar"
destination = ""
artifact {
source = "http://foo.com/baz"
}
artifact {
source = "http://foo.com/bam"
destination = "var/foo"
}
options {
foo = "bar"
}
}
artifact {
source = "http://foo.com/baz"
}
artifact {
source = "http://foo.com/bam"
destination = "var/foo"
}
}
}
}

View file

@ -1,13 +1,15 @@
job "binstore-storagelocker" {
group "binsl" {
count = 5
task "binstore" {
driver = "docker"
group "binsl" {
count = 5
artifact {
bad = "bad"
}
resources {}
}
task "binstore" {
driver = "docker"
artifact {
bad = "bad"
}
resources {}
}
}
}

View file

@ -61,11 +61,9 @@ job "binstore-storagelocker" {
static = 3
}
port "this_is_aport" {
}
port "this_is_aport" {}
port "" {
}
port "" {}
}
}
}

View file

@ -18,32 +18,34 @@ job "binstore-storagelocker" {
affinity {
attribute = "${meta.team}"
value = "mobile"
operator = "="
weight = 50
value = "mobile"
operator = "="
weight = 50
}
spread {
attribute = "${meta.rack}"
weight = 100
target "r1" {
percent = 40
}
target "r2" {
percent = 60
}
}
spread {
attribute = "${meta.rack}"
weight = 100
target "r1" {
percent = 40
}
target "r2" {
percent = 60
}
}
update {
stagger = "60s"
max_parallel = 2
health_check = "manual"
min_healthy_time = "10s"
healthy_deadline = "10m"
stagger = "60s"
max_parallel = 2
health_check = "manual"
min_healthy_time = "10s"
healthy_deadline = "10m"
progress_deadline = "10m"
auto_revert = true
auto_promote = true
canary = 1
auto_revert = true
auto_promote = true
canary = 1
}
task "outside" {
@ -69,55 +71,57 @@ job "binstore-storagelocker" {
}
reschedule {
attempts = 5
interval = "12h"
attempts = 5
interval = "12h"
}
ephemeral_disk {
sticky = true
size = 150
sticky = true
size = 150
}
update {
max_parallel = 3
health_check = "checks"
min_healthy_time = "1s"
healthy_deadline = "1m"
progress_deadline = "1m"
auto_revert = false
auto_promote = false
canary = 2
max_parallel = 3
health_check = "checks"
min_healthy_time = "1s"
healthy_deadline = "1m"
progress_deadline = "1m"
auto_revert = false
auto_promote = false
canary = 2
}
migrate {
max_parallel = 2
health_check = "task_states"
min_healthy_time = "11s"
healthy_deadline = "11m"
max_parallel = 2
health_check = "task_states"
min_healthy_time = "11s"
healthy_deadline = "11m"
}
affinity {
attribute = "${node.datacenter}"
value = "dc2"
operator = "="
weight = 100
value = "dc2"
operator = "="
weight = 100
}
spread {
attribute = "${node.datacenter}"
weight = 50
weight = 50
target "dc1" {
percent = 50
}
target "dc2" {
percent = 25
}
target "dc3" {
percent = 25
}
}
task "binstore" {
driver = "docker"
user = "bob"
@ -125,9 +129,9 @@ job "binstore-storagelocker" {
affinity {
attribute = "${meta.foo}"
value = "a,b,c"
operator = "set_contains"
weight = 25
value = "a,b,c"
operator = "set_contains"
weight = 25
}
config {
@ -149,9 +153,9 @@ job "binstore-storagelocker" {
}
service {
tags = ["foo", "bar"]
tags = ["foo", "bar"]
canary_tags = ["canary", "bam"]
port = "http"
port = "http"
check {
name = "check-name"
@ -163,8 +167,8 @@ job "binstore-storagelocker" {
grpc_use_tls = true
check_restart {
limit = 3
grace = "10s"
limit = 3
grace = "10s"
ignore_warnings = true
}
}
@ -189,31 +193,29 @@ job "binstore-storagelocker" {
static = 3
}
port "http" {
}
port "http" {}
port "https" {
}
port "https" {}
port "admin" {
}
port "admin" {}
}
device "nvidia/gpu" {
count = 10
constraint {
attribute = "${device.attr.memory}"
value = "2GB"
operator = ">"
}
count = 10
affinity {
attribute = "${device.model}"
value = "1080ti"
weight = 50
}
constraint {
attribute = "${device.attr.memory}"
value = "2GB"
operator = ">"
}
affinity {
attribute = "${device.model}"
value = "1080ti"
weight = 50
}
}
device "intel/gpu" {}
}
@ -230,9 +232,9 @@ job "binstore-storagelocker" {
}
artifact {
source = "http://bar.com/artifact"
source = "http://bar.com/artifact"
destination = "test/foo/"
mode = "file"
mode = "file"
options {
checksum = "md5:ff1cc0d3432dad54d607c1505fb7245c"
@ -244,20 +246,20 @@ job "binstore-storagelocker" {
}
template {
source = "foo"
destination = "foo"
change_mode = "foo"
source = "foo"
destination = "foo"
change_mode = "foo"
change_signal = "foo"
splay = "10s"
env = true
vault_grace = "33s"
splay = "10s"
env = true
vault_grace = "33s"
}
template {
source = "bar"
destination = "bar"
perms = "777"
left_delimiter = "--"
source = "bar"
destination = "bar"
perms = "777"
left_delimiter = "--"
right_delimiter = "__"
}
}
@ -280,9 +282,9 @@ job "binstore-storagelocker" {
}
vault {
policies = ["foo", "bar"]
env = false
change_mode = "signal"
policies = ["foo", "bar"]
env = false
change_mode = "signal"
change_signal = "SIGUSR1"
}
}

View file

@ -91,14 +91,11 @@ job "binstore-storagelocker" {
static = 3
}
port "http" {
}
port "http" {}
port "https" {
}
port "https" {}
port "admin" {
}
port "admin" {}
}
}

View file

@ -1,5 +1,5 @@
job "foo" {
constraint {
distinct_hosts = "true"
}
constraint {
distinct_hosts = "true"
}
}

View file

@ -1,5 +1,5 @@
job "foo" {
constraint {
distinct_property = "${meta.rack}"
}
constraint {
distinct_property = "${meta.rack}"
}
}

View file

@ -84,8 +84,7 @@ job "binstore-storagelocker" {
static = 3
}
port "http" {
}
port "http" {}
}
}
}

View file

@ -1,6 +1,6 @@
job "foo" {
task "bar" {
driver = "docker"
driver = "docker"
kill_signal = "SIGQUIT"
config {

View file

@ -1,28 +1,31 @@
job "foo" {
datacenters = ["dc1"]
type = "batch"
type = "batch"
migrate {
max_parallel = 2
health_check = "task_states"
min_healthy_time = "11s"
healthy_deadline = "11m"
max_parallel = 2
health_check = "task_states"
min_healthy_time = "11s"
healthy_deadline = "11m"
}
group "bar" {
count = 3
task "bar" {
driver = "raw_exec"
config {
command = "bash"
args = ["-c", "echo hi"]
command = "bash"
args = ["-c", "echo hi"]
}
}
migrate {
max_parallel = 3
health_check = "checks"
min_healthy_time = "1s"
healthy_deadline = "1m"
max_parallel = 3
health_check = "checks"
min_healthy_time = "1s"
healthy_deadline = "1m"
}
}
}

View file

@ -1,25 +1,26 @@
job "binstore-storagelocker" {
group "binsl" {
count = 5
task "binstore" {
driver = "docker"
group "binsl" {
count = 5
resources {
cpu = 500
memory = 128
task "binstore" {
driver = "docker"
network {
mbits = "100"
reserved_ports = [1,2,3]
dynamic_ports = ["HTTP", "HTTPS", "ADMIN"]
}
resources {
cpu = 500
memory = 128
network {
mbits = "128"
reserved_ports = [1,2,3]
dynamic_ports = ["HTTP", "HTTPS", "ADMIN"]
}
}
network {
mbits = "100"
reserved_ports = [1, 2, 3]
dynamic_ports = ["HTTP", "HTTPS", "ADMIN"]
}
network {
mbits = "128"
reserved_ports = [1, 2, 3]
dynamic_ports = ["HTTP", "HTTPS", "ADMIN"]
}
}
}
}
}

View file

@ -1,24 +1,27 @@
job "binstore-storagelocker" {
group "binsl" {
ephemeral_disk {
size = 500
}
ephemeral_disk {
size = 100
}
count = 5
task "binstore" {
driver = "docker"
resources {
cpu = 500
memory = 128
}
resources {
cpu = 500
memory = 128
}
}
group "binsl" {
ephemeral_disk {
size = 500
}
ephemeral_disk {
size = 100
}
count = 5
task "binstore" {
driver = "docker"
resources {
cpu = 500
memory = 128
}
resources {
cpu = 500
memory = 128
}
}
}
}