aboutsummaryrefslogtreecommitdiff
path: root/nomad
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2020-03-27 09:49:51 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2020-03-27 09:49:51 +0100
commit54df46d9d25ac509247ef9fd3847de3ab7b75aee (patch)
tree4654bee72c0d68fcc36fd19690d4eb19b82bd632 /nomad
parentfd6e6aa1413602fc11bf79f7cf08120d996b8b3a (diff)
downloadinfrastructure-54df46d9d25ac509247ef9fd3847de3ab7b75aee.tar.gz
infrastructure-54df46d9d25ac509247ef9fd3847de3ab7b75aee.zip
Add a WIP jitsi hcl file
Diffstat (limited to 'nomad')
-rw-r--r--nomad/jitsi.hcl173
1 files changed, 173 insertions, 0 deletions
diff --git a/nomad/jitsi.hcl b/nomad/jitsi.hcl
new file mode 100644
index 0000000..7f69d80
--- /dev/null
+++ b/nomad/jitsi.hcl
@@ -0,0 +1,173 @@
+/*
+ * WIP WIP WIP WIP
+ *
+ * + NEED TO INJECT CERTIFICATES
+ * + NEED TO SET ENV VARIABLES
+ * + ADD AT LEAST jitsi-videobridge.jitsi.deuxfleurs.fr TO DNS
+ */
+
+job "jitsi" {
+ datacenters = ["dc1"]
+ type = "service"
+
+ constraint {
+ attribute = "${attr.cpu.arch}"
+ value = "amd64"
+ }
+
+ group "core" {
+ task "xmpp" {
+ driver = "docker"
+ config {
+ image = "superboum/amd64_jitsi_xmpp:v1"
+ network_mode = "host"
+ port_map {
+ xmpp_port = 5222
+ ext_port = 5347
+ bosh_port = 5280
+ }
+ }
+
+ resources {
+ cpu = 300
+ memory = 200
+ network {
+ port "xmpp_port" {
+ static = "5222"
+ }
+ port "ext_port" {
+ static = "5347"
+ }
+ port "bosh_port" {
+ static = "5280"
+ }
+ }
+ }
+
+ service {
+ tags = [
+ "jitsi"
+ ]
+ port = "bosh_port"
+ address_mode = "host"
+ name = "jitsi-xmpp-bosh"
+ check {
+ type = "tcp"
+ port = "bosh_port"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+ }
+
+ task "front" {
+ driver = "docker"
+ config {
+ image = "superboum/amd64_jitsi_front:v1"
+ network_mode = "host"
+ port_map {
+ https_port = 443
+ }
+ }
+
+ resources {
+ cpu = 300
+ memory = 200
+ network {
+ port "https_port" {
+ static = "443"
+ }
+ }
+ }
+
+ service {
+ tags = [
+ "jitsi",
+ "traefik.enable=true",
+ "traefik.frontend.entryPoints=https,http",
+ "traefik.frontend.rule=Host:jitsi.deuxfleurs.fr;PathPrefix:/"
+ ]
+ port = "https_port"
+ address_mode = "host"
+ name = "jitsi-front-https"
+ check {
+ type = "tcp"
+ port = "https_port"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+ }
+
+ task "jicofo" {
+ driver = "docker"
+ config {
+ image = "superboum/amd64_jitsi_conference_focus:v1"
+ network_mode = "host"
+ }
+
+ resources {
+ cpu = 300
+ memory = 200
+ }
+ }
+
+ task "videobridge" {
+ driver = "docker"
+ config {
+ image = "superboum/amd64_jitsi_videobridge:v1"
+ network_mode = "host"
+ port_map {
+ video1_port = 4443
+ video2_port = 10000
+ }
+ }
+
+ resources {
+ cpu = 300
+ memory = 500
+ network {
+ port "video1_port" {
+ static = "4443"
+ }
+ port "video2_port" {
+ static = "10000"
+ }
+ }
+
+ }
+
+ service {
+ tags = [
+ "jitsi"
+ ]
+ port = "video1_port"
+ address_mode = "host"
+ name = "jitsi-videobridge-video1"
+ check {
+ type = "tcp"
+ port = "video1_port"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+ }
+
+ }
+}
+