aboutsummaryrefslogtreecommitdiff
path: root/genenetwork-development.scm
diff options
context:
space:
mode:
authorArun Isaac2024-01-05 15:34:26 +0000
committerArun Isaac2024-01-05 15:34:26 +0000
commitcc92203f1fd6004c8b87a4a3ed9bd70616af7175 (patch)
tree97e985ed3f1b886ad217c86ac5f7b0331dc07f30 /genenetwork-development.scm
parent9b38443da7c4075cda666726f04f0daff1433dc1 (diff)
downloadgn-machines-cc92203f1fd6004c8b87a4a3ed9bd70616af7175.tar.gz
Abstract out gn2/gn3 secrets as configuration fields.
* genenetwork-development.scm (<genenetwork-configuration>)[gn2-secrets, gn3-secrets]: New fields. * genenetwork-development.scm (genenetwork2-cd-gexp): Use gn2-secrets configuration field. (genenetwork3-cd-gexp): Use gn3-secrets configuration field. (operating-system)[services]: Set gn2-secrets and gn3-secrets fields in genenetwork configuration.
Diffstat (limited to 'genenetwork-development.scm')
-rw-r--r--genenetwork-development.scm16
1 files changed, 11 insertions, 5 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm
index 56b9373..59fbf37 100644
--- a/genenetwork-development.scm
+++ b/genenetwork-development.scm
@@ -1,5 +1,5 @@
;;; genenetwork-machines --- Guix configuration for genenetwork machines
-;;; Copyright © 2022, 2023 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2022–2024 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2022, 2023 Frederick Muriuki Muriithi <fredmanglis@gmail.com>
;;;
;;; This file is part of genenetwork-machines.
@@ -125,6 +125,10 @@ be imported into G-expressions."
(default 8083))
(gn-auth-port genenetwork-configuration-gn-auth-port
(default 8084))
+ (gn2-secrets genenetwork-configuration-gn2-secrets
+ (default "/etc/genenetwork/gn2-secrets.py"))
+ (gn3-secrets genenetwork-configuration-gn3-secrets
+ (default "/etc/genenetwork/gn3-secrets.py"))
(genotype-files genenetwork-configuration-genotype-files
(default "/var/genenetwork/genotype-files"))
(sparql-endpoint genenetwork-configuration-sparql-endpoint
@@ -423,7 +427,7 @@ genenetwork3 source from the latest commit of @var{project}."
"Return a G-expression that runs the latest genenetwork2 development
server described by CONFIG, a <genenetwork-configuration> object."
(match-record config <genenetwork-configuration>
- (gn2-repository gn3-repository gn2-port gn3-port genotype-files)
+ (gn2-repository gn3-repository gn2-port gn3-port gn2-secrets genotype-files)
(with-packages (list coreutils git-minimal gunicorn nss-certs)
(with-imported-modules '((guix build utils))
#~(begin
@@ -470,7 +474,7 @@ server described by CONFIG, a <genenetwork-configuration> object."
(setenv "NO_REDIS" "no-redis")
(setenv "RUST_BACKTRACE" "1")
(setenv "AUTH_SERVER_URL" "https://auth-cd.genenetwork.org/")
- (setenv "GN2_SECRETS" "/etc/genenetwork/conf/gn2/secrets.py")
+ (setenv "GN2_SECRETS" #$gn2-secrets)
;; Start genenetwork2.
(with-directory-excursion "genenetwork2"
@@ -481,7 +485,7 @@ server described by CONFIG, a <genenetwork-configuration> object."
"Return a G-expression that runs the latest genenetwork3 development
server described by CONFIG, a <genenetwork-configuration> object."
(match-record config <genenetwork-configuration>
- (gn3-repository gn3-port sparql-endpoint data-directory xapian-db-path auth-db-path)
+ (gn3-repository gn3-port gn3-secrets sparql-endpoint data-directory xapian-db-path auth-db-path)
(with-manifest (package->development-manifest genenetwork3)
(with-packages (list git-minimal nss-certs)
(with-imported-modules '((guix build utils))
@@ -510,7 +514,7 @@ server described by CONFIG, a <genenetwork-configuration> object."
"XAPIAN_DB_PATH=\"" xapian-db-path "\"\n"
"AUTH_DB=\"" auth-db-path "\"\n"))
(setenv "HOME" "/tmp")
- (setenv "GN3_SECRETS" "/etc/genenetwork/conf/gn3/secrets.py")
+ (setenv "GN3_SECRETS" #$gn3-secrets)
;; Run genenetwork3.
(with-directory-excursion "genenetwork3"
(show-head-commit)
@@ -1116,6 +1120,8 @@ gn-auth."
(gn2-port %genenetwork2-port)
(gn3-port %genenetwork3-port)
(gn-auth-port %gn-auth-port)
+ (gn2-secrets "/etc/genenetwork/conf/gn2/secrets.py")
+ (gn3-secrets "/etc/genenetwork/conf/gn3/secrets.py")
(genotype-files "/export/data/genenetwork/genotype_files")
(sparql-endpoint (string-append "http://localhost:"
(number->string %virtuoso-sparql-port)