Add minecraft server job for magma (#52)
Co-authored-by: wizzdom <dom@wizzdom.xyz>
This commit is contained in:
parent
8245a1226b
commit
61c624fc89
2 changed files with 61 additions and 7 deletions
52
jobs/games/minecraft/magma.hcl
Normal file
52
jobs/games/minecraft/magma.hcl
Normal file
|
@ -0,0 +1,52 @@
|
|||
job "minecraft-magma" {
|
||||
datacenters = ["aperture"]
|
||||
type = "service"
|
||||
|
||||
group "fabric-server" {
|
||||
count = 1
|
||||
|
||||
network {
|
||||
port "minecraft" {
|
||||
static = 25572
|
||||
to = 25565
|
||||
}
|
||||
port "rcon" {
|
||||
to = 25575
|
||||
}
|
||||
port "voicechat" {
|
||||
to = 24454
|
||||
}
|
||||
}
|
||||
|
||||
service {
|
||||
name = "minecraft-magma"
|
||||
port = "minecraft"
|
||||
}
|
||||
|
||||
task "minecraft-magma" {
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "itzg/minecraft-server:java17-alpine"
|
||||
ports = ["minecraft", "rcon", "voicechat"]
|
||||
volumes = [
|
||||
"/storage/nomad/${NOMAD_TASK_NAME}:/data"
|
||||
]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 3000 # 3GHz
|
||||
memory = 10240 # 10GB
|
||||
}
|
||||
|
||||
env {
|
||||
EULA = "TRUE"
|
||||
TYPE = "FABRIC"
|
||||
VERSION = "1.20.4"
|
||||
ICON = "https://raw.githubusercontent.com/redbrick/design-system/main/assets/logos/logo.png"
|
||||
MEMORY = "8G"
|
||||
USE_AIKAR_FLAGS = true
|
||||
JVM_XX_OPTS = "-XX:+AlwaysPreTouch -XX:+DisableExplicitGC -XX:+ParallelRefProcEnabled -XX:+PerfDisableSharedMem -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1HeapRegionSize=8M -XX:G1HeapWastePercent=5 -XX:G1MaxNewSizePercent=40 -XX:G1MixedGCCountTarget=4 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1NewSizePercent=30 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:G1ReservePercent=20 -XX:InitiatingHeapOccupancyPercent=15 -XX:MaxGCPauseMillis=200 -XX:MaxTenuringThreshold=1 -XX:SurvivorRatio=32"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
job "gate-proxy" {
|
||||
datacenters = ["aperture"]
|
||||
node_pool = "ingress"
|
||||
type = "service"
|
||||
node_pool = "ingress"
|
||||
type = "service"
|
||||
|
||||
group "gate-proxy" {
|
||||
count = 1
|
||||
|
@ -16,9 +16,9 @@ job "gate-proxy" {
|
|||
port = "mc"
|
||||
|
||||
check {
|
||||
type = "tcp"
|
||||
type = "tcp"
|
||||
interval = "10s"
|
||||
timeout = "2s"
|
||||
timeout = "2s"
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,7 +35,7 @@ job "gate-proxy" {
|
|||
}
|
||||
|
||||
template {
|
||||
data = <<EOH
|
||||
data = <<EOH
|
||||
# This is a simplified config where the rest of the
|
||||
# settings are omitted and will be set by default.
|
||||
# See config.yml for the full configuration options.
|
||||
|
@ -58,10 +58,12 @@ config:
|
|||
backend: olim909-mc.service.consul:19132
|
||||
- host: games.rb.dcu.ie
|
||||
backend: games-mc.service.consul:25569
|
||||
- host: fugatives.rb.dcu.ie
|
||||
backend: fugatives-mc.service.consul:25570
|
||||
- host: fugitives.rb.dcu.ie
|
||||
backend: fugitives-mc.service.consul:25570
|
||||
- host: cjaran-mc.rb.dcu.ie
|
||||
backend: cjaran-mc.service.consul:25571
|
||||
- host: magma-mc.rb.dcu.ie
|
||||
backend: minecraft-magma.service.consul:25572
|
||||
EOH
|
||||
destination = "local/file.conf"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue