-
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 Makefile -- defines test env setup steps in make form .env -- Variables for Makefile and docker-compose 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 docker-compose.yml -- defines containerized test env docker-compose.gating.yml -- defines minimal containerized test env for gating docker-compose.samba.yml -- defines containerized test env with samba *NOTE* docker-compose.yml relies on SSSD containers to provide ipa, dns, ldap. 3. README.md update to show how to start the container test environment Signed-off-by: Scott Poore <[email protected]>
- Loading branch information
Showing
13 changed files
with
567 additions
and
34 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,4 +1,10 @@ | ||
# This is the docker-compose environment file. | ||
# Copy it to .env or use --env-file=env.example on docker-compose command. | ||
REGISTRY=quay.io/ftrivino | ||
#REGISTRY=quay.io/ftrivino | ||
REGISTRY=localhost/sssd | ||
TAG=latest | ||
|
||
PLUGIN_TAG=kc19_intg | ||
PLUGIN_VER=0.0.1 | ||
PLUGIN_DIR=scim-keycloak-user-storage-spi-${PLUGIN_TAG} | ||
PLUGIN_JAR=scim-user-spi-0.0.1-SNAPSHOT.jar |
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,44 @@ | ||
include .env | ||
|
||
up: datadir plugin | ||
docker-compose up --detach --no-recreate | ||
|
||
up-gating: | ||
docker-compose -f docker-compose.gating.yaml up --no-recreate --detach | ||
|
||
up-samba: | ||
docker-compose -f docker-compose.samba.yaml up --no-recreate --detach | ||
|
||
stop: | ||
docker-compose stop | ||
|
||
down: stop | ||
docker-compose -f docker-compose.samba.yaml \ | ||
-f docker-compose.gating.yaml \ | ||
-f docker-compose.yml down | ||
|
||
datadir: | ||
ifeq (,$(wildcard data/keycloak)) | ||
mkdir -p data/keycloak | ||
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) && \ | ||
JAVA_HOME=/usr/lib/jvm/java-11-openjdk mvn clean package && \ | ||
mv target/$(PLUGIN_JAR) ../ && \ | ||
chown 994:994 ../${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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
services: | ||
dns: | ||
restart: always | ||
image: ${REGISTRY}/ci-dns:${TAG} | ||
container_name: dns | ||
env_file: ./env.containers | ||
volumes: | ||
- ./data/configs/dnsmasq.conf:/etc/dnsmasq.conf | ||
cap_add: | ||
- NET_RAW | ||
- NET_ADMIN | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.2 | ||
|
||
ipa: | ||
image: ${REGISTRY}/ci-ipa:${TAG} | ||
container_name: ipa | ||
hostname: master.ipa.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./shared:/shared:rw | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
- SYS_CHROOT | ||
- NET_ADMIN | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.10 | ||
|
||
ipa-tuura: | ||
#image: quay.io/idmops/bridge:latest | ||
image: localhost/ipa-tuura/base:latest | ||
container_name: ipa-tuura | ||
hostname: ipa-tuura.bridge.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./shared:/shared:rw | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- SYS_CHROOT | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.14 | ||
|
||
keycloak: | ||
image: ${REGISTRY}/ci-keycloak:${TAG} | ||
#image: quay.io/keycloak/keycloak:${KC_TAG} | ||
container_name: keycloak | ||
hostname: master.keycloak.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./data/keycloak/scim-user-spi-${PLUGIN_VER}-SNAPSHOT.jar:/opt/keycloak/providers/scim.jar | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- SYS_CHROOT | ||
- NET_ADMIN | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.70 | ||
|
||
networks: | ||
ipa-tuura: | ||
name: ipa-tuura-ci | ||
driver: bridge | ||
ipam: | ||
config: | ||
- subnet: 172.16.100.0/24 | ||
gateway: 172.16.100.1 | ||
options: | ||
driver: host-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,100 @@ | ||
services: | ||
dns: | ||
restart: always | ||
image: ${REGISTRY}/ci-dns:${TAG} | ||
container_name: dns | ||
env_file: ./env.containers | ||
volumes: | ||
- ./data/configs/dnsmasq.conf:/etc/dnsmasq.conf | ||
cap_add: | ||
- NET_RAW | ||
- NET_ADMIN | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.2 | ||
|
||
ipa-tuura: | ||
#image: quay.io/idmops/bridge:latest | ||
image: localhost/ipa-tuura/base:latest | ||
container_name: ipa-tuura | ||
hostname: ipa-tuura.bridge.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./shared:/shared:rw | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- SYS_CHROOT | ||
- NET_ADMIN | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.14 | ||
|
||
keycloak: | ||
image: ${REGISTRY}/ci-keycloak:${TAG} | ||
#image: quay.io/keycloak/keycloak:${KC_TAG} | ||
container_name: keycloak | ||
hostname: master.keycloak.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./data/keycloak/scim-user-spi-${PLUGIN_VER}-SNAPSHOT.jar:/opt/keycloak/providers/scim.jar | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- SYS_CHROOT | ||
- NET_ADMIN | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.70 | ||
|
||
samba: | ||
image: ${REGISTRY}/ci-samba:${TAG} | ||
container_name: samba | ||
hostname: dc.samba.test | ||
dns: 172.16.100.2 | ||
env_file: ./env.containers | ||
volumes: | ||
- ./shared:/shared:rw | ||
cap_add: | ||
- SYS_ADMIN | ||
- SYS_PTRACE | ||
- SYS_CHROOT | ||
- NET_ADMIN | ||
- AUDIT_WRITE | ||
- AUDIT_CONTROL | ||
security_opt: | ||
- apparmor=unconfined | ||
- label=disable | ||
- seccomp=unconfined | ||
networks: | ||
ipa-tuura: | ||
ipv4_address: 172.16.100.30 | ||
|
||
networks: | ||
ipa-tuura: | ||
name: ipa-tuura-ci | ||
driver: bridge | ||
ipam: | ||
config: | ||
- subnet: 172.16.100.0/24 | ||
gateway: 172.16.100.1 | ||
options: | ||
driver: host-local |
Oops, something went wrong.