2015-09-23 05:48:39 +00:00
|
|
|
# Increase log verbosity
|
2016-02-24 18:42:16 +00:00
|
|
|
log_level = "DEBUG"
|
2015-09-23 05:48:39 +00:00
|
|
|
|
|
|
|
# Setup data dir
|
|
|
|
data_dir = "/tmp/client1"
|
|
|
|
|
2018-03-27 17:02:47 +00:00
|
|
|
# Give the agent a unique name. Defaults to hostname
|
|
|
|
name = "client1"
|
|
|
|
|
2015-09-23 05:48:39 +00:00
|
|
|
# Enable the client
|
|
|
|
client {
|
2017-08-01 22:40:36 +00:00
|
|
|
enabled = true
|
2015-09-23 05:48:39 +00:00
|
|
|
|
2017-08-01 22:40:36 +00:00
|
|
|
# For demo assume we are talking to server1. For production,
|
|
|
|
# this should be like "nomad.service.consul:4647" and a system
|
|
|
|
# like Consul used for service discovery.
|
|
|
|
servers = ["127.0.0.1:4647"]
|
2015-09-23 05:48:39 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
# Modify our port to avoid a collision with server1
|
|
|
|
ports {
|
2017-08-01 22:40:36 +00:00
|
|
|
http = 5656
|
2015-09-23 05:48:39 +00:00
|
|
|
}
|
2020-04-23 15:51:03 +00:00
|
|
|
|
|
|
|
# Because we will potentially have two clients talking to the same
|
|
|
|
# Docker daemon, we have to disable the dangling container cleanup,
|
|
|
|
# otherwise they will stop each other's work thinking it was orphaned.
|
|
|
|
plugin "docker" {
|
|
|
|
config {
|
|
|
|
gc {
|
|
|
|
dangling_containers {
|
|
|
|
enabled = false
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|