diff options
author | Arun Isaac | 2023-01-18 18:09:29 +0000 |
---|---|---|
committer | Arun Isaac | 2023-01-18 18:09:29 +0000 |
commit | 676c578ffe2d35197542f636eb21bae4a75d0057 (patch) | |
tree | 39831aaac333c9c0e2409cc2dec3e8985db78dbc /genenetwork-development.scm | |
parent | 442ec2370efa2dfb5f9c0405c167964bcc2478a4 (diff) | |
download | gn-machines-676c578ffe2d35197542f636eb21bae4a75d0057.tar.gz |
Add data directory to genenetwork configuration.
*
genenetwork-development.scm (<genenetwork-configuration>)[data-directory]:
New field.
(genenetwork3-cd-gexp): Set DATA_DIR in settings file.
(genenetwork-shepherd-services): Map data directory into container.
(operating-system)[services]: Set data-directory of genenetwork
service to /export/data/genenetwork.
* genenetwork-development-deploy.sh: Expose entire data directory
/export/data/genenetwork instead of the contained genotype files
directory.
Diffstat (limited to 'genenetwork-development.scm')
-rw-r--r-- | genenetwork-development.scm | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 3c34ccc..638d2c9 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -113,6 +113,8 @@ be imported into G-expressions." (default "/var/genenetwork/genotype-files")) (sparql-endpoint genenetwork-configuration-sparql-endpoint (default "http://localhost:8081/sparql")) + (data-directory genenetwork-data-directory + (default "/var/genenetwork")) (xapian-db-path genenetwork-xapian-db-path (default "/var/genenetwork/xapian"))) @@ -384,7 +386,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 xapian-db-path) + (gn3-repository gn3-port sparql-endpoint data-directory xapian-db-path) (with-manifest (package->development-manifest genenetwork3) (with-packages (list git-minimal nss-certs) (with-imported-modules '((guix build utils)) @@ -409,6 +411,7 @@ server described by CONFIG, a <genenetwork-configuration> object." (setenv "GN3_CONF" #$(mixed-text-file "gn3.conf" "SPARQL_ENDPOINT=\"" sparql-endpoint "\"\n" + "DATA_DIR=\"" data-directory "\"\n" "XAPIAN_DB_PATH=\"" xapian-db-path "\"\n")) (setenv "HOME" "/tmp") ;; Run genenetwork3. @@ -422,7 +425,7 @@ server described by CONFIG, a <genenetwork-configuration> object." "Return shepherd services to run the genenetwork development server described by CONFIG, a <genenetwork-configuration> object." (match-record config <genenetwork-configuration> - (gn2-port gn3-port genotype-files xapian-db-path) + (gn2-port gn3-port genotype-files data-directory xapian-db-path) (list (shepherd-service (documentation "Run GeneNetwork 2 development server.") (provision '(genenetwork2)) @@ -460,6 +463,9 @@ described by CONFIG, a <genenetwork-configuration> object." (target source) (writable? #t)) (file-system-mapping + (source data-directory) + (target source)) + (file-system-mapping (source xapian-db-path) (target source))) #:namespaces (delq 'net %namespaces)) @@ -938,6 +944,7 @@ reverse proxy tissue." (sparql-endpoint (string-append "http://localhost:" (number->string %virtuoso-sparql-port) "/sparql")) + (data-directory "/export/data/genenetwork") (xapian-db-path %xapian-directory))) (simple-service 'set-build-directory-permissions activation-service-type |