aboutsummaryrefslogtreecommitdiff
path: root/genenetwork
diff options
context:
space:
mode:
authorArun Isaac2022-10-30 15:27:41 +0530
committerArun Isaac2022-10-30 15:27:41 +0530
commit8551e00e778269b26ae417873d6deece29b1d244 (patch)
treecf4575fecb047f491796cd6e287a7281ce6cf37d /genenetwork
parent688ae928d748676ba95a3ec9cfffea9e4bd9eba8 (diff)
downloadgn-machines-8551e00e778269b26ae417873d6deece29b1d244.tar.gz
Unite genenetwork2 and genenetwork3 development servers.
We unite the genenetwork2 and genenetwork3 development servers into a single Guix service. This unifies many of the configuration settings and simplifies the configuration. Changes to the genenetwork3 repository also immediately reflect in the genenetwork2 continuous deployment without guix-bioinformatics having to be updated. * genenetwork-development.scm (<development-server-configuration>): Delete type. (<genenetwork-configuration>): New type. (development-server-redeploy, development-server-activation, genenetwork2-project, genenetwork2-shepherd-service, genenetwork3-project, genenetwork3-shepherd-service): Delete functions. (genenetwork2-tests): Accept <genenetwork-configuration> object instead of <forge-project> object. (%genotype-files, %xapian-db-path, %default-genenetwork2-configuration, genenetwork2-service-type, %default-genenetwork3-configuration, genenetwork3-service-type): Delete variables. (genenetwork-projects, genenetwork2-cd-gexp, genenetwork3-cd-gexp, genenetwork-shepherd-services): New functions. (operating-system)[services]: Replace genenetwork2 and genenetwork3 services with the unified genenetwork service. * genenetwork/development-helper.scm (genenetwork2-runner-gexp, genenetwork3-runner-gexp): Delete functions.
Diffstat (limited to 'genenetwork')
-rw-r--r--genenetwork/development-helper.scm52
1 files changed, 0 insertions, 52 deletions
diff --git a/genenetwork/development-helper.scm b/genenetwork/development-helper.scm
index 9bf737d..e65f9da 100644
--- a/genenetwork/development-helper.scm
+++ b/genenetwork/development-helper.scm
@@ -101,55 +101,3 @@ with genenetwork3 dependencies."
(find-files "." shell-script?))
(invoke "pylint" "gn3"))
(mkdir-p #$output)))))
-
-(define (genenetwork2-runner-gexp genenetwork2-source profile gn3-port
- genotype-files)
- "Return a G-expression that runs the genenetwork2 server for
-GENENETWORK2-SOURCE in PROFILE. GENENETWORK2-SOURCE is a checkout of
-the genenetwork2 source code. PROFILE is a profile with genenetwork2
-dependencies. GN3-PORT is the port on which a local instance of
-genenetwork3 is listening. GENOTYPE-FILES is the path to genotype
-files."
- (with-imported-modules '((guix build utils))
- (with-profile profile
- #~(begin
- (use-modules (guix build utils)
- (ice-9 match))
-
- (chdir #$genenetwork2-source)
- (match (command-line)
- ((_ ip port)
- (setenv "SERVER_PORT" port)
- (setenv "GN2_PROFILE" #$profile)
- (setenv "GN_PROXY_URL" "http://genenetwork.org/gn3-proxy/")
- (setenv "GN_SERVER_URL" "/api3")
- (setenv "GN3_LOCAL_URL"
- (string-append "http://localhost:"
- (number->string #$gn3-port)))
- (setenv "GENENETWORK_FILES" #$genotype-files)
- (setenv "SQL_URI" "mysql://webqtlout:webqtlout@localhost/db_webqtl")
- (setenv "HOME" "/tmp")
- (setenv "NO_REDIS" "no-redis")
- (setenv "RUST_BACKTRACE" "1")
- (invoke "sh" "bin/genenetwork2" "etc/default_settings.py" "-gunicorn-prod")))))))
-
-(define (genenetwork3-runner-gexp genenetwork3-source config-file profile)
- "Return a G-expression that runs the genenetwork3 server for
-GENENETWORK3-SOURCE in PROFILE. GENENETWORK3-SOURCE is a checkout of
-the genenetwork3 source code. CONFIG-FILE is a file containing
-configuration settings for genenetwork3. PROFILE is a profile with
-genenetwork3 dependencies."
- (with-imported-modules '((guix build utils))
- (with-profile profile
- #~(begin
- (use-modules (guix build utils)
- (ice-9 match))
-
- (chdir #$genenetwork3-source)
- (setenv "GN3_CONF" #$config-file)
- (setenv "HOME" "/tmp")
- (match (command-line)
- ((_ ip port)
- (invoke "gunicorn"
- "-b" (string-append ip ":" port)
- "gn3.app:create_app()")))))))