-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #159 from deNBI/staging
Staging
- Loading branch information
Showing
62 changed files
with
2,188 additions
and
6,105 deletions.
There are no files selected for viewing
This file contains 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,25 +1,13 @@ | ||
# Your Login to Perun | ||
OS_CREDITS_PERUN_LOGIN= | ||
# Corresponding Password | ||
OS_CREDITS_PERUN_PASSWORD= | ||
# ID of your virtual organization | ||
OS_CREDITS_PERUN_VO_ID= | ||
# how to connect to the InfluxDB storing the prometheus data | ||
INFLUXDB_HOST=portal_influxdb | ||
INFLUXDB_USER=prometheus | ||
INFLUXDB_USER_PASSWORD=secret | ||
INFLUXDB_DB=portal_prometheus | ||
#TimescaleDB | ||
POSTGRES_DB=credits_db | ||
POSTGRES_PORT=5432 | ||
POSTGRES_USER=postgres | ||
POSTGRES_PASSWORD=password | ||
POSTGRES_HOST=timescaledb | ||
|
||
API_KEY="change-me-but-not-to-123" | ||
#API key to secure some endpoints | ||
API_KEY=super-secret | ||
|
||
# Semicolon-separated list of project/group names. | ||
# If set only those will be billed | ||
# OS_CREDITS_PROJECT_WHITELIST | ||
# How many worker tasks will process the queue. Default is 10 | ||
# OS_CREDITS_WORKERS=10 | ||
# Float precision of `credits_current` inside Perun | ||
# OS_CREDITS_PRECISION=2 | ||
# Cost of running one vCPU core for one hour | ||
# VCPU_CREDIT_PER_HOUR=1 | ||
# Cost of running one GB of RAM for one hour | ||
# RAM_CREDIT_PER_HOUR=0.3 | ||
METRICS_TO_BILL={"project_vcpu_usage": 1.0, "project_mb_usage": 0.3} | ||
|
||
ENDPOINTS_ONLY=True |
This file contains 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 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 |
---|---|---|
|
@@ -9,7 +9,7 @@ jobs: | |
uses: rokroskar/[email protected] | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUBSECRET2 }}" | ||
- uses: actions/checkout@v2.4.0 | ||
- uses: actions/checkout@v3.0.2 | ||
- name: Build with retry | ||
uses: Wandalen/[email protected] | ||
with: | ||
|
This file contains 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 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 |
---|---|---|
|
@@ -117,3 +117,5 @@ dmypy.json | |
# project specific settings | ||
.vim/ | ||
.nvimrc | ||
|
||
db_data |
This file contains 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 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 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 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 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,23 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
FILE=/docker-entrypoint-initdb.d/credits_db.dump | ||
|
||
psql -v ON_ERROR_STOP=1 -U postgres -d credits_db <<-EOSQL | ||
ALTER ROLE postgres SET client_encoding TO 'utf8'; | ||
ALTER ROLE postgres SET default_transaction_isolation TO 'read committed'; | ||
ALTER ROLE postgres SET timezone TO 'UTC'; | ||
GRANT ALL PRIVILEGES ON DATABASE credits_db TO postgres; | ||
CREATE EXTENSION IF NOT EXISTS timescaledb; | ||
EOSQL | ||
|
||
if test -f "$FILE"; then | ||
echo "got here" | ||
psql -v ON_ERROR_STOP=1 -U postgres -d credits_db <<-EOSQL | ||
SELECT timescaledb_pre_restore(); | ||
EOSQL | ||
psql -U postgres --set ON_ERROR_STOP=on -d credits_db -f /docker-entrypoint-initdb.d/credits_db.dump | ||
psql -v ON_ERROR_STOP=1 -U postgres -d credits_db <<-EOSQL | ||
SELECT timescaledb_post_restore(); | ||
EOSQL | ||
fi |
Oops, something went wrong.