summaryrefslogtreecommitdiff
path: root/issues
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2023-06-05 08:01:56 +0300
committerFrederick Muriuki Muriithi2023-06-05 08:01:56 +0300
commitff14a191c5426c43e06ae2804683a79eda5cf084 (patch)
treef3756187f2c6087b9da85115ce667106a80e387f /issues
parente150d090bf74e3214eab98699bd60c105bfa31e4 (diff)
downloadgn-gemtext-ff14a191c5426c43e06ae2804683a79eda5cf084.tar.gz
issue: Proposition for more flexible configs.
Diffstat (limited to 'issues')
-rw-r--r--issues/CI-CD/configurations.gmi47
1 files changed, 47 insertions, 0 deletions
diff --git a/issues/CI-CD/configurations.gmi b/issues/CI-CD/configurations.gmi
new file mode 100644
index 0000000..eed8935
--- /dev/null
+++ b/issues/CI-CD/configurations.gmi
@@ -0,0 +1,47 @@
+# Configurations
+
+## Tags
+
+* assigned: aruni, fredm
+* priority: normal
+* status: open
+* keywords: CI, CD, configuration, config
+* type: bug
+
+## Description
+
+There are configurations that change depending on the environment that one runs the CI/CD container. Some examples:
+
+* GN_SERVER_URL: on CI/CD it is set up as "http://cd.genenetwork.org/api3/" but this is not valid for, say, the development environments and eventually production.
+* SQL_URI: This can change from environment to environment
+* OAUTH2_CLIENT_ID: A identifier for an authorised client
+* OAUTH2_CLIENT_SECRET: A password the client uses to authenticate itself
+
+Some of these, e.g. `OAUTH2_CLIENT_SECRET` are sensitive data that should not be exposed to the public.
+
+I propose, therefore that we provide, say, a
+```
+... --share=/path/to/configs/directory/
+```
+from where the applications in the container can read their configurations from. The config file(s) in the directory can then contain relevant settings for the environment where the container is run.
+
+The applications (gn2, gn3, qc-app, etc) can then be pointed to the relevant config files in their g-exps: e.g.
+
+Instead of
+=> https://github.com/genenetwork/genenetwork-machines/blob/67d3f5dc46422c6b1812547109680c147fdde341/genenetwork-development.scm#L317-L318 using the defaults that are overridden
+we could have the code do something like:
+
+```
+...
+
+(define %configs-dir "/export/data/configs")
+
+...
+
+ (with-directory-excursion "genenetwork2"
+ (invoke #$(file-append bash "/bin/sh")
+ "bin/genenetwork2"
+ #$(file-append %configs-dir "/gn2_config.conf")
+ "-gunicorn-prod"))
+```
+where file `/export/data/configs/gn2_config.conf` holds the configurations for the application in the environment where the guix system container is run.