From da5512f2e9a7d97bccbcac8b8971defa5b971b83 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Mon, 12 Apr 2021 17:59:51 +0200 Subject: feat(whitby): Enable Grafana at status.tvl.su Enables a Grafana service pointing to whitby's local Prometheus instance, accessible at status.tvl.su. I've no idea how to configure Grafana and if it's possible to link it to CAS, but we'll see about that later. Notes: * the explicit fixpoint for whitby config has been removed as we have the `config` parameter available now * backups are enabled for the Grafana storage location Change-Id: If5ffe0c1a3378d1c88529129487c643642705fd2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/2948 Tested-by: BuildkiteCI Reviewed-by: grfn --- ops/modules/www/status.tvl.su.nix | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ops/modules/www/status.tvl.su.nix (limited to 'ops/modules/www/status.tvl.su.nix') diff --git a/ops/modules/www/status.tvl.su.nix b/ops/modules/www/status.tvl.su.nix new file mode 100644 index 0000000000..2bb6093c14 --- /dev/null +++ b/ops/modules/www/status.tvl.su.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."status-fyi" = { + serverName = "status.tvl.fyi"; + enableACME = true; + extraConfig = "return 302 https://status.tvl.su$request_uri;"; + }; + + services.nginx.virtualHosts.grafana = { + serverName = "status.tvl.su"; + enableACME = true; + forceSSL = true; + + locations."/" = { + proxyPass = "http://localhost:${toString config.services.grafana.port}"; + }; + }; + }; +} -- cgit 1.4.1