Merge pull request #62 from samply/feature/develop-install

Add developer install
This commit is contained in:
Tobias Kussel 2023-02-27 14:58:40 +01:00 committed by GitHub
commit ea3e148fd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 3 deletions

View File

@ -157,6 +157,10 @@ To keep all Bridgeheads up and working and detect any errors before a user does,
In all monitoring cases, obviously no sensitive information is transmitted, in particular not any patient-related data. Aggregated data, e.g. total amount of datasets, may be transmitted for diagnostic purposes. In all monitoring cases, obviously no sensitive information is transmitted, in particular not any patient-related data. Aggregated data, e.g. total amount of datasets, may be transmitted for diagnostic purposes.
### Development Installation
By using `./bridgehead dev-install <projectname>` instead of `install`, you can install a developer bridgehead. The difference is, that you can provide an arbitrary configuration repository during the installation, meaning that it does not have to adhere to the usual naming scheme. This allows for better decoupling between development and production configurations.
## Troubleshooting ## Troubleshooting
### Docker Daemon Proxy Configuration ### Docker Daemon Proxy Configuration

View File

@ -77,7 +77,12 @@ case "$ACTION" in
exec ./lib/update-bridgehead.sh $PROJECT exec ./lib/update-bridgehead.sh $PROJECT
;; ;;
install) install)
source ./lib/prepare-system.sh source ./lib/prepare-system.sh NODEV
loadVars
exec ./lib/install-bridgehead.sh $PROJECT
;;
dev-install)
exec ./lib/prepare-system.sh DEV
loadVars loadVars
exec ./lib/install-bridgehead.sh $PROJECT exec ./lib/install-bridgehead.sh $PROJECT
;; ;;

View File

@ -1,5 +1,7 @@
#!/bin/bash -e #!/bin/bash -e
DEV_MODE="${1:-NODEV}"
source lib/log.sh source lib/log.sh
source lib/functions.sh source lib/functions.sh
@ -64,7 +66,7 @@ if [ -d /etc/bridgehead ]; then
else else
log "WARN" "Your site configuration repository in /etc/bridgehead seems to have another origin than git.verbis.dkfz.de. Please check if the repository is correctly cloned!" log "WARN" "Your site configuration repository in /etc/bridgehead seems to have another origin than git.verbis.dkfz.de. Please check if the repository is correctly cloned!"
fi fi
else elif [[ "$DEV_MODE" == "NODEV" ]]; then
log "INFO" "Now cloning your site configuration repository for you." log "INFO" "Now cloning your site configuration repository for you."
read -p "Please enter your site: " site read -p "Please enter your site: " site
read -s -p "Please enter the bridgehead's access token for your site configuration repository (will not be echoed): " access_token read -s -p "Please enter the bridgehead's access token for your site configuration repository (will not be echoed): " access_token
@ -73,9 +75,13 @@ else
if [ $? -gt 0 ]; then if [ $? -gt 0 ]; then
log "ERROR" "Unable to clone your configuration repository. Please obtain correct access data and try again." log "ERROR" "Unable to clone your configuration repository. Please obtain correct access data and try again."
fi fi
elif [[ "$DEV_MODE" == "DEV" ]]; then
log "INFO" "Now cloning your developer configuration repository for you."
read -p "Please enter your config repository URL: " url
git clone "$url" /etc/bridgehead
fi fi
chown -R bridgehead /etc/bridgehead /srv/docker/bridgehead chown -R bridgehead /etc/bridgehead /srv/docker/bridgehead
log INFO "System preparation is completed and private key is present." log INFO "System preparation is completed and configuration is present."