From aff5ab532bf6d8b8fffad196a92783ce945366e0 Mon Sep 17 00:00:00 2001 From: Carlos Downie <42552189+downiec@users.noreply.github.com> Date: Thu, 9 Jan 2025 14:30:59 -0800 Subject: [PATCH] Updated documentation references to config variables (#706) * Updated documentation, specifically references to the configuration parameters which have changed over time, to use the latest variable names currently used in configuration. Updated requirements to use the latest readthedocs them of Sphinx * Update version number, add version changelog (to be updated with the changes that will be included in this update) --- .../getting_started_production.md | 31 +++++++------------ docs/requirements.txt | 2 ++ frontend/.envs/.react | 4 --- 3 files changed, 13 insertions(+), 24 deletions(-) diff --git a/docs/docs/contributors/getting_started_production.md b/docs/docs/contributors/getting_started_production.md index c44d09f33..547de7f6e 100644 --- a/docs/docs/contributors/getting_started_production.md +++ b/docs/docs/contributors/getting_started_production.md @@ -32,20 +32,20 @@ NOTE: You can easily generate a secret key with Python using this command: | ---------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | =========== TREAFIK CONFIG ============= | | `DOMAIN_NAME` | The domain linked to the server hosting the Metagrid site. | | string | `DOMAIN_NAME=esgf-dev1.llnl.gov`

Local environment:
`DOMAIN_NAME=localhost` | +| `DOMAIN_SUBDIRECTORY` | The domain subdirectory that is proxied to the Django site (e.g. _esgf-dev1.llnl.gov/metagrid-backend_). Omit backslash and match backend rules' `PathPrefix` in `traefik.yml`. | | string | `DOMAIN_SUBDIRECTORY=metagrid-backend` | | `PUBLIC_URL` | **OPTIONAL** The domain subdirectory that is used to serve the front-end. Leave blank if you want users to access the app from the domain directly. | | string | `DOMAIN_SUBDIRECTORY=metagrid` | -| `DOMAIN_SUBDIRECTORY` | **OPTIONAL** The domain subdirectory that is proxied to the Django site (e.g. _esgf-dev1.llnl.gov/metagrid-backend_). Omit backslash and match backend rules' `PathPrefix` in `traefik.yml`. | | string | `DOMAIN_SUBDIRECTORY=metagrid-backend` | | =========== BACKEND CONFIG ============= | -| `DJANGO_SECRET_KEY` | A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. | [Link](https://docs.djangoproject.com/en/3.0/ref/settings/#secret-key) | string | `DJANGO_SECRET_KEY=YAFKApvifkIFTw0DDNQQdHI34kyQdyWH89acWTogCfm4SGRz2x` | +| `DJANGO_SECRET_KEY` | A secret key for a particular Django installation. This is used to provide cryptographic signing, and should be set to a unique, unpredictable value. | [Link](https://docs.djangoproject.com/en/3.0/ref/settings/#secret-key) | string | `DJANGO_SECRET_KEY=example_secret_key_gCfm4SGRz2x` | | `DJANGO_ADMIN_URL` | The url to access the Django Admin page. It should be set to a unique, unpredictable value (not `admin/`). Take note of this value in order to access the admin page later on. For example with the settings shown here you would go to: https://esgf-dev1.llnl.gov/metagrid-backend/example_admin_url_87261847395 to access the admin site. Then you would use the admin credentials created when creating a django superuser (explained further below). | | string | `DJANGO_ADMIN_URL=example_admin_url_87261847395` | | `DJANGO_ALLOWED_HOSTS` | A list of strings representing the host/domain names that this Django site can serve. This is a security measure to prevent HTTP Host header attacks, which are possible even under many seemingly-safe web server configurations. | [Link](https://docs.djangoproject.com/en/3.0/ref/settings/#allowed-hosts) | array of strings | `DJANGO_ALLOWED_HOSTS=esgf-dev1.llnl.gov`

Local environment:
`DJANGO_ALLOWED_HOSTS=localhost` | | `KEYCLOAK_URL` | The url of your hosted Keycloak server, it must end with `/auth`. | [Link](https://django-allauth.readthedocs.io/en/latest/providers.html#keycloak) | string | `KEYCLOAK_URL=https://keycloak.metagrid.com/auth` | | `KEYCLOAK_REALM` | The name of the Keycloak realm you want to use. | [Link](https://django-allauth.readthedocs.io/en/latest/providers.html#keycloak) | string | `KEYCLOAK_REALM=esgf` | | `KEYCLOAK_CLIENT_ID` | The id for the Keycloak client, which is the entity that can request Keycloak to authenticate a user. | | string | `KEYCLOAK_CLIENT_ID=metagrid-backend` | | ========== FRONTEND CONFIG ============= | -| `REACT_APP_METAGRID_URL` | The URL for the MetaGrid API used to query projects, users, etc. | | string | `REACT_APP_METAGRID_API_URL=https://esgf-dev1.llnl/metagrid-backend`

Local environment:
`REACT_APP_METAGRID_API_URL=http://localhost:8000` | +| `REACT_APP_METAGRID_API_URL` | The URL for the MetaGrid API used to query projects, users, etc. | | string | `REACT_APP_METAGRID_API_URL=https://esgf-dev1.llnl/metagrid-backend`

Local environment:
`REACT_APP_METAGRID_API_URL=http://localhost:8000` | | `REACT_APP_WGET_API_URL` | The URL for the ESGF wget API to generate a wget script for downloading selected datasets. | [Link](https://github.com/ESGF/esgf-wget) | string | `REACT_APP_WGET_API_URL=https://pcmdi8vm.llnl.gov/wget` | -| `REACT_APP_ESGF_NODE_URL` | The URL for the ESGF Search API node used to query datasets, files, and facets. | [Link](https://github.com/ESGF/esgf.github.io/wiki/ESGF_Search_REST_API) | string | `REACT_APP_ESGF_NODE_URL=https://esgf-node.llnl.gov` | -| `REACT_APP_ESGF_NODE_STATUS` | The URL for the ESGF node status API node used to query node status. | | string | `REACT_APP_ESGF_NODE_STATUS_URL=https://aims4.llnl.gov/prometheus/api/v1/query?query=probe_success%7Bjob%3D%22http_2xx%22%2C+target%3D~%22.%2Athredds.%2A%22%7D` | +| `REACT_APP_SEARCH_URL` | The URL for the ESGF Search API node used to query datasets, files, and facets. | [Link](https://github.com/ESGF/esgf.github.io/wiki/ESGF_Search_REST_API) | string | `REACT_APP_SEARCH_URL=https://esgf-node.llnl.gov` | +| `REACT_APP_ESGF_NODE_STATUS_URL` | The URL for the ESGF node status API node used to query node status. | | string | `REACT_APP_ESGF_NODE_STATUS_URL=https://aims4.llnl.gov/prometheus/api/v1/query?query=probe_success%7Bjob%3D%22http_2xx%22%2C+target%3D~%22.%2Athredds.%2A%22%7D` | | `REACT_APP_KEYCLOAK_URL` | The url of your hosted Keycloak server, it must end with `/auth`. | | string | `REACT_APP_KEYCLOAK_URL=https://keycloak.metagrid.com/auth` | | `REACT_APP_KEYCLOAK_REALM` | The name of the Keycloak realm you want to use. | | string | `REACT_APP_KEYCLOAK_REALM=esgf` | | `REACT_APP_KEYCLOAK_CLIENT_ID` | The id for the Keycloak client, which is an entity that can request Keycloak to authenticate a user. | | string | `REACT_APP_KEYCLOAK_CLIENT_ID=frontend` | @@ -53,12 +53,11 @@ NOTE: You can easily generate a secret key with Python using this command: | `REACT_APP_HOTJAR_SV` | **OPTIONAL**
The snippet version of the Tracking Code you are using. This is only needed if Hotjar ever updates the Tracking Code and needs to discontinue older ones. Knowing which version your site includes allows Hotjar team to contact you and inform you accordingly. | [Link](https://github.com/abdalla/react-hotjar) | number | `REACT_APP_HOTJAR_SV=6` | | `REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID` | **OPTIONAL**
Google Analytics tracking id. | [Link](https://github.com/react-ga/react-ga#api) | string | `REACT_APP_GOOGLE_ANALYTICS_TRACKING_ID=UA-000000-01` | -### Example Production Configuration - v1.0.10 +### Example Production Configuration - v1.2.2 ``` # =====================TREAFIK CONFIG===================== - DOMAIN_NAME=esgf-dev1.llnl.gov PUBLIC_URL= # Not used, should this be deprecated @@ -118,14 +117,7 @@ REACT_APP_GLOBUS_NODES=aims3.llnl.gov,esgf-data1.llnl.gov,esgf-data2.llnl.gov # https://github.com/ESGF/esgf-wget -REACT_APP_GLOBUS_SCRIPT_URL=https://greyworm1-rh7.llnl.gov/globusscript - -# ESGF Search API -# https://esgf.github.io/esg-search/ESGF_Search_RESTful_API.html - -#REACT_APP_WGET_API_URL=https://esgf-fedtest.llnl.gov/esg-search/wget -REACT_APP_WGET_API_URL=https://greyworm1-rh7.llnl.gov/wget -#REACT_APP_WGET_API_URL=https://esgf-node.llnl.gov/esg-search/wget +REACT_APP_WGET_API_URL=https://esgf-node.llnl.gov/esg-search/wget # ESGF Search API @@ -154,7 +146,7 @@ REACT_APP_DJANGO_LOGIN_URL=http://esgf-dev1.llnl.gov/metagrid-backend/login/glob REACT_APP_DJANGO_LOGOUT_URL=http://esgf-dev1.llnl.gov/metagrid-backend/proxy/globus-logout/ # Authentication Method - switch to keycloak or globus -REACT_APP_AUTHENTICATION_METHOD=keycloak +REACT_APP_AUTHENTICATION_METHOD=globus # https://docs.djangoproject.com/en/4.2/ref/settings/#logout-redirect-url DJANGO_LOGIN_REDIRECT_URL=http://esgf-dev1.llnl.gov/search @@ -162,8 +154,7 @@ DJANGO_LOGOUT_REDIRECT_URL=http://esgf-dev1.llnl.gov/search # https://app.globus.org/settings/developers/registration/confidential_client # Generate these at Globus, this is a confidential client -GLOBUS_CLIENT_KEY=25e75a79-7d31-41bd-b1df-0668f7a42d91 -#c111e306-ad45-49ef-af54-6b107ab592ff +GLOBUS_CLIENT_KEY= GLOBUS_CLIENT_SECRET= @@ -172,8 +163,8 @@ GLOBUS_CLIENT_SECRET= # https://github.com/abdalla/react-hotjar -REACT_APP_HOTJAR_ID=2079136 -REACT_APP_HOTJAR_SV=6 +REACT_APP_HOTJAR_ID=1234567 +REACT_APP_HOTJAR_SV=1 # react-ga diff --git a/docs/requirements.txt b/docs/requirements.txt index 44d40820b..fec67370c 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,2 +1,4 @@ mkdocs==1.4.2 # https://www.mkdocs.org/ mdx_truly_sane_lists==1.3 # https://github.com/radude/mdx_truly_sane_lists +sphinx==4.3.2 # https://www.sphinx-doc.org/ +sphinx_rtd_theme==1.0.0 # https://github.com/readthedocs/sphinx_rtd_theme diff --git a/frontend/.envs/.react b/frontend/.envs/.react index 64f0af1c3..ee8aa79d6 100644 --- a/frontend/.envs/.react +++ b/frontend/.envs/.react @@ -3,10 +3,6 @@ # Redirect the frontend to home page when old subdirectory is used (optional) REACT_APP_PREVIOUS_URL=metagrid -# MetaGrid API -# https://github.com/aims-group/metagrid/tree/master/backend -REACT_APP_METAGRID_API_URL= - # Authentication Method REACT_APP_AUTHENTICATION_METHOD=globus