This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Environment usage refactor #89
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
34246c4
misspleng corrected
xsalonx f14c2df
dockerfile renamed; refactor of docker env files
xsalonx b54d2c9
app's dockerfile update
xsalonx 43f6216
dockers files refactored
xsalonx 283497c
add error handling while fetching data
xsalonx 2bcad6a
endpoints configuration
xsalonx 8dbc75b
env for auto fetching refactored
xsalonx 22ee592
def value for env var
xsalonx 4732951
new vars
xsalonx 5e7e9eb
name refactor
xsalonx File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,5 @@ | ||
| name: Tests | ||
|
|
||
| ## TODO | ||
| on: | ||
| pull_request: | ||
| push: | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| /** | ||
| * | ||
| * @license | ||
| * Copyright 2019-2020 CERN and copyright holders of ALICE O2. | ||
| * See http://alice-o2.web.cern.ch/copyright for details of the copyright holders. | ||
| * All rights not expressly granted are reserved. | ||
| * | ||
| * This software is distributed under the terms of the GNU General Public | ||
| * License v3 (GPL Version 3), copied verbatim in the file "COPYING". | ||
| * | ||
| * In applying this license CERN does not waive the privileges and immunities | ||
| * granted to it by virtue of its status as an Intergovernmental Organization | ||
| * or submit itself to any jurisdiction. | ||
| */ | ||
| const ResProvider = require('../lib/ResProvider.js'); | ||
|
|
||
| const services = { | ||
| bookkeeping: { | ||
| url: { | ||
| rct: 'http://rct-bookkeeping.cern.ch:4000/api/runs', | ||
| ali: ResProvider.endpointFor('BK_RUNS'), | ||
| }, | ||
| }, | ||
| monalisa: { | ||
| url: { | ||
| dataPassesRaw: ResProvider.endpointFor('ML_DP_RAW'), | ||
| dataPassesDetailed: ResProvider.endpointFor('ML_DP_DET'), | ||
|
|
||
| mcRaw: ResProvider.endpointFor('ML_MC_RAW'), | ||
| mcDetailed: ResProvider.endpointFor('ML_MC_DET'), | ||
| mcDetTag: ResProvider.endpointFor('ML_MC_TAG'), | ||
| }, | ||
| }, | ||
| }; | ||
|
|
||
| /* | ||
| * Endpoints bases | ||
| * ali: 'https://ali-bookkeeping.cern.ch/api/runs?filter[definitions]=PHYSICS', | ||
| * dataPassesRaw: 'https://alimonitor.cern.ch/production/raw.jsp?res_path=json', | ||
| * dataPassesDetailed: 'https://alimonitor.cern.ch/raw/raw_details.jsp?timesel=0&res_path=json', | ||
| * mcRaw: 'https://alimonitor.cern.ch/MC/?res_path=json', | ||
| * mcDetailed: 'https://alimonitor.cern.ch/job_events.jsp?timesel=0&res_path=json', | ||
| * mcDetTag: 'https://alimonitor.cern.ch/MC/prodDetails.jsp?res_path=json', | ||
| */ | ||
|
|
||
| // LHC21i3f3 | ||
| // eslint-disable-next-line max-len | ||
| //E rawDataDetalied: 'https://alimonitor.cern.ch/production/raw_details.jsp?timesel=0&filter_jobtype=OCT+-+async+production+for+pilot+beam+pass+3%2C+O2-2763&res_path=json', | ||
| // eslint-disable-next-line max-len | ||
| //E mcRawDataDetailed: 'https://alimonitor.cern.ch/job_events.jsp?timesel=0&owner=aliprod&filter_jobtype=Pb-Pb%2C+5.02+TeV+-+HIJING+%2B+nuclei+Geant4+with+modified+material+budget+%2B4.5%+(Pb-Pb+Pass3)%2C+50-90%+centrality%2C+ALIROOT-8784&res_path=json', | ||
|
|
||
| module.exports = services; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| FROM postgres:14.2-bullseye as base | ||
|
|
||
| WORKDIR /postgres/run | ||
|
|
||
| FROM base as development | ||
| RUN apt update -y && \ | ||
| apt install -y \ | ||
| sudo \ | ||
| procps \ | ||
| inotify-tools | ||
|
|
||
| FROM base as test | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,96 @@ | ||
| ENV_MODE=dev | ||
| RUNNING_ENV=DOCKER | ||
|
|
||
| ## loggin | ||
| RCT_LOG_FILENAME=${RCT_LOG_FILENAME:-reports/rctlogs.txt} | ||
| RCT_LOG_FILE_LOGLEV=${RCT_LOG_FILE_LOGLEV:-warn} | ||
| RCT_LOG_CONSOLE_LOGLEV=${RCT_LOG_CONSOLE_LOGLEV:-debug} | ||
| RCT_LOG_CONSOLE_SYSD=${RCT_LOG_CONSOLE_SYSD:-} | ||
|
|
||
| ## http server | ||
| RCT_HTTP_PORT=${RCT_HTTP_PORT:-8081} | ||
| RCT_HOSTNAME=${RCT_HOSTNAME:-localhost} | ||
| RCT_TLS_ENABLED=${RCT_TLS_ENABLED:-false} | ||
|
|
||
| RCT_JWT_SECRET=${RCT_JWT_SECRET:-secret} | ||
| RCT_JWT_EXPIRATION=${RCT_JWT_EXPIRATION:-2h} | ||
|
|
||
| ## external services connections | ||
| RCT_SYNC_TASK_AT_START=${RCT_SYNC_TASK_AT_START:-false} | ||
|
|
||
| RCT_CERT_PATH=${RCT_CERT_PATH:-} | ||
| ALIMONITOR_PASSPHRASE=${ALIMONITOR_PASSPHRASE:-} | ||
| CERN_SOCKS=${CERN_SOCKS:-true} | ||
|
|
||
| ### endpoints | ||
| _DEF_BK_HOST=ali-bookkeeping.cern.ch | ||
| _DEF_ML_HOST=alimonitor.cern.ch | ||
| _DEF_PORT=443 | ||
| _DEF_ML_PROT=https | ||
|
|
||
| ### bkp | ||
| RCT_EP_BK_RUNS_PROT=https | ||
| RCT_EP_BK_RUNS_HOST=${RCT_EP_BK_RUNS_HOST:-$_DEF_BK_HOST} | ||
| RCT_EP_BK_RUNS_PORT=${RCT_EP_BK_RUNS_PORT:-$_DEF_PORT} | ||
| RCT_EP_BK_RUNS_PATH=${RCT_EP_BK_RUNS_PATH:-/api/runs?filter[definitions]=PHYSICS} | ||
|
|
||
|
|
||
| ### data passes | ||
| RCT_EP_ML_DP_RAW_PROT=$_DEF_ML_PROT | ||
| RCT_EP_ML_DP_RAW_HOST=${RCT_EP_ML_DP_RAW_HOST:-$_DEF_ML_HOST} | ||
| RCT_EP_ML_DP_RAW_PORT=${RCT_EP_ML_DP_RAW_PORT:-$_DEF_PORT} | ||
| RCT_EP_ML_DP_RAW_PATH=${RCT_EP_ML_DP_RAW_PATH:-/production/raw.jsp?res_path=json} | ||
|
|
||
|
|
||
| RCT_EP_ML_DP_DET_PROT=$_DEF_ML_PROT | ||
| RCT_EP_ML_DP_DET_HOST=${RCT_EP_ML_DP_DET_HOST:-$_DEF_ML_HOST} | ||
| RCT_EP_ML_DP_DET_PORT=${RCT_EP_ML_DP_DET_PORT:-$_DEF_PORT} | ||
| RCT_EP_ML_DP_DET_PATH=${RCT_EP_ML_DP_DET_PATH:-/raw/raw_details.jsp?timesel=0&res_path=json} | ||
|
|
||
|
|
||
| ### simulation passes | ||
| RCT_EP_ML_MC_RAW_PROT=$_DEF_ML_PROT | ||
| RCT_EP_ML_MC_RAW_HOST=${RCT_EP_ML_MC_RAW_HOST:-$_DEF_ML_HOST} | ||
| RCT_EP_ML_MC_RAW_PORT=${RCT_EP_ML_MC_RAW_PORT:-$_DEF_PORT} | ||
| RCT_EP_ML_MC_RAW_PATH=${RCT_EP_ML_MC_RAW_PATH:-/MC/?res_path=json} | ||
|
|
||
| RCT_EP_ML_MC_DET_PROT=$_DEF_ML_PROT | ||
| RCT_EP_ML_MC_DET_HOST=${RCT_EP_ML_MC_DET_HOST:-$_DEF_ML_HOST} | ||
| RCT_EP_ML_MC_DET_PORT=${RCT_EP_ML_MC_DET_PORT:-$_DEF_PORT} | ||
| RCT_EP_ML_MC_DET_PATH=${RCT_EP_ML_MC_DET_PATH:-/job_events.jsp?timesel=0&res_path=json} | ||
|
|
||
| RCT_EP_ML_MC_TAG_PROT=$_DEF_ML_PROT | ||
| RCT_EP_ML_MC_TAG_HOST=${RCT_EP_ML_MC_TAG_HOST:-$_DEF_ML_HOST} | ||
| RCT_EP_ML_MC_TAG_PORT=${RCT_EP_ML_MC_TAG_PORT:-$_DEF_PORT} | ||
| RCT_EP_ML_MC_TAG_PATH=${RCT_EP_ML_MC_TAG_PATH:-/MC/prodDetails.jsp?res_path=json} | ||
|
|
||
|
|
||
| ## openid | ||
| RCT_OPENID_ID=${RCT_OPENID_ID:-} | ||
| RCT_OPENID_SECRET=${RCT_OPENID_SECRET:-} | ||
| RCT_OPENID_REDIRECT=${RCT_OPENID_REDIRECT:-} | ||
| RCT_OPENID_WELL_KNOWN=${RCT_OPENID_WELL_KNOWN:-} | ||
|
|
||
|
|
||
| ## database configuration | ||
| ### common vars | ||
| RCT_DB_HOST=${RCT_DB_HOST:-o2-rct_database} | ||
| RCT_DB_UNIXSS=${RCT_DB_UNIXSS:-/var/run/postgresql} | ||
| RCT_DB_NAME=${RCT_DB_NAME:-rct-db} | ||
| RCT_DB_PORT=5432 | ||
| RCT_DB_USERNAME=${RCT_DB_USERNAME:-rct-user} | ||
| RCT_DB_PASSWORD=${RCT_DB_PASSWORD:-rct-passwd} | ||
|
|
||
| ### docker contatiner conf | ||
| POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-postgres} | ||
| POSTGRES_USER=${POSTGRES_USER:-postgres} | ||
| POSTGRES_DB=${POSTGRES_DB:-postgres} | ||
| PGDATA=${PGDATA:-/var/lib/postgresql/data/pgdata} | ||
| POSTGRES_HOST_AUTH_METHOD=scram-sha-256 | ||
|
|
||
| MOCK_DB=${MOCK_DB:-false} | ||
| OTHER_SQL_MODIFY_DAEMON=${OTHER_SQL_MODIFY_DAEMON:-true} | ||
| MAIN_SQL_MODIFY_DAEMON=${MAIN_SQL_MODIFY_DAEMON:-true} | ||
|
|
||
|
|
||
|
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.