aboutsummaryrefslogtreecommitdiff
path: root/app/deployment/core.hcl
diff options
context:
space:
mode:
authorQuentin <quentin@deuxfleurs.fr>2020-09-12 20:17:07 +0200
committerQuentin <quentin@deuxfleurs.fr>2020-09-12 20:17:07 +0200
commita23e08ce20887efb4e158a02ffee1f775a0db89f (patch)
tree493a2cef5496aec74e57ad453574fdef6856f92b /app/deployment/core.hcl
parentfb4ffbc7faa0d123ce9bf817d240a8c670c494e3 (diff)
downloadinfrastructure-a23e08ce20887efb4e158a02ffee1f775a0db89f.tar.gz
infrastructure-a23e08ce20887efb4e158a02ffee1f775a0db89f.zip
Refactor 2
Diffstat (limited to 'app/deployment/core.hcl')
-rw-r--r--app/deployment/core.hcl43
1 files changed, 43 insertions, 0 deletions
diff --git a/app/deployment/core.hcl b/app/deployment/core.hcl
new file mode 100644
index 0000000..43774a6
--- /dev/null
+++ b/app/deployment/core.hcl
@@ -0,0 +1,43 @@
+job "core" {
+ datacenters = ["dc1"]
+ type = "system"
+
+ constraint {
+ attribute = "${attr.cpu.arch}"
+ value = "amd64"
+ }
+
+ update {
+ max_parallel = 1
+ stagger = "1m"
+ }
+
+ group "network" {
+ task "diplonat" {
+ driver = "docker"
+
+ config {
+ image = "darkgallium/amd64_diplonat:v2"
+ network_mode = "host"
+ readonly_rootfs = true
+ privileged = true
+ }
+
+ template {
+ data = <<EOH
+DIPLONAT_PRIVATE_IP={{ env "attr.unique.network.ip-address" }}
+DIPLONAT_REFRESH_TIME=60
+DIPLONAT_EXPIRATION_TIME=300
+DIPLONAT_CONSUL_NODE_NAME={{ env "attr.unique.hostname" }}
+RUST_LOG=debug
+EOH
+ destination = "secrets/env"
+ env = true
+ }
+
+ resources {
+ memory = 40
+ }
+ }
+ }
+}