From 7db19f97846ae70b2ae666023e8d79e68db7f75c Mon Sep 17 00:00:00 2001 From: ryanlovett Date: Wed, 21 Feb 2024 23:27:48 -0800 Subject: [PATCH] Set gh-scoped-creds vars in RStudio env. --- deployments/dlab/config/common.yaml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/deployments/dlab/config/common.yaml b/deployments/dlab/config/common.yaml index 70a142006..da0df7580 100644 --- a/deployments/dlab/config/common.yaml +++ b/deployments/dlab/config/common.yaml @@ -51,9 +51,19 @@ jupyterhub: singleuser: extraEnv: # Unset NotebookApp from hub/values. Necessary for recent lab versions. + JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp" + # Set gh-scoped-creds vars for R and Jupyter GH_SCOPED_CREDS_CLIENT_ID: Iv1.9b3b48abeb673056 GH_SCOPED_CREDS_APP_URL: https://github.com/apps/dlab-berkeley-datahub-access - JUPYTERHUB_SINGLEUSER_APP: "jupyter_server.serverapp.ServerApp" + extraFiles: + # Set gh-scoped-creds vars for RStudio too. RStudio drops most vars + # including those we set in extraEnv. + gh-scoped-creds: + mountPath: /etc/R/Rprofile.site.d/gh-scoped-creds.r + stringData: | + Sys.setenv(GH_SCOPED_CREDS_APP_URL = "Iv1.9b3b48abeb673056") + Sys.setenv(GH_SCOPED_CREDS_CLIENT_ID = "https://github.com/apps/dlab-berkeley-datahub-access") + mode: 0644 nodeSelector: hub.jupyter.org/pool-name: dlab-pool storage: