SSB experiment

This commit is contained in:
Alex 2022-09-21 19:29:08 +02:00
parent 4e939f55fc
commit f22e242700
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
5 changed files with 144 additions and 8 deletions

View file

@ -21,7 +21,4 @@
deuxfleurs.cluster_ip = "10.14.1.2"; deuxfleurs.cluster_ip = "10.14.1.2";
deuxfleurs.is_raft_server = true; deuxfleurs.is_raft_server = true;
# Enable netdata monitoring
services.netdata.enable = true;
} }

View file

@ -21,7 +21,4 @@
deuxfleurs.cluster_ip = "10.14.1.1"; deuxfleurs.cluster_ip = "10.14.1.1";
deuxfleurs.is_raft_server = true; deuxfleurs.is_raft_server = true;
# Enable netdata monitoring
services.netdata.enable = true;
} }

View file

@ -22,6 +22,6 @@
deuxfleurs.cluster_ip = "10.14.1.3"; deuxfleurs.cluster_ip = "10.14.1.3";
deuxfleurs.is_raft_server = true; deuxfleurs.is_raft_server = true;
# Enable netdata monitoring # Open SSB port
services.netdata.enable = true; networking.firewall.allowedTCPPorts = [ 8008 ];
} }

View file

@ -0,0 +1,83 @@
job "ssb" {
datacenters = ["neptune"]
type = "service"
group "go-ssb-room" {
count = 1
constraint {
attribute = "${attr.unique.hostname}"
value = "caribou"
}
network {
port "web_port" { to = 3888 }
port "ssb_port" { to = 8008 }
}
task "go-ssb-room" {
driver = "docker"
config {
image = "lxpz/amd64_go_ssb_room:1"
readonly_rootfs = true
ports = [ "web_port", "ssb_port" ]
network_mode = "host"
command = "/app/cmd/server/server"
args = [
"-https-domain=ssb.staging.deuxfleurs.org",
"-repo=/repo",
"-aliases-as-subdomains=false",
"-lishttp=:3888",
]
volumes = [
"/mnt/ssd/go-ssb-room:/repo"
]
}
resources {
memory = 200
}
service {
name = "go-ssb-room-http"
tags = [
"tricot ssb.staging.deuxfleurs.org",
]
port = "web_port"
address_mode = "driver"
check {
type = "tcp"
port = "web_port"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
service {
name = "go-ssb-room-ssb"
tags = [
"(diplonat (port 8008))",
]
port = "ssb_port"
address_mode = "driver"
check {
type = "tcp"
port = "ssb_port"
interval = "60s"
timeout = "5s"
check_restart {
limit = 3
grace = "90s"
ignore_warnings = false
}
}
}
}
}
}

View file

@ -0,0 +1,59 @@
job "ssb" {
datacenters = ["neptune"]
type = "service"
group "ssb-room" {
count = 1
constraint {
attribute = "${attr.unique.hostname}"
value = "caribou"
}
network {
port "web_port" {
to = 8007
}
port "ssb_port" {
to = 8008
}
}
task "go-ssb-room" {
driver = "docker"
config {
image = "lxpz/amd64_ssb_room:3"
readonly_rootfs = true
ports = [ "web_port", "ssb_port" ]
network_mode = "host"
volumes = [
"/mnt/ssd/ssb-room:/root/.ssb/"
]
}
user = "root"
resources {
memory = 200
}
service {
name = "ssb-room-http"
tags = [
"tricot ssb.staging.deuxfleurs.org",
]
port = "web_port"
address_mode = "driver"
}
service {
name = "ssb-room-ssb"
tags = [
"(diplonat (port 8008))",
]
port = "ssb_port"
address_mode = "driver"
}
}
}
}