From ee6f60ef6542adcf41ca827f54fe7ad45b7609ec Mon Sep 17 00:00:00 2001 From: Croft Date: Thu, 19 Jan 2023 09:59:47 +0100 Subject: [PATCH 1/8] Enhanced the installation documentation. Explained the following: * Bridgehead projects * Configuration repository --- README.md | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b57c10e..e559842 100644 --- a/README.md +++ b/README.md @@ -57,10 +57,43 @@ Since it needs to carry sensitive patient data, Bridgeheads are intended to be d Note for Ubuntu: Please note that the uncomplicated firewall (ufw) is known to conflict with Docker [here](https://github.com/chaifeng/ufw-docker). ## Deployment +You will need to choose a short name for your site. This is not a URL, just a simple identifying string. For the examples below, we will use "your-site-name", but you should obviously choose something that is meaningful to you and which is unique. + +### Projects + +The following "projects" are known to the Bridgehead installation: + +- bbmri +- ccp + +Use "bbmri" if you are in the BBMRI-ERIC European biobank network or the GBA (German Biobank Alliance) network. + +Use "ccp" if you are in the DKTK network, the C4 network or the nNGM network. + +### GitLab repository + +In order to be able to install, you will need to have your own repository in GitLab for your site's configuration settings. This allows automated updates of the Bridgehead software. + +To request a new repository, please send an email to bridgehead@helpdesk.bbmri-eric.eu. Mention which project you belong to, i.e. "bbmri" or "ccp", plus your chosen site name. + +We will set the repository up for you. We will then send you the repository's URL plus a token to access it. + +Before installation, you must set up your site's configuration in GitLab. + +To do this, visit the configuration repository's URL and click on the configuration file. Depending on your project, this will be called either ```bbmri.conf```or ```ccp.conf```. Use the blue button to edit it. You will need to change, as a minimum, the following variables: + +- SITE_NAME +- SITE_ID +- OPERATOR_FIRST_NAME +- OPERATOR_LAST_NAME +- OPERATOR_EMAIL +- OPERATOR_PHONE + +SITE_NAME and SITE_ID can be set to the chosen name for your site, e.g. "your-site-name". OPERATOR_* should be set to values appropriate for the administrator of your site. ### Base Installation -First, clone the repository to the directory `/srv/docker/bridgehead`: +First, get the Bridgehead: ```shell sudo mkdir -p /srv/docker/ @@ -74,7 +107,11 @@ cd /srv/docker/bridgehead sudo ./bridgehead install ``` -... and follow the instructions on the screen. You should then be prompted to do the next step: +When prompted with "Please enter your site", you should enter the name you have given to your site (not its URL). E.g., in the example in the previous section, that would be "your-site-name". + +When prompted with "Please enter the bridgehead's access token for your site configuration repository", you should enter the token for the GitLab repository that was given to you. + +You should then be prompted to do the next step: ### Register with Samply.Beam From 0c2873132a946a2daf52631de69e612e8454ef80 Mon Sep 17 00:00:00 2001 From: Croft Date: Thu, 19 Jan 2023 11:22:48 +0100 Subject: [PATCH 2/8] Included site naming conventions --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index e559842..8a0e274 100644 --- a/README.md +++ b/README.md @@ -59,6 +59,14 @@ Note for Ubuntu: Please note that the uncomplicated firewall (ufw) is known to c ## Deployment You will need to choose a short name for your site. This is not a URL, just a simple identifying string. For the examples below, we will use "your-site-name", but you should obviously choose something that is meaningful to you and which is unique. +Site names should adhere to the following conventions: + +- They should be lower-case. +- They should generally be named after the city where your site is based, e.g. ```karlsruhe```. +- If you have a multi-part name, please use a hypen ("-") as separator, e.g. ```le-havre```. +- If your site is for testing purposes, rather than production, please prepend with "test-", e.g. ```test-zaragoza```. +- If you are a developer and you are making changes to the Bridgehead, please use your name and prepend with "dev-", e.g. ```dev-joe-doe```. + ### Projects The following "projects" are known to the Bridgehead installation: From 92ccb7867452f0999cd701fc916ab7d2a2fada89 Mon Sep 17 00:00:00 2001 From: Croft Date: Mon, 23 Jan 2023 14:49:03 +0100 Subject: [PATCH 3/8] Fix for Tobias' comment in PR52 --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 8a0e274..4ac1c84 100644 --- a/README.md +++ b/README.md @@ -99,6 +99,8 @@ To do this, visit the configuration repository's URL and click on the configurat SITE_NAME and SITE_ID can be set to the chosen name for your site, e.g. "your-site-name". OPERATOR_* should be set to values appropriate for the administrator of your site. +Once you have made your changes, these will need to be reviewed by members of our team before you can proceed with the installation. + ### Base Installation First, get the Bridgehead: From d2c5ec0418c3f306717f3e2cccd65d1dce0718a6 Mon Sep 17 00:00:00 2001 From: Croft Date: Wed, 25 Jan 2023 14:09:14 +0100 Subject: [PATCH 4/8] Added instructions for Bridgehead de-install --- README.md | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/README.md b/README.md index 4ac1c84..31fc0b0 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,9 @@ Since it needs to carry sensitive patient data, Bridgeheads are intended to be d Note for Ubuntu: Please note that the uncomplicated firewall (ufw) is known to conflict with Docker [here](https://github.com/chaifeng/ufw-docker). ## Deployment + +### Site name + You will need to choose a short name for your site. This is not a URL, just a simple identifying string. For the examples below, we will use "your-site-name", but you should obviously choose something that is meaningful to you and which is unique. Site names should adhere to the following conventions: @@ -156,6 +159,35 @@ To enable/disable autostart, run sudo systemctl [enable|disable] bridgehead@.service ``` +### De-installing a Bridgehead + +You may decide that you want to remove a Bridgehead installation from your machine, e.g. if you want to migrate it to a new location or if you want to start a fresh installation because the initial attempts did not work. + +The following steps will remove all traces of the Bridgehead from your machine. All locally stored data pertaining to the Bridgehead will be lost. + +First, purge the Bridgehead from ```systemctl```: + +```shell +sudo systemctl stop bridgehead@bbmri.service +sudo systemctl disable bridgehead@bbmri.service +sudo systemctl daemon-reload +sudo systemctl reset-failed +``` + +Now remove the directories where the Bridgehead files reside: + +```shell +sudo rm -rf /srv/docker/bridgehead /etc/bridgehead +``` + +Finally, get rid of the Docker images: + +```shell +docker image rm traefik:latest samply/beam-proxy:develop samply/blaze:0.18 samply/bridgehead-forward-proxy:latest samply/bridgehead-landingpage:master samply/spot:latest +``` + +Note that you will still have a functioning Beam certificate and a functioning GitLab configuration repository, even after you have removed everything locally. + ## Site-specific configuration ### HTTPS Access From 92d88ad815c58d52aa53e46faaaaedf76e973e4e Mon Sep 17 00:00:00 2001 From: Croft Date: Thu, 26 Jan 2023 09:37:44 +0100 Subject: [PATCH 5/8] Added new section for testing the Bridgehead --- README.md | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/README.md b/README.md index 31fc0b0..6fe2e2e 100644 --- a/README.md +++ b/README.md @@ -159,6 +159,46 @@ To enable/disable autostart, run sudo systemctl [enable|disable] bridgehead@.service ``` +### Testing your new Bridgehead + +After starting the Bridgehead, you can watch the initialization process with the following command: + +```shell +sudo journalctl -xefu bridgehead@bbmri.service +``` + +if this exits with the following: + +``` +bridgehead@bbmri.service: Main process exited, code=exited, status=1/FAILURE +``` + +Then you know that there was a problem with starting the Bridgehead. Scroll up the printout to find the cause of the error. + +Once the Bridgehead is running, you can also view the individual Docker processes with: + +```shell +docker ps +``` + +There should be 6 Docker proceses. If there are fewer, then you know that something has gone wrong. + +Once the Bridgehead has passed these checks, take a look at the landing page: + +``` +https://localhost +``` + +You can either do this in a browser or with curl. If you visit the URL in the browser, you will neet to click through several warnings, because you will initially be using a self-signed certificate. With curl, you can bypass these checks: + +```shell +curl -k https://localhost +``` + +If you get errors when you do this, you need to use ```docker logs``` to examine your landing page container in order to determine what is going wrong. + +If you have chosen to take part in our monitoring program (by setting the ```MONITOR_APIKEY``` variable in the configuration), you will be informed by email when problems are detected in your Bridgehead. + ### De-installing a Bridgehead You may decide that you want to remove a Bridgehead installation from your machine, e.g. if you want to migrate it to a new location or if you want to start a fresh installation because the initial attempts did not work. From 90fe31b6c9a6794937bc9ee886283ae9514a3697 Mon Sep 17 00:00:00 2001 From: Croft Date: Thu, 26 Jan 2023 11:15:55 +0100 Subject: [PATCH 6/8] Described Docker logging in README --- README.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fe2e2e..6d4a0f8 100644 --- a/README.md +++ b/README.md @@ -181,7 +181,11 @@ Once the Bridgehead is running, you can also view the individual Docker processe docker ps ``` -There should be 6 Docker proceses. If there are fewer, then you know that something has gone wrong. +There should be 6 Docker proceses. If there are fewer, then you know that something has gone wrong. To see what is going on, run: + +```shell +docker-compose -f bbmri/docker-compose.yml logs --follow +``` Once the Bridgehead has passed these checks, take a look at the landing page: From 7d9cec562ea5d00d744ac3610fe32c7eaeaef22d Mon Sep 17 00:00:00 2001 From: Croft Date: Fri, 27 Jan 2023 09:46:30 +0100 Subject: [PATCH 7/8] Corrected site naming convention to comply with DKTK --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6d4a0f8..1a43eed 100644 --- a/README.md +++ b/README.md @@ -67,8 +67,8 @@ Site names should adhere to the following conventions: - They should be lower-case. - They should generally be named after the city where your site is based, e.g. ```karlsruhe```. - If you have a multi-part name, please use a hypen ("-") as separator, e.g. ```le-havre```. -- If your site is for testing purposes, rather than production, please prepend with "test-", e.g. ```test-zaragoza```. -- If you are a developer and you are making changes to the Bridgehead, please use your name and prepend with "dev-", e.g. ```dev-joe-doe```. +- If your site is for testing purposes, rather than production, please append "-test", e.g. ```zaragoza-test```. +- If you are a developer and you are making changes to the Bridgehead, please use your name and append "-dev", e.g. ```joe-doe-dev```. ### Projects @@ -87,7 +87,11 @@ In order to be able to install, you will need to have your own repository in Git To request a new repository, please send an email to bridgehead@helpdesk.bbmri-eric.eu. Mention which project you belong to, i.e. "bbmri" or "ccp", plus your chosen site name. -We will set the repository up for you. We will then send you the repository's URL plus a token to access it. +We will set the repository up for you. We will then send you: + +- A Repository Short Name (RSN). Beware: this is distinct from your site name. +- The repository's URL. +- A token to access the repository. Before installation, you must set up your site's configuration in GitLab. @@ -120,7 +124,7 @@ cd /srv/docker/bridgehead sudo ./bridgehead install ``` -When prompted with "Please enter your site", you should enter the name you have given to your site (not its URL). E.g., in the example in the previous section, that would be "your-site-name". +When prompted with "Please enter your site", you should enter the Repository Short Name (RSN) for GitLab that you were given in the previous section. When prompted with "Please enter the bridgehead's access token for your site configuration repository", you should enter the token for the GitLab repository that was given to you. From 6123a9aeba60d0ac27f19f72905c0b166ef10fb7 Mon Sep 17 00:00:00 2001 From: Croft Date: Fri, 27 Jan 2023 11:08:00 +0100 Subject: [PATCH 8/8] Addressed Torben's comments to PR 52 - Included email for CCP repositories. - Used journalctl instead of docker ps for Bridgehead status. --- README.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1a43eed..1a11d87 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,12 @@ Use "ccp" if you are in the DKTK network, the C4 network or the nNGM network. In order to be able to install, you will need to have your own repository in GitLab for your site's configuration settings. This allows automated updates of the Bridgehead software. -To request a new repository, please send an email to bridgehead@helpdesk.bbmri-eric.eu. Mention which project you belong to, i.e. "bbmri" or "ccp", plus your chosen site name. +To request a new repository, please send an email to one of the following: + +- For the bbmri project: bridgehead@helpdesk.bbmri-eric.eu. +- For the ccp project: support-ccp@dkfz-heidelberg.de + +Mention which project you belong to, i.e. "bbmri" or "ccp", plus your chosen site name. We will set the repository up for you. We will then send you: @@ -168,7 +173,7 @@ sudo systemctl [enable|disable] bridgehead@.service After starting the Bridgehead, you can watch the initialization process with the following command: ```shell -sudo journalctl -xefu bridgehead@bbmri.service +journalctl -u bridgehead@bbmri -f ``` if this exits with the following: @@ -188,7 +193,7 @@ docker ps There should be 6 Docker proceses. If there are fewer, then you know that something has gone wrong. To see what is going on, run: ```shell -docker-compose -f bbmri/docker-compose.yml logs --follow +journalctl -u bridgehead@bbmri -f ``` Once the Bridgehead has passed these checks, take a look at the landing page: