-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keep develop in sync with main #221
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
8fddb80
Recommendation for standalone Bridgehead
e4bc34c
Amended following Tobias' comments
cfa8506
initialize develop; add itcc and cce
4ab10ff
In ENVIRONMENT=production, use main tag for Samply.Beam.
lablans bc0f46e
Merge pull request #197 from samply/beam-tag
lablans 83b653e
feat: Configure beam-connect to trust ds-orchestrator beam proxy
Threated 33a2505
Move down, rephrase
lablans aca22fb
Merge pull request #144 from samply/documentation/sharing_vm
lablans 775cef5
Merge pull request #199 from samply/feat/ds-orchestrator
TKussel 4568e32
readme: Data protection group --> officer
lablans c585322
Merge pull request #226 from samply/main
PierreDelpy 6465dcb
feat: added dhki project
torbrenner 735e064
Update queries_to_cache.conf
PierreDelpy f0bdb5c
fix: re-add modules
77c870a
fix: fix bash path
969f1e7
fix: remove accidental commit
b1de626
Merge pull request #223 from samply/feat/add-dkfz-hector-ki-project
torbrenner 65359c2
Feature/pilot projects backup (#227)
PierreDelpy 24da24d
Traefik dashboard
lablans eb29558
fix: allow usage of centraxx interface without login
torbrenner 599bcfc
Feature/send branch to healthchecks (#232)
PierreDelpy f328e40
Merge pull request #233 from samply/fix/id-management-redirection
torbrenner 072ee34
fix: deactivate landingpage for KR project (#234)
PierreDelpy 3312ca8
feat: added blaze cql cache (#236)
patrickskowronekdkfz 7aaee5e
feat: add auto archiving action (#238)
PierreDelpy 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 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,39 @@ | ||
import os | ||
import requests | ||
from datetime import datetime, timedelta | ||
|
||
# Configuration | ||
GITHUB_TOKEN = os.getenv('GITHUB_TOKEN') | ||
REPO = 'samply/bridgehead' | ||
HEADERS = {'Authorization': f'token {GITHUB_TOKEN}', 'Accept': 'application/vnd.github.v3+json'} | ||
API_URL = f'https://api.github.com/repos/{REPO}/branches' | ||
INACTIVE_DAYS = 365 | ||
CUTOFF_DATE = datetime.now() - timedelta(days=INACTIVE_DAYS) | ||
|
||
# Fetch all branches | ||
def get_branches(): | ||
response = requests.get(API_URL, headers=HEADERS) | ||
response.raise_for_status() | ||
return response.json() if response.status_code == 200 else [] | ||
|
||
# Rename inactive branches | ||
def rename_branch(old_name, new_name): | ||
rename_url = f'https://api.github.com/repos/{REPO}/branches/{old_name}/rename' | ||
response = requests.post(rename_url, json={'new_name': new_name}, headers=HEADERS) | ||
response.raise_for_status() | ||
print(f"Renamed branch {old_name} to {new_name}" if response.status_code == 201 else f"Failed to rename {old_name}: {response.status_code}") | ||
|
||
# Check if the branch is inactive | ||
def is_inactive(commit_url): | ||
last_commit_date = requests.get(commit_url, headers=HEADERS).json()['commit']['committer']['date'] | ||
return datetime.strptime(last_commit_date, '%Y-%m-%dT%H:%M:%SZ') < CUTOFF_DATE | ||
|
||
# Rename inactive branches | ||
def main(): | ||
for branch in get_branches(): | ||
if is_inactive(branch['commit']['url']): | ||
#rename_branch(branch['name'], f"archived/{branch['name']}") | ||
print(f"[LOG] Branch '{branch['name']}' is inactive and would be renamed to 'archived/{branch['name']}'") | ||
|
||
if __name__ == "__main__": | ||
main() |
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,27 @@ | ||
name: Cleanup - Rename Inactive Branches | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * 0' # Runs every Sunday at midnight | ||
|
||
jobs: | ||
archive-stale-branches: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.x' | ||
|
||
- name: Install Libraries | ||
run: pip install requests | ||
|
||
- name: Run Script to Rename Inactive Branches | ||
run: | | ||
python .github/scripts/rename_inactive_branches.py | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
version: "3.7" | ||
|
||
services: | ||
blaze: | ||
image: docker.verbis.dkfz.de/cache/samply/blaze:0.28 | ||
container_name: bridgehead-cce-blaze | ||
environment: | ||
BASE_URL: "http://bridgehead-cce-blaze:8080" | ||
JAVA_TOOL_OPTIONS: "-Xmx${BLAZE_MEMORY_CAP:-4096}m" | ||
DB_RESOURCE_CACHE_SIZE: ${BLAZE_RESOURCE_CACHE_CAP:-2500000} | ||
DB_BLOCK_CACHE_SIZE: $BLAZE_MEMORY_CAP | ||
ENFORCE_REFERENTIAL_INTEGRITY: "false" | ||
volumes: | ||
- "blaze-data:/app/data" | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.blaze_cce.rule=PathPrefix(`/cce-localdatamanagement`)" | ||
- "traefik.http.middlewares.cce_b_strip.stripprefix.prefixes=/cce-localdatamanagement" | ||
- "traefik.http.services.blaze_cce.loadbalancer.server.port=8080" | ||
- "traefik.http.routers.blaze_cce.middlewares=cce_b_strip,auth" | ||
- "traefik.http.routers.blaze_cce.tls=true" | ||
|
||
focus: | ||
image: docker.verbis.dkfz.de/cache/samply/focus:${FOCUS_TAG} | ||
container_name: bridgehead-focus | ||
environment: | ||
API_KEY: ${FOCUS_BEAM_SECRET_SHORT} | ||
BEAM_APP_ID_LONG: focus.${PROXY_ID} | ||
PROXY_ID: ${PROXY_ID} | ||
BLAZE_URL: "http://bridgehead-cce-blaze:8080/fhir/" | ||
BEAM_PROXY_URL: http://beam-proxy:8081 | ||
RETRY_COUNT: ${FOCUS_RETRY_COUNT} | ||
EPSILON: 0.28 | ||
depends_on: | ||
- "beam-proxy" | ||
- "blaze" | ||
|
||
beam-proxy: | ||
image: docker.verbis.dkfz.de/cache/samply/beam-proxy:${BEAM_TAG} | ||
container_name: bridgehead-beam-proxy | ||
environment: | ||
BROKER_URL: ${BROKER_URL} | ||
PROXY_ID: ${PROXY_ID} | ||
APP_focus_KEY: ${FOCUS_BEAM_SECRET_SHORT} | ||
PRIVKEY_FILE: /run/secrets/proxy.pem | ||
ALL_PROXY: http://forward_proxy:3128 | ||
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs | ||
ROOTCERT_FILE: /conf/root.crt.pem | ||
secrets: | ||
- proxy.pem | ||
depends_on: | ||
- "forward_proxy" | ||
volumes: | ||
- /etc/bridgehead/trusted-ca-certs:/conf/trusted-ca-certs:ro | ||
- /srv/docker/bridgehead/cce/root.crt.pem:/conf/root.crt.pem:ro | ||
|
||
|
||
volumes: | ||
blaze-data: | ||
|
||
secrets: | ||
proxy.pem: | ||
file: /etc/bridgehead/pki/${SITE_ID}.priv.pem |
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,33 @@ | ||
version: "3.7" | ||
services: | ||
landing: | ||
container_name: lens_federated-search | ||
image: docker.verbis.dkfz.de/ccp/lens:${SITE_ID} | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.routers.landing.rule=PathPrefix(`/`)" | ||
- "traefik.http.services.landing.loadbalancer.server.port=80" | ||
- "traefik.http.routers.landing.tls=true" | ||
|
||
spot: | ||
image: docker.verbis.dkfz.de/ccp-private/central-spot | ||
environment: | ||
BEAM_SECRET: "${FOCUS_BEAM_SECRET_SHORT}" | ||
BEAM_URL: http://beam-proxy:8081 | ||
BEAM_PROXY_ID: ${SITE_ID} | ||
BEAM_BROKER_ID: ${BROKER_ID} | ||
BEAM_APP_ID: "focus" | ||
PROJECT_METADATA: "cce_supervisors" | ||
depends_on: | ||
- "beam-proxy" | ||
labels: | ||
- "traefik.enable=true" | ||
- "traefik.http.services.spot.loadbalancer.server.port=8080" | ||
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowmethods=GET,OPTIONS,POST" | ||
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolalloworiginlist=https://${HOST}" | ||
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolallowcredentials=true" | ||
- "traefik.http.middlewares.corsheaders2.headers.accesscontrolmaxage=-1" | ||
- "traefik.http.routers.spot.rule=Host(`${HOST}`) && PathPrefix(`/backend`)" | ||
- "traefik.http.middlewares.stripprefix_spot.stripprefix.prefixes=/backend" | ||
- "traefik.http.routers.spot.tls=true" | ||
- "traefik.http.routers.spot.middlewares=corsheaders2,stripprefix_spot" |
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,5 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$ENABLE_LENS" ];then | ||
OVERRIDE+=" -f ./$PROJECT/modules/lens-compose.yml" | ||
fi |
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,20 @@ | ||
-----BEGIN CERTIFICATE----- | ||
MIIDNTCCAh2gAwIBAgIUW34NEb7bl0+Ywx+I1VKtY5vpAOowDQYJKoZIhvcNAQEL | ||
BQAwFjEUMBIGA1UEAxMLQnJva2VyLVJvb3QwHhcNMjQwMTIyMTMzNzEzWhcNMzQw | ||
MTE5MTMzNzQzWjAWMRQwEgYDVQQDEwtCcm9rZXItUm9vdDCCASIwDQYJKoZIhvcN | ||
AQEBBQADggEPADCCAQoCggEBAL5UegLXTlq3XRRj8LyFs3aF0tpRPVoW9RXp5kFI | ||
TnBvyO6qjNbMDT/xK+4iDtEX4QQUvsxAKxfXbe9i1jpdwjgH7JHaSGm2IjAiKLqO | ||
OXQQtguWwfNmmp96Ql13ArLj458YH08xMO/w2NFWGwB/hfARa4z/T0afFuc/tKJf | ||
XbGCG9xzJ9tmcG45QN8NChGhVvaTweNdVxGWlpHxmi0Mn8OM9CEuB7nPtTTiBuiu | ||
pRC2zVVmNjVp4ktkAqL7IHOz+/F5nhiz6tOika9oD3376Xj055lPznLcTQn2+4d7 | ||
K7ZrBopCFxIQPjkgmYRLfPejbpdUjK1UVJw7hbWkqWqH7JMCAwEAAaN7MHkwDgYD | ||
VR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFGjvRcaIP4HM | ||
poIguUAK9YL2n7fbMB8GA1UdIwQYMBaAFGjvRcaIP4HMpoIguUAK9YL2n7fbMBYG | ||
A1UdEQQPMA2CC0Jyb2tlci1Sb290MA0GCSqGSIb3DQEBCwUAA4IBAQCbzycJSaDm | ||
AXXNJqQ88djrKs5MDXS8RIjS/cu2ayuLaYDe+BzVmUXNA0Vt9nZGdaz63SLLcjpU | ||
fNSxBfKbwmf7s30AK8Cnfj9q4W/BlBeVizUHQsg1+RQpDIdMrRQrwkXv8mfLw+w5 | ||
3oaXNW6W/8KpBp/H8TBZ6myl6jCbeR3T8EMXBwipMGop/1zkbF01i98Xpqmhx2+l | ||
n+80ofPsSspOo5XmgCZym8CD/m/oFHmjcvOfpOCvDh4PZ+i37pmbSlCYoMpla3u/ | ||
7MJMP5lugfLBYNDN2p+V4KbHP/cApCDT5UWLOeAWjgiZQtHH5ilDeYqEc1oPjyJt | ||
Rtup0MTxSJtN | ||
-----END CERTIFICATE----- |
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,14 @@ | ||
BROKER_ID=test-no-real-data.broker.samply.de | ||
BROKER_URL=https://${BROKER_ID} | ||
PROXY_ID=${SITE_ID}.${BROKER_ID} | ||
FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)" | ||
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64} | ||
[email protected] | ||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem | ||
BROKER_URL_FOR_PREREQ=$BROKER_URL | ||
|
||
for module in $PROJECT/modules/*.sh | ||
do | ||
log DEBUG "sourcing $module" | ||
source $module | ||
done |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,10 +19,18 @@ services: | |
- traefik-forward-auth | ||
labels: | ||
- "traefik.enable=true" | ||
# Router with Authentication | ||
- "traefik.http.routers.id-manager.rule=PathPrefix(`/id-manager`)" | ||
- "traefik.http.services.id-manager.loadbalancer.server.port=8080" | ||
- "traefik.http.routers.id-manager.tls=true" | ||
- "traefik.http.routers.id-manager.middlewares=traefik-forward-auth-idm" | ||
- "traefik.http.routers.id-manager.service=id-manager-service" | ||
# Router without Authentication | ||
- "traefik.http.routers.id-manager-compatibility.rule=PathPrefix(`/id-manager/paths/translator/getIds`)" | ||
- "traefik.http.routers.id-manager-compatibility.tls=true" | ||
- "traefik.http.routers.id-manager-compatibility.service=id-manager-service" | ||
# Definition of Service | ||
- "traefik.http.services.id-manager-service.loadbalancer.server.port=8080" | ||
- "traefik.http.services.id-manager-service.loadbalancer.server.scheme=http" | ||
|
||
patientlist: | ||
image: docker.verbis.dkfz.de/bridgehead/mainzelliste | ||
|
@@ -57,7 +65,7 @@ services: | |
- "/tmp/bridgehead/patientlist/:/docker-entrypoint-initdb.d/" | ||
|
||
traefik-forward-auth: | ||
image: docker.verbis.dkfz.de/cache/oauth2-proxy/oauth2-proxy:v7.6.0 | ||
image: docker.verbis.dkfz.de/cache/oauth2-proxy/oauth2-proxy:latest | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Move version number into variable |
||
environment: | ||
- http_proxy=http://forward_proxy:3128 | ||
- https_proxy=http://forward_proxy:3128 | ||
|
@@ -67,6 +75,7 @@ services: | |
- OAUTH2_PROXY_CLIENT_ID=bridgehead-${SITE_ID} | ||
- OAUTH2_PROXY_CLIENT_SECRET=${IDMANAGER_AUTH_CLIENT_SECRET} | ||
- OAUTH2_PROXY_COOKIE_SECRET=${IDMANAGER_AUTH_COOKIE_SECRET} | ||
- OAUTH2_PROXY_COOKIE_NAME=_BRIDGEHEAD_oauth2_idm | ||
- OAUTH2_PROXY_COOKIE_DOMAINS=.${HOST} | ||
- OAUTH2_PROXY_HTTP_ADDRESS=:4180 | ||
- OAUTH2_PROXY_REVERSE_PROXY=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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move version number into variable