-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
master keycloak: esure instances work with https
- Loading branch information
Showing
9 changed files
with
84 additions
and
13 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
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
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
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
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
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 |
---|---|---|
@@ -1,10 +1,11 @@ | ||
group=doil | ||
host=doil | ||
https_proxy=false | ||
mail_password=ilias | ||
global_instances_path=/srv/instances | ||
enable_keycloak=false | ||
keycloak_hostname=http://doil/keycloak | ||
keycloak_new_admin_password=admin | ||
keycloak_old_admin_password=admin | ||
keycloak_db_username=admin | ||
keycloak_db_password=admin | ||
keycloak_db_password=admin |
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
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
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,58 @@ | ||
#!/usr/bin/env bash | ||
|
||
source ${SCRIPT_DIR}/updates/update.sh | ||
|
||
doil_update_20241205() { | ||
|
||
cat <<Message | ||
Before running this update, you should make sure to customize the ${SCRIPT_DIR}/conf/doil.conf file according to | ||
your needs. For more information, please read the README (https://github.com/conceptsandtraining/doil/blob/master/README.md). | ||
Message | ||
|
||
read -r -p "Do you want to proceed? [y/N] " RESPONSE | ||
case "$RESPONSE" in | ||
[yY][eE][sS]|[yY]) | ||
;; | ||
*) | ||
echo "Abort by user!" | ||
exit 1 | ||
;; | ||
esac | ||
|
||
cp -f ${SCRIPT_DIR}/conf/doil.conf /etc/doil/doil.conf | ||
|
||
update | ||
|
||
HTTPS_PROXY=$(cat /etc/doil/doil.conf | grep "https_proxy=" | cut -d '=' -f 2-) | ||
if [ "${HTTPS_PROXY}" == "true" ] | ||
then | ||
if [ $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}" | wc -l) -gt 0 ] | ||
then | ||
doil_status_send_message "Prepare existing instances to work with new doil" | ||
HOST=$(cat /etc/doil/doil.conf | grep "host=" | cut -d '=' -f 2-) | ||
NEEDLE="http://${HOST}" | ||
REPLACE="https://${HOST}" | ||
for INSTANCE in $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}") | ||
do | ||
docker start ${INSTANCE} &> /dev/null | ||
sleep 5 | ||
docker exec -it ${INSTANCE} /bin/bash -c "sed -i 's%${NEEDLE}%${REPLACE}%g' /var/ilias/data/ilias-config.json" &> /dev/null | ||
docker exec -it ${INSTANCE} /bin/bash -c "cd /var/www/html && php setup/setup.php update -y /var/ilias/data/ilias-config.json" &> /dev/null | ||
NAME=$(echo "${INSTANCE}" | cut -d "_" -f 1) | ||
SUFFIX=$(echo "${INSTANCE}" | cut -d "_" -f 2) | ||
GLOBAL_PARAM="-g" | ||
if [ "${SUFFIX}" == "local" ] | ||
then | ||
GLOBAL_PARAM="" | ||
fi | ||
doil apply "${NAME}" "${GLOBAL_PARAM}" enable_https | ||
docker exec -it ${INSTANCE} /bin/bash -c "salt-call grains.set doil_domain ${REPLACE}/${NAME}" | ||
docker commit ${INSTANCE} doil/${INSTANCE}:stable &> /dev/null | ||
docker stop ${INSTANCE} &> /dev/null | ||
done | ||
doil_status_okay | ||
fi | ||
fi | ||
|
||
return $? | ||
} |