-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add individual compose scripts for idp/sp
- Loading branch information
Showing
6 changed files
with
184 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
docker-compose up --build -d | ||
|
||
if [ $? == '0' ]; then | ||
echo "" | ||
echo "If everything above was successful, your IdP metadata can be retreived with this command (after a minute or two):" | ||
echo " curl -k -s https://127.0.0.1/idp/shibboleth" | ||
echo "" | ||
else | ||
echo "An error was encountered." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
#!/bin/bash | ||
|
||
if [ "$1" == '-y' ]; then | ||
response="Y" | ||
else | ||
read -r -p "Are you sure you want to remove the test idp and data images/containers? [y/N] " response | ||
fi | ||
|
||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then | ||
#kill, if running, and remove idp container | ||
docker ps | grep idp_idp &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid=$(docker ps | grep idp_idp | cut -f 1 -d ' ') | ||
docker kill ${contid} &>/dev/null | ||
docker rm ${contid} &>/dev/null | ||
else | ||
#check if an old container is present, rm if needed | ||
docker container ls -a | grep idp_idp &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid=$(docker container ls -a | grep idp_idp | cut -f 1 -d ' ') | ||
docker kill ${contid} &>/dev/null | ||
docker rm ${contid} &>/dev/null | ||
fi | ||
fi | ||
|
||
#kill, if running, and remove data container | ||
docker ps | grep idp_data &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid2=$(docker ps | grep idp_data | cut -f 1 -d ' ') | ||
docker kill ${contid2} &>/dev/null | ||
docker rm ${contid2} &>/dev/null | ||
else | ||
#check if an old container is present, rm if needed | ||
docker container ls -a | grep idp_data &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid2=$(docker container ls -a | grep idp_data | cut -f 1 -d ' ') | ||
docker kill ${contid2} &>/dev/null | ||
docker rm ${contid2} &>/dev/null | ||
fi | ||
fi | ||
|
||
|
||
#remove images | ||
docker rmi -f idp_idp &>/dev/null | ||
docker rmi -f idp_data &>/dev/null | ||
|
||
else | ||
echo "Terminating..." | ||
exit 0 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
|
||
version: "3.3" | ||
|
||
services: | ||
idp: | ||
build: | ||
context: ./ | ||
args: | ||
TOMCFG: ./container_files/config/tomcat | ||
TOMCERT: ./container_files/credentials/tomcat | ||
TOMWWWROOT: ./container_files/wwwroot | ||
SHBCFG: ./container_files/config/shib-idp/conf | ||
SHBCREDS: ./container_files/credentials/shib-idp | ||
SHBVIEWS: ./container_files/config/shib-idp/views | ||
SHBEDWAPP: ./container_files/config/shib-idp/edit-webapp | ||
SHBMSGS: ./container_files/config/shib-idp/messages | ||
SHBMD: ./container_files/config/shib-idp/metadata | ||
depends_on: | ||
- data | ||
networks: | ||
- front | ||
- back | ||
ports: | ||
- "443:443" | ||
|
||
|
||
data: | ||
build: ../data/ | ||
expose: | ||
- "389" | ||
networks: | ||
- back | ||
ports: | ||
- "389:389" | ||
volumes: | ||
- shibidp_ldap:/var/lib/dirsrv | ||
|
||
|
||
networks: | ||
front: | ||
driver: bridge | ||
back: | ||
driver: bridge | ||
|
||
|
||
volumes: | ||
shibidp_ldap: | ||
driver: local | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/sh | ||
docker-compose up --build -d | ||
|
||
if [ $? == '0' ]; then | ||
echo "" | ||
echo "If everything above was successful, your SP metadata can be retreived with this command (after a minute or two):" | ||
echo " curl -k -s https://127.0.0.1:8443/Shibboleth.sso/Metadata" | ||
echo "" | ||
else | ||
echo "An error was encountered." | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/bin/bash | ||
|
||
if [ "$1" == '-y' ]; then | ||
response="Y" | ||
else | ||
read -r -p "Are you sure you want to remove the test sp image/container? [y/N] " response | ||
fi | ||
|
||
if [[ "$response" =~ ^([yY][eE][sS]|[yY])+$ ]]; then | ||
#kill, if running, and remove sp container | ||
docker ps | grep sp_sp &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid2=$(docker ps | grep sp_sp | cut -f 1 -d ' ') | ||
docker kill ${contid2} &>/dev/null | ||
docker rm ${contid2} &>/dev/null | ||
else | ||
#check if an old container is present, rm if needed | ||
docker container ls -a | grep sp_sp &>/dev/null | ||
if [ $? == '0' ]; then | ||
#get container ID | ||
export contid2=$(docker container ls -a | grep sp_sp | cut -f 1 -d ' ') | ||
docker kill ${contid2} &>/dev/null | ||
docker rm ${contid2} &>/dev/null | ||
fi | ||
fi | ||
|
||
|
||
#remove images | ||
docker rmi -f sp_sp &>/dev/null | ||
|
||
else | ||
echo "Terminating..." | ||
exit 0 | ||
fi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
|
||
version: "3.3" | ||
|
||
services: | ||
sp: | ||
build: ./ | ||
expose: | ||
- "8443" | ||
networks: | ||
- front | ||
- back | ||
ports: | ||
- "8443:8443" | ||
|
||
|
||
networks: | ||
front: | ||
driver: bridge | ||
back: | ||
driver: bridge | ||
|
||
|