-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker-compose: updates for ipa-tuura + keycloak
Test containers and Makefiles to build test environment included. 1. Container src/Containerfile -- defines systemd container to build src/Makefile -- defines container build steps in make form src/install/ipa-tuura.env -- ipa-tuura service env file for container src/install/ipa-tuura.service -- ipa-tuura systemd service file for container 2. Docker Compose docker-compose.yml -- defines containerized test env Makefile -- defines test env setup steps in make form .env -- Variables for Makefile data/configs/dnsmasq.conf -- config for dns container data/configs/nm_zone_test.conf -- config for dns container env.containers -- env vars for containers. mostly used by keycloak src/install/setup_bridge.sh -- add SCIM plugin config to keycloak for ipa-tuura bridge 3. Networking Info for containers reset to original 4. README.md update to show how to start the container test environment Signed-off-by: Scott Poore <[email protected]>
- Loading branch information
Showing
11 changed files
with
360 additions
and
20 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
include .env | ||
|
||
up: datadir cert plugin | ||
docker-compose up --detach | ||
|
||
stop: | ||
docker-compose stop | ||
|
||
down: stop | ||
docker-compose down | ||
|
||
datadir: | ||
ifeq (,$(wildcard data/keycloak)) | ||
mkdir -p data/keycloak | ||
endif | ||
|
||
#cert: datadir ipaca | ||
cert: datadir | ||
ifeq (,$(wildcard data/keycloak/server.crt)) | ||
cd data/configs && \ | ||
openssl req -x509 -nodes -newkey rsa:4096 -keyout server.key \ | ||
-out server.crt -sha256 -days 365 -subj '/CN=master.keycloak.test' && \ | ||
mv server.* ../keycloak && \ | ||
cd ../keycloak && \ | ||
keytool -import -keystore server.keystore \ | ||
-file server.crt -alias truststore \ | ||
-trustcacerts -storepass Secret123 -noprompt && \ | ||
chown 1000 server.* | ||
endif | ||
|
||
ipaca: | ||
ifeq (,$(wildcard data/keycloak/ipaca.crt)) | ||
cd data/keycloak && \ | ||
curl -o ipaca.crt http://master.ipa.test/ipa/config/ca.crt && \ | ||
chown 1000 server.* | ||
endif | ||
|
||
container: | ||
$(MAKE) -C src | ||
|
||
plugin: datadir | ||
ifeq (,$(wildcard data/keycloak/$(PLUGIN_JAR))) | ||
cd data/keycloak && \ | ||
wget https://github.com/justin-stephenson/scim-keycloak-user-storage-spi/archive/refs/tags/$(PLUGIN_TAG).tar.gz && \ | ||
tar zxvf $(PLUGIN_TAG).tar.gz && \ | ||
pushd $(PLUGIN_DIR) && \ | ||
mvn clean package && \ | ||
mv target/$(PLUGIN_JAR) ../ | ||
endif | ||
|
||
bridge: | ||
source ./env.containers && \ | ||
bash -c "src/install/setup_bridge.sh" | ||
|
||
clean: | ||
rm -rf data/keycloak/* |
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,2 +1,11 @@ | ||
# Environment variables set in all started containers | ||
CONTAINER=yes | ||
KEYCLOAK_ADMIN=admin | ||
KEYCLOAK_ADMIN_PASSWORD=Secret123 | ||
KC_HOSTNAME=master.keycloak.test | ||
KC_HOSTNAME_PORT=8443 | ||
KC_HTTPS_CERTIFICATE_FILE=/opt/keycloak/conf/server.crt | ||
KC_HTTPS_CERTIFICATE_KEY_FILE=/opt/keycloak/conf/server.key | ||
KC_HTTPS_TRUST_STORE_FILE=/opt/keycloak/conf/server.keystore | ||
KC_HTTPS_TRUST_STORE_PASSWORD=Secret123 | ||
KC_HTTP_RELATIVE_PATH=/auth |
Oops, something went wrong.