mirror of
https://github.com/samply/bridgehead.git
synced 2025-06-16 02:20:13 +02:00
Compare commits
11 Commits
cbb73ab9b5
...
prototype/
Author | SHA1 | Date | |
---|---|---|---|
1f9c29647a | |||
7cd430ffd2 | |||
78e572d0db | |||
b0507a7946 | |||
791be147e2 | |||
bc0835ff4d | |||
96d99b2510 | |||
663ae628f3 | |||
91b9eeb316 | |||
3146a64fb7 | |||
7064bc6bf9 |
@ -176,6 +176,13 @@ case "$ACTION" in
|
||||
;;
|
||||
postRun | postUpdate)
|
||||
;;
|
||||
send-file)
|
||||
loadVars
|
||||
log "WARNING" "Your are about to send a file to another bridgehead in your network!"
|
||||
read -p "Please name the bridgehead you want to send the file to (proxy-id): " RECEIVER_PROXY_ID
|
||||
read -p "Continue? (Y/N): " confirm && [[ $confirm == [yY] || $confirm == [yY][eE][sS] ]] || exit 1
|
||||
exec $COMPOSE -p $PROJECT -f ./modules/beam-file-compose.yml --profile beam-file-sender run beam-file-sender send --to beamfile.$RECEIVER_PROXY_ID /data/outfile
|
||||
;;
|
||||
*)
|
||||
printUsage
|
||||
exit 1
|
||||
|
@ -45,6 +45,7 @@ services:
|
||||
BROKER_URL: ${BROKER_URL}
|
||||
PROXY_ID: ${PROXY_ID}
|
||||
APP_focus_KEY: ${FOCUS_BEAM_SECRET_SHORT}
|
||||
APP_beamfilesend_KEY: ${BEAM_FILE_SEND_SECRET}
|
||||
PRIVKEY_FILE: /run/secrets/proxy.pem
|
||||
ALL_PROXY: http://forward_proxy:3128
|
||||
TLS_CA_CERTIFICATES_DIR: /conf/trusted-ca-certs
|
||||
|
@ -5,6 +5,7 @@ FOCUS_BEAM_SECRET_SHORT="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | h
|
||||
FOCUS_RETRY_COUNT=${FOCUS_RETRY_COUNT:-64}
|
||||
SUPPORT_EMAIL=support-ccp@dkfz-heidelberg.de
|
||||
PRIVATEKEYFILENAME=/etc/bridgehead/pki/${SITE_ID}.priv.pem
|
||||
BEAM_FILE_SEND_SECRET="$(echo \"beam-file-send-salt\" | openssl pkeyutl -sign -inkey /etc/bridgehead/pki/${SITE_ID}.priv.pem | base64 | head -c 30)"
|
||||
|
||||
BROKER_URL_FOR_PREREQ=$BROKER_URL
|
||||
|
||||
@ -25,4 +26,5 @@ do
|
||||
source $module
|
||||
done
|
||||
|
||||
transfairSetup
|
||||
transfairSetup
|
||||
beamFileSetup
|
||||
|
35
modules/beam-file-compose.yml
Normal file
35
modules/beam-file-compose.yml
Normal file
@ -0,0 +1,35 @@
|
||||
# NOTE: Current implementation is restricted to a bridgehead only being able to either upload or download data
|
||||
services:
|
||||
beam-file-sender:
|
||||
image: samply/beam-file:${BEAM_FILE_TAG}
|
||||
container_name: bridgehead-beam-file-sender
|
||||
environment:
|
||||
- BEAM_ID=beamfilesend.${PROXY_ID}
|
||||
- BEAM_SECRET=${BEAM_FILE_SEND_SECRET}
|
||||
- BEAM_URL=http://beam-proxy:8081
|
||||
- BIND_ADDR=0.0.0.0:8085
|
||||
- API_KEY=${BEAM_FILE_API_KEY}
|
||||
# Only uncomment if your are sure what to do
|
||||
# ports:
|
||||
# - 8085:8085
|
||||
volumes:
|
||||
- /var/cache/bridgehead/beam-file-out/:/data
|
||||
profiles: ["beam-file-sender"]
|
||||
|
||||
beam-file-receiver:
|
||||
image: samply/beam-file:${BEAM_FILE_TAG}
|
||||
container_name: bridgehead-beam-file-receiver
|
||||
environment:
|
||||
- BEAM_ID=beamfile.${PROXY_ID}
|
||||
- BEAM_SECRET=${BEAM_FILE_SECRET}
|
||||
- BEAM_URL=http://beam-proxy:8081
|
||||
- API_KEY=${BEAM_FILE_API_KEY}
|
||||
command: ["receive", "save", "--outdir", "/data"]
|
||||
volumes:
|
||||
- /var/cache/bridgehead/beam-file/:/data
|
||||
profiles: ["beam-file-receiver"]
|
||||
|
||||
beam-proxy:
|
||||
environment:
|
||||
APP_beamfile_KEY: ${BEAM_FILE_SECRET}
|
||||
profiles: ["beam-file-receiver"]
|
11
modules/beam-file-setup.sh
Normal file
11
modules/beam-file-setup.sh
Normal file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
function beamFileSetup() {
|
||||
if [ -n "$ENABLE_BEAM_FILE_RECEIVER" ]; then
|
||||
echo "Starting beam file in receiver mode"
|
||||
OVERRIDE+=" -f ./modules/beam-file-compose.yml --profile beam-file-receiver"
|
||||
BEAM_FILE_SECRET="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
BEAM_FILE_API_KEY="$(cat /proc/sys/kernel/random/uuid | sed 's/[-]//g' | head -c 20)"
|
||||
log INFO "Beam File in Receiver Mode available uses ApiKey ${BEAM_FILE_API_KEY}"
|
||||
fi
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
FOCUS_TAG=develop
|
||||
BEAM_TAG=develop
|
||||
BLAZE_TAG=main
|
||||
BLAZE_TAG=main
|
||||
BEAM_FILE_TAG=task-based-files
|
||||
|
Reference in New Issue
Block a user