From dca31595dba50e817a4cb17e9fdff1b40031bc3f Mon Sep 17 00:00:00 2001 From: classabbyamp Date: Fri, 23 Feb 2024 03:08:48 -0500 Subject: [PATCH] services/nomad/apps/popcorn-report.nomad: add nomad job this component of popcorn reads what statrepo has collected and dumps it to json every night. these json dumps are used by pqueryd and served by nginx. --- services/nomad/apps/popcorn-report.nomad | 62 ++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 services/nomad/apps/popcorn-report.nomad diff --git a/services/nomad/apps/popcorn-report.nomad b/services/nomad/apps/popcorn-report.nomad new file mode 100644 index 0000000..0e53245 --- /dev/null +++ b/services/nomad/apps/popcorn-report.nomad @@ -0,0 +1,62 @@ +job "popcorn-report" { + datacenters = ["VOID-MIRROR"] + namespace = "apps" + type = "batch" + + periodic { + crons = ["@daily"] + prohibit_overlap = true + } + + group "report" { + count = 1 + + network { mode = "bridge" } + + volume "popcorn_data" { + type = "host" + source = "popcorn_data" + read_only = false + } + + task "report" { + driver = "docker" + + config { + image = "ghcr.io/void-linux/infra-popcorn:20240704R1" + command = "/local/popcorn-report" + } + + volume_mount { + volume = "popcorn_data" + destination = "/data" + } + + env { + OUTDIR = "/data" + } + + template { + data = <