Merge branch 'version-1' into feature/bd-29

Conflicts:
	.gitignore
	README.md
	auth/dktk
	dktk-fed/docker-compose.yml
	landing/index.html
	lib/generate.sh
This commit is contained in:
root
2022-05-04 09:22:39 +02:00
20 changed files with 494 additions and 1319 deletions

29
lib/add_bc_user.sh Executable file
View File

@ -0,0 +1,29 @@
#!/bin/bash -e
echo "This script add's a user with password to the bridghead"
if [ $# -eq 0 ]; then
echo "No arguments provided, please provide the project name"
exit 1
fi
if [ ! -f /etc/systemd/system/bridgehead@$1.service.d/override.conf ]; then
echo "Please create a Service first, with setup-bridgehead-units.sh"
exit
fi
read -p 'Username: ' bc_user
read -sp 'Password: ' bc_password
echo
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

View File

@ -1,5 +1,6 @@
#!/bin/bash
<<<<<<< HEAD
if [ ! -d ./landing ]
then
mkdir landing
@ -49,6 +50,8 @@ then
"
fi
=======
>>>>>>> version-1
cat > ./landing/index.html <<EOL
<html lang="en">
@ -98,7 +101,18 @@ cat > ./landing/index.html <<EOL
</tr>
</thead>
<tbody>
<<<<<<< HEAD
${LOCAL_SERVICES}
=======
<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>
>>>>>>> version-1
</tbody>
</table>
</div>

View File

@ -15,40 +15,42 @@ for prerequisite in $prerequisites; do
# TODO: Check for specific version
done
echo "Checking site.conf"
echo "Checking /etc/bridgehead-config/"
## Download submodule
if [ ! -d "/etc/bridgehead-config/" ]; then
echo "Please set up the site-config folder. Instruction are in the readme."
exit 1
else
echo "Done"
fi
echo "Checking /etc/bridgehead-config/site.conf"
#check if site.conf is created
if [ ! -f site.conf ]; then
if [ ! -f /etc/bridgehead-config/site.conf ]; then
echo "Please create your specific site.conf file from the site.dev.conf"
exit
exit 1
else
echo "Done"
fi
#Load site specific variables
source site.conf
source /etc/bridgehead-config/site.conf
if [ -z "$site_name" ]; then
echo "Please set site_name"
exit 1
fi
echo "Checking site-config module"
## Download submodule
if [ ! -d "site-config" ]; then
echo "Please set up the site-config folder. Instruction are in the readme."
exit
else
echo "Site configuration is already loaded"
fi
#Check if a project is selected
if [ -z "$project" ]; then
echo "No project selected! Please add a Project in your local site.conf."
exit
fi
#check if project env is present
if [ -d "site-config/${project}.env" ]; then
echo "Please copy the tempalte from ${project} and put it in the site-config folder"
if [ -d "/etc/bridgehead-config/${project}.env" ]; then
echo "Please copy the tempalte from ${project} and put it in the /etc/bridgehead-config/ folder"
exit 1
else
echo "Done"
fi
echo "All prerequisites are met!"