Initial import of https://github.com/docker/dhe-engine
This commit is contained in:
parent
e9de6f2a44
commit
d4f01b812c
31 changed files with 2000 additions and 0 deletions
10
docs/container/confd.toml
Normal file
10
docs/container/confd.toml
Normal file
|
@ -0,0 +1,10 @@
|
|||
backend = "etcd"
|
||||
client_cakeys = "/ca/etcd/cert.pem"
|
||||
client_cert = "/ca/etcd/cert.pem"
|
||||
client_key = "/ca/etcd/key.pem"
|
||||
confdir = "/etc/confd"
|
||||
log-level = "info"
|
||||
interval = 600
|
||||
noop = false
|
||||
scheme = "http"
|
||||
watch = true
|
21
docs/container/confs/garant.toml
Normal file
21
docs/container/confs/garant.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[template]
|
||||
|
||||
# The name of the template that will be used to render the application's configuration file
|
||||
# Confd will look in `/etc/conf.d/templates` for these files by default
|
||||
src = "garant.tmpl"
|
||||
|
||||
# The location to place the rendered configuration file
|
||||
dest = "/config/garant.yml"
|
||||
|
||||
# The etcd keys or directory to watch. This is where the information to fill in
|
||||
# the template will come from.
|
||||
keys = [ "/dtr/configs/garant.yml" ]
|
||||
|
||||
# File ownership and mode information
|
||||
owner = "root"
|
||||
mode = "0644"
|
||||
|
||||
# These are the commands that will be used to check whether the rendered config is
|
||||
# valid and to reload the actual service once the new config is in place
|
||||
# TODO: can registry configs be reloaded without restarting thee container?
|
||||
reload_cmd = "killall -USR2 registry"
|
21
docs/container/confs/signing_key.toml
Normal file
21
docs/container/confs/signing_key.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[template]
|
||||
|
||||
# The name of the template that will be used to render the application's configuration file
|
||||
# Confd will look in `/etc/conf.d/templates` for these files by default
|
||||
src = "signing_key.tmpl"
|
||||
|
||||
# The location to place the rendered configuration file
|
||||
dest = "/config/signing_key.json"
|
||||
|
||||
# The etcd keys or directory to watch. This is where the information to fill in
|
||||
# the template will come from.
|
||||
keys = [ "/dtr/configs/generatedConfigs/signing_key.json" ]
|
||||
|
||||
# File ownership and mode information
|
||||
owner = "root"
|
||||
mode = "0644"
|
||||
|
||||
# These are the commands that will be used to check whether the rendered config is
|
||||
# valid and to reload the actual service once the new config is in place
|
||||
# TODO: can registry configs be reloaded without restarting thee container?
|
||||
reload_cmd = "killall -USR2 registry"
|
21
docs/container/confs/storage.toml
Normal file
21
docs/container/confs/storage.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[template]
|
||||
|
||||
# The name of the template that will be used to render the application's configuration file
|
||||
# Confd will look in `/etc/conf.d/templates` for these files by default
|
||||
src = "storage.tmpl"
|
||||
|
||||
# The location to place the rendered configuration file
|
||||
dest = "/config/storage.yml"
|
||||
|
||||
# The etcd keys or directory to watch. This is where the information to fill in
|
||||
# the template will come from.
|
||||
keys = [ "/dtr/configs/storage.yml" ]
|
||||
|
||||
# File ownership and mode information
|
||||
owner = "root"
|
||||
mode = "0644"
|
||||
|
||||
# These are the commands that will be used to check whether the rendered config is
|
||||
# valid and to reload the actual service once the new config is in place
|
||||
# TODO: can registry configs be reloaded without restarting thee container?
|
||||
reload_cmd = "killall -USR2 registry"
|
21
docs/container/confs/token_roots.toml
Normal file
21
docs/container/confs/token_roots.toml
Normal file
|
@ -0,0 +1,21 @@
|
|||
[template]
|
||||
|
||||
# The name of the template that will be used to render the application's configuration file
|
||||
# Confd will look in `/etc/conf.d/templates` for these files by default
|
||||
src = "token_roots.tmpl"
|
||||
|
||||
# The location to place the rendered configuration file
|
||||
dest = "/config/token_roots.pem"
|
||||
|
||||
# The etcd keys or directory to watch. This is where the information to fill in
|
||||
# the template will come from.
|
||||
keys = [ "/dtr/configs/generatedConfigs/token_roots.pem" ]
|
||||
|
||||
# File ownership and mode information
|
||||
owner = "root"
|
||||
mode = "0644"
|
||||
|
||||
# These are the commands that will be used to check whether the rendered config is
|
||||
# valid and to reload the actual service once the new config is in place
|
||||
# TODO: can registry configs be reloaded without restarting thee container?
|
||||
reload_cmd = "killall -USR2 registry"
|
21
docs/container/start.sh
Executable file
21
docs/container/start.sh
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "[starter] starting..."
|
||||
|
||||
# Fail hard and fast
|
||||
set -eo pipefail
|
||||
|
||||
# If this fails, docker will restart the container. Yay, docker.
|
||||
confd -node https://dtr-etcd-${DTR_REPLICA_ID}.dtr-br:2379 -node https://dtr-etcd-${DTR_REPLICA_ID}.dtr-br:4001 -onetime -config-file /etc/confd/confd.toml
|
||||
|
||||
# Run confd watcher in the background to watch the upstream servers
|
||||
confd -node https://dtr-etcd-${DTR_REPLICA_ID}.dtr-br:2379 -node https://dtr-etcd-${DTR_REPLICA_ID}.dtr-br:4001 -config-file /etc/confd/confd.toml &
|
||||
echo "[starter] confd is listening for changes on etcd..."
|
||||
|
||||
# Start registry
|
||||
echo "[starter] starting registry service..."
|
||||
while true
|
||||
do
|
||||
/bin/registry || true
|
||||
sleep 1
|
||||
done
|
1
docs/container/templates/garant.tmpl
Normal file
1
docs/container/templates/garant.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
{{getv "/dtr/configs/garant.yml"}}
|
1
docs/container/templates/signing_key.tmpl
Normal file
1
docs/container/templates/signing_key.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
{{getv "/dtr/configs/generatedConfigs/signing_key.json"}}
|
1
docs/container/templates/storage.tmpl
Normal file
1
docs/container/templates/storage.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
{{getv "/dtr/configs/storage.yml"}}
|
1
docs/container/templates/token_roots.tmpl
Normal file
1
docs/container/templates/token_roots.tmpl
Normal file
|
@ -0,0 +1 @@
|
|||
{{getv "/dtr/configs/generatedConfigs/token_roots.pem"}}
|
Loading…
Add table
Add a link
Reference in a new issue