-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #202 from datagov-cz/checkit-deploy
Checkit deploy
- Loading branch information
Showing
22 changed files
with
4,372 additions
and
2,614 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 |
---|---|---|
@@ -1,3 +1,20 @@ | ||
CONTEXT=${CONTEXT} | ||
REPOSITORY=assembly-line | ||
URL=${URL} | ||
COMPONENTS=${COMPONENTS} | ||
|
||
GRAPHDB_ZIP_FILE_NAME=graphdb-free-9.6.0-dist.zip | ||
POSTGRES_DB= | ||
POSTGRES_USER= | ||
POSTGRES_PASSWORD= | ||
KEYCLOAK_USER= | ||
KEYCLOAK_PASSWORD= | ||
KEYCLOAK_API_USER_USERNAME=apiadmincheckit | ||
KEYCLOAK_API_USER_PASSWORD= | ||
SGOV_SERVER_REPOSITORY_GITHUBUSERTOKEN= | ||
CHECKIT_SERVER_REPOSITORY_GITHUBUSERTOKEN= | ||
|
||
KEYCLOAK_REALMKEY= | ||
SGOV_SERVER_KEYCLOAK_CREDENTIALS_SECRET= | ||
TERMIT_SERVER_KEYCLOAK_CREDENTIALS_SECRET= | ||
CHECKIT_SERVER_KEYCLOAK_CREDENTIALS_SECRET= |
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 @@ | ||
"realm-management" : [ "manage-users", "view-clients", "view-users" ], "al-checkit-server" : [], "al-sgov-server" : [], "al-termit-server" : [] |
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,30 @@ | ||
#!/bin/bash | ||
|
||
# This shell script is used to create a user that can be used to access Keycloak's Admin API for the CheckIt Server application and start Keycloak afterwards. | ||
|
||
/opt/jboss/keycloak/bin/add-user-keycloak.sh -r $REALM_ID -u $KEYCLOAK_API_USER_USERNAME -p $KEYCLOAK_API_USER_PASSWORD | ||
|
||
# Set roles to allow API access | ||
|
||
echo "Configuring roles for Admin API user: $KEYCLOAK_API_USER_USERNAME" | ||
|
||
changelog_filepath="/tmp/changelog.txt" | ||
keycloak_add_user_filepath="/opt/jboss/keycloak/standalone/configuration/keycloak-add-user.json" | ||
search_roles="\"realm-management\".*\s*" | ||
replace_roles=$(cat /al-auth-server/api-roles.txt) | ||
|
||
sed -i "s/$search_roles/$replace_roles/w $changelog_filepath" $keycloak_add_user_filepath | ||
|
||
echo -n "Configuring roles for Admin API user: $KEYCLOAK_API_USER_USERNAME" | ||
if [ -s $changelog_filepath ]; then | ||
echo " - Done" | ||
rm $changelog_filepath | ||
else | ||
echo " - Failed" | ||
exit 1 | ||
fi | ||
|
||
# Start Keycloak | ||
|
||
/opt/jboss/tools/docker-entrypoint.sh | ||
|
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
Oops, something went wrong.