-
Notifications
You must be signed in to change notification settings - Fork 2
Deploying Gluu Server with Docker
This is a developmental build of Gluu Server utilizing docker containers. Currently working on integrating Shibboleth and minimizing image sizes.
Install Docker:
sudo apt install docker.io
Run Consul to use as a key-value store for the config-init values to be called by the other Gluu Server container modules:
IP_ADDRESS can be localhost or the external IP. It must be the same throughout these instructions.
sudo docker run -d \
--name consul \
--net=host \
consul agent \
-server \
-bind=<IP_ADDRESS> \
-retry-join=<IP_ADDRESS> \
-bootstrap \
-client=<IP_ADDRESS> \
-ui
Here we run config-init, which is similar to setup.py in a standard Gluu Server deployment.
Note: This task must finish before you can continue on. To check, run docker ps -a and make sure the config-init image has EXITED, which signals the task has completed. Make sure to change the following variables:
domain: The domain name of your Gluu Server. email: Self explanatory admin-pw: This is the password used to log in to Gluu and also your LDAP. org-name: Your organization
sudo docker run -d \
gluufederation/config-init:3.1.2_alpine \
--kv-host <IP_ADDRESS> \
--kv-port 8500 \
--domain <enter-domain-here> \
--email '<email-here>' \
--admin-pw <password-here> \
--org-name '<organization-here>' \
--save
Now run openDJ first, as oxAuth and oxTrust require it to run successfully.
sudo docker run -d \
--name opendj \
-e GLUU_KV_HOST=<IP_ADDRESS> \
-e GLUU_LDAP_INIT=true \
-e SERVICE_NAME=ldap-master \
-e GLUU_LDAP_INIT_HOST=<IP_ADDRESS> \
-e GLUU_LDAP_INIT_PORT=1389 \
-p 1389:1389 \
gluufederation/opendj:3.1.2_alpine
Next we're going to initialize the oxAuth and oxTrust containers.
sudo docker run -d \
--name oxauth \
-e GLUU_KV_HOST=<IP_ADDRESS> \
-e GLUU_LDAP_URL=<IP_ADDRESS>:1389 \
-e SERVICE_NAME=oxauth \
-p 8081:8080 \
gluufederation/oxauth:3.1.2_alpine
Note here we need to change the --add-host=<enter-domain-here>:.. to match the domain from our instance of config-init
sudo docker run -d \
--name oxtrust \
-e GLUU_KV_HOST=<IP_ADDRESS> \
-e GLUU_LDAP_URL=<IP_ADDRESS>:1389 \
-e SERVICE_NAME=oxtrust \
--add-host=<enter-domain-here>:<IP_ADDRESS> \
-p 8082:8080 \
gluufederation/oxtrust:3.1.2_alpine
Now run NGINX in lieu of Apache2 in a standard Gluu Server installation.
sudo docker run -d \
--name nginx \
-e GLUU_KV_HOST=<IP_ADDRESS> \
-e GLUU_OXAUTH_BACKEND=<IP_ADDRESS>:8081 \
-e GLUU_OXTRUST_BACKEND=<IP_ADDRESS>:8082 \
-e SERVICE_NAME=nginx \
-p 80:80 \
-p 443:443 \
gluufederation/nginx:latest