[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/02: hydra: bayfront: Add bffe service.
From: |
Christopher Baines |
Subject: |
01/02: hydra: bayfront: Add bffe service. |
Date: |
Fri, 15 Sep 2023 10:37:08 -0400 (EDT) |
cbaines pushed a commit to branch master
in repository maintenance.
commit f07f498a065047bb81aae680cb7449a5b0c73eeb
Author: Christopher Baines <mail@cbaines.net>
AuthorDate: Fri Sep 15 15:34:15 2023 +0100
hydra: bayfront: Add bffe service.
This replaces me running the bffe in a screen session.
The bffe looks after submitting master branch builds to the bordeaux
build coordinator, as well as exposing information about the build
farm.
* hydra/bayfront.scm (%guix-build-coordinator-configuration): New
variable.
<services>: Add bffe-service-type.
* hydra/nginx/html/bordeaux/home.html: New file.
* hydra/nginx/html/bordeaux/index.html: Remove.
---
hydra/bayfront.scm | 72 ++++++++++++++++
hydra/nginx/html/bordeaux/home.html | 44 ++++++++++
hydra/nginx/html/bordeaux/index.html | 158 -----------------------------------
3 files changed, 116 insertions(+), 158 deletions(-)
diff --git a/hydra/bayfront.scm b/hydra/bayfront.scm
index ed55f09..dc79cef 100644
--- a/hydra/bayfront.scm
+++ b/hydra/bayfront.scm
@@ -972,6 +972,75 @@ proxy_set_header Via $via;"
(extra-environment-variables
'("GC_RETRY_SIGNALS=0")))))
+(define %bffe-configuration
+ (bffe-configuration
+ (arguments
+ #~(let ((priority-for-derivation
+ (lambda (type system target)
+ (cond
+ ((eq? type 'channel-instance)
+ (cond
+ ((or (string=? system "x86_64-linux")
+ (string=? system "aarch64-linux"))
+ 1000)
+ ((or
+ ;; i686-linux builds are getting stuck due to memory
+ ;; issues, so use a lower priority
+ (string=? system "i686-linux")
+ ;; prioritise package builds over channel instances for
+ ;; riscv64-linux aaand powerpc64le-linux
+ (string=? system "riscv64-linux"))
+ 0)
+ ;; Prioritise packages for powerpc64le-linux
+ ((string=? system "powerpc64le-linux") 700)
+ (else 900)))
+ ((eq? type 'package)
+ (cond
+ ((string=? target "none")
+ (if (or (string=? system "x86_64-linux")
+ (string=? system "aarch64-linux"))
+ 800
+ 700))
+ ((string=? target "i586-pc-gnu") 650)
+ (else
+ ;; Use a low priority for general cross builds
+ 0)))
+ (else
+ 0)))))
+ (list
+ #:build
+ (list
+ (build-from-guix-data-service
+ (data-service-url "https://data.guix.gnu.org")
+ (build-coordinator-url "http://127.0.0.1:8746")
+ (branches '("master"))
+ (systems '("x86_64-linux" "i686-linux"
+ "aarch64-linux"
+ "armhf-linux"
+ "powerpc64le-linux"
+ "riscv64-linux"
+ "i586-gnu"))
+ (systems-and-targets
+ (map (lambda (target)
+ (cons "x86_64-linux" target))
+ '("mips64el-linux-gnu"
+ "arm-linux-gnueabihf"
+ "aarch64-linux-gnu"
+ "powerpc-linux-gnu"
+ "powerpc64le-linux-gnu"
+ "riscv64-linux-gnu"
+ "i586-pc-gnu"
+ "i686-w64-mingw32"
+ "x86_64-w64-mingw32")))
+ (submit-builds-for-channel-instances? #t)
+ (build-priority priority-for-derivation)
+ (data-service-build-server-id 2)))
+ #:web-server-args
+ '(#:controller-args
+ (#:title "bordeaux.guix.gnu.org"
+ #:template-directory #$(local-file "nginx/html/bordeaux"
+ #:recursive? #t))))))))
+
;;;
;;; Operating system.
@@ -1246,6 +1315,9 @@ proxy_set_header Via $via;"
(service guix-build-coordinator-service-type
%guix-build-coordinator-configuration)
+ (service bffe-service-type
+ %bffe-configuration)
+
(service guix-build-coordinator-agent-service-type
(guix-build-coordinator-agent-configuration
(coordinator "https://coordinator.bayfront.guix.gnu.org")
diff --git a/hydra/nginx/html/bordeaux/home.html
b/hydra/nginx/html/bordeaux/home.html
new file mode 100644
index 0000000..a7713cf
--- /dev/null
+++ b/hydra/nginx/html/bordeaux/home.html
@@ -0,0 +1,44 @@
+<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>,
+ <b>aarch64-linux</b>, <b>armhf-linux</b> and
+ <b>powerpc64le-linux</b> should be good. <b>i586-gnu</b>
+ substitutes are a work in progress.
+</p>
+
+<p>
+ Cross built packages from x86_64-linux to <b>i586-pc-gnu</b>,
+ <b>aarch64-linux-gnu</b> and <b>arm-linux-gnueabihf</b> are
+ also available.
+</p>
+
+<h2>Using these substitutes</h2>
+<p>
+ bordeaux.guix.gnu.org is a default substitute server in recent
+ versions of Guix, so no manual configuration should be
+ necessary.
+</p>
+<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>
+
+<h3>On a Guix System</h3>
+<p>
+ With recent versions of Guix, the
+ <code>%default-substitute-urls</code> and
+ <code>%default-authorized-guix-keys</code> should include
+ bordeaux.guix.gnu.org, so no extra configuration should be
+ necessary.
+</p>
diff --git a/hydra/nginx/html/bordeaux/index.html
b/hydra/nginx/html/bordeaux/index.html
deleted file mode 100644
index 3940733..0000000
--- a/hydra/nginx/html/bordeaux/index.html
+++ /dev/null
@@ -1,158 +0,0 @@
-<!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;
- }
- .bod {
- margin: auto;
- max-width: 70rem;
- padding: 0 1rem;
- }
- .asterisk {
- font-style: italic;
- font-size: small;
- text-align: right;
- }
- .asterisk a {
- text-decoration: none;
- }
- .asterisk a:hover {
- text-decoration: underline;
- }
- a.totop {
- float: right;
- text-decoration: none !important;
- color: transparent !important;
- }
- a.totop:hover {
- color: #999 !important;
- }
- a.totop::after {
- content: " ↑";
- font-weight: bold;
- color: #999 !important;
- }
- .feat { background-color: #222;
- color: #fff;
- margin-top: 5em;
- padding: 1em 0 2.5em 0;
- }
- .feat a {
- color: #fff;
- }
- .feat code {
- background-color: #111;
- }
- h2 {
- margin: 1em 0;
- padding-top: 1em;
- }
- p, ol, ul, dl {
- margin: 1.6em 0;
- line-height: 1.8em;
- }
- a { color: #333; }
- a:hover { text-decoration: underline; }
- a:img { border: none; }
- code {
- padding: .8ex;
- background-color: #333;
- border-radius: .5ex;
- font-size: 110%;
- color: #fff; }
- code a { color: #fff; }
- dl { margin-left: 2em; }
- dt { font-weight: bold; }
- dd { margin: 1ex 0 2em 1em; }
- li { margin-top: 1ex; }
- a:hover .logo {
- opacity: .8;
- }
- .alert {
- position: fixed;
- left: 0;
- top: 0;
- width: 100%;
- margin: 0;
- padding: .5ex;
- color: #fff;
- background: #c00;
- font-size: large;
- box-shadow: 0 .1em 1em rgba(0,0,0,1);
- text-align: center;
- z-index: 10;
- }
- .alert:before {
- content: "\26A0 ";
- font-size: large;
- }
- .alert.good {
- color: #fff;
- background: #0c0;
- }
- .alert.good:before {
- content: none;
- }
- </style>
- </head>
- <body>
- <img
- src="https://guix.gnu.org/static/base/img/Guix.png"
- style="display:block; margin: 0 auto 1em auto" />
- <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>
-
- <div style="font-size: x-large;">
- <p>
- Availability for <b>x86_64-linux</b>, <b>i686-linux</b>,
- <b>aarch64-linux</b>, <b>armhf-linux</b> and
- <b>powerpc64le-linux</b> should be good. <b>i586-gnu</b>
- substitutes are a work in progress.
- </p>
-
- <p>
- Cross built packages from x86_64-linux to <b>i586-pc-gnu</b>,
- <b>aarch64-linux-gnu</b> and <b>arm-linux-gnueabihf</b> are
- also available.
- </p>
- </div>
-
- <h2>Using these substitutes</h2>
- <p>
- bordeaux.guix.gnu.org is a default substitute server in recent
- versions of Guix, so no manual configuration should be
- necessary.
- </p>
- <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>
-
- <h3>On a Guix System</h3>
- <p>
- With recent versions of Guix, the
- <code>%default-substitute-urls</code> and
- <code>%default-authorized-guix-keys</code> should include
- bordeaux.guix.gnu.org, so no extra configuration should be
- necessary.
- </p>
- </body>
-</html>