Cleanup of earlier merge
This commit is contained in:
@ -23,7 +23,6 @@ bc=`docker run --rm -it httpd:latest htpasswd -nb $bc_user $bc_password`
|
||||
if grep -q -E "Environment=bc_auth_users=" /etc/systemd/system/bridgehead@$1.service.d/override.conf ; then
|
||||
x=`grep -E "Environment=bc_auth_users=" /etc/systemd/system/bridgehead@$1.service.d/override.conf`
|
||||
sed -i "/Environment=bc_auth_users=/c\\$x,$bc" /etc/systemd/system/bridgehead@$1.service.d/override.conf
|
||||
|
||||
else
|
||||
echo "Environment=bc_auth_users=${bc}" >> /etc/systemd/system/bridgehead@$1.service.d/override.conf
|
||||
fi
|
@ -1,5 +1,54 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ ! -d ./landing ]
|
||||
then
|
||||
mkdir landing
|
||||
fi
|
||||
|
||||
CENTRAL_SERVICES=" <tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://monitor.vmitro.de/icingaweb2/dashboard\">Monitoring Service</td>
|
||||
</tr>"
|
||||
|
||||
LOCAL_SERVICES=" <tr>
|
||||
<td>Bridgehead</td>
|
||||
<td>Reverse Proxy <a href=\"http://${HOST}:8080/\">Traefik</a></td>
|
||||
</tr>"
|
||||
|
||||
if [ "$project" = "dktk" ] || [ "$project" = "c4" ] || [ "$project" = "dktk-fed" ]
|
||||
then
|
||||
CENTRAL_SERVICES+=" <tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://patientlist.ccp-it.dktk.dkfz.de\">Zentrale Patientenliste</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://decentralsearch.ccp-it.dktk.dkfz.de\">Dezentrale Suche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://centralsearch.ccp-it.dktk.dkfz.de\">Zentrale Suche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://deployment.ccp-it.dktk.dkfz.de\">Deployment-Server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href=\"https://dktk-kne.kgu.de\">Zentraler Kontrollnummernerzeuger</td>
|
||||
</tr>
|
||||
"
|
||||
fi
|
||||
|
||||
if [ "$project" = "dktk-fed" ]
|
||||
then
|
||||
LOCAL_SERVICES+=" <tr>
|
||||
<td>DKTK</td>
|
||||
<td><a href=\"https://${HOST}/dktk-localdatamanagement/fhir/\">Blaze</a></td>
|
||||
</tr>
|
||||
"
|
||||
fi
|
||||
|
||||
cat > ./landing/index.html <<EOL
|
||||
<html lang="en">
|
||||
|
||||
@ -17,7 +66,7 @@ cat > ./landing/index.html <<EOL
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<body class="d-flex flex-column min-vh-100">
|
||||
|
||||
<nav class="navbar navbar-light" style="background-color: #aad7f6;">
|
||||
<h2 class="pb-2 border-bottom">Bridgehead ${site_name}</h2>
|
||||
@ -34,26 +83,7 @@ cat > ./landing/index.html <<EOL
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href="https://patientlist.ccp-it.dktk.dkfz.de">Zentrale Patientenliste</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href="https://decentralsearch.ccp-it.dktk.dkfz.de">Dezentrale Suche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href="https://centralsearch.ccp-it.dktk.dkfz.de">Zentrale Suche</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href="https://deployment.ccp-it.dktk.dkfz.de">Deployment-Server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>CCP-IT</td>
|
||||
<td><a href="https://dktk-kne.kgu.de">Zentraler Kontrollnummernerzeuger</td>
|
||||
</tr>
|
||||
${CENTRAL_SERVICES}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
@ -68,19 +98,12 @@ cat > ./landing/index.html <<EOL
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Bridgehead</td>
|
||||
<td>Reverse Proxy <a href="https://e260-serv-05/dashboard/">Traefik</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>DKTK</td>
|
||||
<td><a href="https://e260-serv-05/dktk-localdatamanagement/fhir/">Blaze</a></td>
|
||||
</tr>
|
||||
${LOCAL_SERVICES}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<footer class="footer mt-auto py-3 ">
|
||||
<a href="https://dktk.dkfz.de/"><img src="https://www.oncoray.de/fileadmin/files/bilder_gruppen/DKTK/Logo_DKTK_neu_2016.jpg" height="10%" width="30%"></a> DKTK 2022
|
||||
<footer class="footer mt-auto py-3">
|
||||
<a href="https://dktk.dkfz.de/"><img src="https://www.oncoray.de/fileadmin/files/bilder_gruppen/DKTK/Logo_DKTK_neu_2016.jpg" style="max-width: 30%; height: auto;"></a> DKTK 2022<span style="float: right;"><a href="https://github.com/samply/bridgehead"><button type="button" class="btn btn-primary">Documentaion</button></a></span>
|
||||
</footer>
|
||||
</body>
|
||||
|
||||
|
@ -15,20 +15,20 @@ for prerequisite in $prerequisites; do
|
||||
# TODO: Check for specific version
|
||||
done
|
||||
|
||||
echo "Checking /etc/bridgehead-config/"
|
||||
echo "Checking /etc/bridgehead/"
|
||||
|
||||
## Download submodule
|
||||
if [ ! -d "/etc/bridgehead-config/" ]; then
|
||||
echo "Please set up the site-config folder. Instruction are in the readme."
|
||||
if [ ! -d "/etc/bridgehead/" ]; then
|
||||
echo "Please set up the config folder. Instruction are in the readme."
|
||||
exit 1
|
||||
else
|
||||
echo "Done"
|
||||
fi
|
||||
|
||||
echo "Checking /etc/bridgehead-config/site.conf"
|
||||
echo "Checking /etc/bridgehead/site.conf"
|
||||
|
||||
#check if site.conf is created
|
||||
if [ ! -f /etc/bridgehead-config/site.conf ]; then
|
||||
if [ ! -f /etc/bridgehead/site.conf ]; then
|
||||
echo "Please create your specific site.conf file from the site.dev.conf"
|
||||
exit 1
|
||||
else
|
||||
@ -36,17 +36,17 @@ else
|
||||
fi
|
||||
|
||||
#Load site specific variables
|
||||
source /etc/bridgehead-config/site.conf
|
||||
source /etc/bridgehead/site.conf
|
||||
|
||||
if [ -z "$site_name" ]; then
|
||||
echo "Please set site_name"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Checking site-config module"
|
||||
echo "Checking project config"
|
||||
|
||||
#check if project env is present
|
||||
if [ -d "/etc/bridgehead-config/${project}.env" ]; then
|
||||
if [ -d "/etc/bridgehead/${project}.env" ]; then
|
||||
echo "Please copy the tempalte from ${project} and put it in the /etc/bridgehead-config/ folder"
|
||||
exit 1
|
||||
else
|
||||
|
@ -1,8 +1,24 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
source site.conf
|
||||
source lib/functions.sh
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Please provide a Project as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
|
||||
echo "Please provide a supported project like ccp, gbn or nngm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export project=$1
|
||||
|
||||
if ! ./lib/prerequisites.sh; then
|
||||
log "Prerequisites failed, exiting"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Stopping systemd services and removing bridgehead ..."
|
||||
|
||||
systemctl disable --now bridgehead@${project}.service bridgehead-update@${project}.timer bridgehead-update@${project}.service
|
||||
|
@ -5,11 +5,22 @@ source lib/functions.sh
|
||||
|
||||
exitIfNotRoot
|
||||
|
||||
if [ $# -eq 0 ]; then
|
||||
echo "Please provide a Project as argument"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ $1 != "ccp" ] && [ $1 != "nngm" ] && [ $1 != "gbn" ]; then
|
||||
echo "Please provide a supported project like ccp, gbn or nngm"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
export project=$1
|
||||
|
||||
if ! ./lib/prerequisites.sh; then
|
||||
log "Prerequisites failed, exiting"
|
||||
exit 1
|
||||
fi
|
||||
source site.conf
|
||||
|
||||
echo -e "\nInstalling systemd units ..."
|
||||
cp -v \
|
||||
@ -29,6 +40,4 @@ if ! systemctl is-active --quiet bridgehead@"${project}"; then
|
||||
systemctl enable --now bridgehead-update@"${project}".timer
|
||||
fi
|
||||
|
||||
echo -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine."
|
||||
|
||||
# TODO: Configuration of the different modules
|
||||
echo -e "\nDone - now start your bridgehead by running\n\tsystemctl start bridgehead@${project}.service\nor by rebooting your machine."
|
@ -3,8 +3,10 @@ Description=Bridgehead (%i) Update Service
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
User=bridgehead
|
||||
WorkingDirectory=/srv/docker/bridgehead/
|
||||
ExecStart=/bin/bash -c "/srv/docker/bridgehead/update-bridgehead.sh %i"
|
||||
|
||||
ExecStart=/srv/docker/bridgehead/update-bridgehead.sh %i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
@ -2,14 +2,15 @@
|
||||
Description=Bridgehead (%i) Service
|
||||
|
||||
[Service]
|
||||
User=bridgehead
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
WorkingDirectory=/srv/docker/bridgehead/
|
||||
|
||||
ExecStartPre=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env down'
|
||||
ExecStart=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env up'
|
||||
ExecStop=/bin/bash -c '`which docker-compose` -f %i/docker-compose.yml --env-file site-config/%i.env down'
|
||||
ExecStart=/srv/docker/bridgehead/start-bridgehead.sh %i
|
||||
RemainAfterExit=true
|
||||
ExecStop=/srv/docker/bridgehead/stop-bridgehead.sh %i
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
WantedBy=multi-user.target
|
Reference in New Issue
Block a user