[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/04: hydra: bayfront: Update the NGinx configuration.
From: |
Christopher Baines |
Subject: |
03/04: hydra: bayfront: Update the NGinx configuration. |
Date: |
Mon, 7 Jun 2021 09:55:19 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository maintenance.
commit 1f82ee0fa1d29e1dff7e5d47e0ac7ef93436faec
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Mon Jun 7 14:42:37 2021 +0100
hydra: bayfront: Update the NGinx configuration.
* hydra/nginx/html/bordeaux/index.html: New file.
* hydra/bayfront.scm (%bayfront-nginx-service-extra-config): Remove
proxy config relevant for hydra.
(%bordeaux.guix.gnu.org-nginx-servers): Serve log files, and show log
files for /build/UUID requests. Also service an index.html page.
(operating-system)[services]: Use a custom nginx package built with a
couple of additional modules.
---
hydra/bayfront.scm | 32 +++++++++++++++-------
hydra/nginx/html/bordeaux/index.html | 51 ++++++++++++++++++++++++++++++++++++
2 files changed, 73 insertions(+), 10 deletions(-)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index 53f11d5..792dd9e 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -190,15 +190,7 @@ proxy_cache_path /var/cache/nginx/static
inactive=10d # inactive keys removed after 10d
keys_zone=static:1m # nar cache meta data: ~8K keys
max_size=200m; # total cache data size max
-
-# If Hydra cannot honor these delays, then something is wrong and
-# we'd better drop the connection and return 504.
-proxy_connect_timeout 7s;
-proxy_read_timeout 10s;
-proxy_send_timeout 10s;
-
-# Cache timeouts for a little while to avoid increasing pressure.
-proxy_cache_valid 504 30s;")
+")
(define %hpc.guix.info-nginx-servers
(let ((common-locations
@@ -567,12 +559,23 @@ add_header Content-Type text/plain;")))
# Nars are already compressed.
gzip off;
-"))))))
+")))
+ (nginx-location-configuration
+ (uri "~ \"\\/build\\/([a-z0-9-]{36})$\"")
+ ;; At some point a detailed page for each build would be
+ ;; nice, but for now, just show the log file.
+ (body '("rewrite /(.*) /$1/log last;")))
+ (nginx-location-configuration
+ (uri "~ /build/(.*)/log$")
+ (body '("alias /var/lib/guix-build-coordinator/build-logs/$1/log;"
+ "gzip_static always;"
+ "gunzip on;"))))))
(list
(nginx-server-configuration
(server-name '("bordeaux.guix.gnu.org"))
(listen '("80"))
+ (root (local-file "nginx/html/bordeaux" #:recursive? #t))
(raw-content
'("
access_log /var/log/nginx/bordeaux.access.log;"))
@@ -587,6 +590,7 @@ access_log /var/log/nginx/bordeaux.access.log;"))
(nginx-server-configuration
(server-name '("bordeaux.guix.gnu.org"))
(listen '("443 ssl"))
+ (root (local-file "nginx/html/bordeaux" #:recursive? #t))
(ssl-certificate
"/etc/letsencrypt/live/bayfront.guix.gnu.org/fullchain.pem")
(ssl-certificate-key
@@ -871,6 +875,14 @@ access_log /var/log/nginx/bordeaux.access.log;"))
(service nginx-service-type
(nginx-configuration
+ (nginx
+ (package
+ (inherit nginx)
+ (arguments
+ (append
+ '(#:configure-flags '("--with-http_gzip_static_module"
+ "--with-http_gunzip_module"))
+ (package-arguments nginx)))))
(extra-content %bayfront-nginx-service-extra-config)
(upstream-blocks
(list (nginx-upstream-configuration
diff --git a/hydra/nginx/html/bordeaux/index.html
b/hydra/nginx/html/bordeaux/index.html
new file mode 100644
index 0000000..a74f2e2
--- /dev/null
+++ b/hydra/nginx/html/bordeaux/index.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <title>bordeaux.guix.gnu.org</title>
+ <style type="text/css">
+ body {
+ margin: 0;
+ padding: 0 0 3em 1em;
+ font-family: sans-serif;
+ }
+ </style>
+ </head>
+ <body>
+ <h1>bordeaux.guix.gnu.org</h1>
+
+ <p>
+ This is a
+ <a href="https://guix.gnu.org/manual/en/html_node/Substitutes.html"
+ target="_blank">
+ substitute server
+ </a>
+ for <a href="https://guix.gnu.org/"
+ target="_blank">Guix</a>.
+ </p>
+
+ <p>
+ Availability for <b>x86_64-linux</b>, <b>i686-linux</b> and
+ <b>powerpc64le-linux</b> should be good. <b>aarch64-linux</b>
+ is a work in progress, and availability for <b>armhf-linux</b>
+ plus <b>i586-gnu</b> is limited.
+ </p>
+
+ <p>
+ Cross built packages from x86_64-linux to <b>i586-pc-gnu</b> are
+ also available, <b>aarch64-linux-gnu</b>,
+ <b>arm-linux-gnueabihf</b> availability is limited.
+ </p>
+
+ <h2>Using these substiutes</h2>
+ <p>
+ The URL to use to fetch substitutes is
<code>https://bordeaux.guix.gnu.org</code>,
+ and they're signed with the following key.
+ <pre>(public-key
+ (ecc
+ (curve Ed25519)
+ (q #7D602902D3A2DBB83F8A0FB98602A754C5493B0B778C8D1DD4E0F41DE14DE34F#)
+ )
+ )</pre>
+ </p>
+ </body>
+</html>