The following scenarios were tested against WildFly 9 and Keycloak 1.7.0.Final/1.8.0.CR3
The following setup covers scenarios where people wants to deploy Keycloak and UPS in separated Wildfly instances.
- Deploy Keycloak following these instructions
- Import the realm configuration file and start WildFly in a separate port
$UPS_HOME/bin/keycloak-setup.sh --ups-host=http://localhost:8082 --wildfly-offset=3 --realm-import=$UPS_HOME/bin/ups-realm-template.json
- Keycloak server should start with
aerogear
realm imported
-
Follow the setup instructions described here.
-
Setup the Keycloak subsystem
$UPS_HOME/bin/ups-setup.sh --subsystem-setup
- Start WildFly in a separate port
$WILDFLY_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=2 --server-config=standalone-full.xml
- Setup UPS instance to properly be attached to Keycloak instance
$UPS_HOME/bin/ups-setup.sh --ups-host=localhost:9992 --realm=aerogear --auth-server=http://localhost:8083
- Deploy the UnifiedPush server
The following setup covers scenarios where people wants to have multiple WildFly instances of UPS authenticating against just one server running Keycloak.
One Keycloak instance, multiple UnifiedPush servers
-
Deploy Keycloak following these instructions
-
Create the realm configuration file or just copy from UPS template
cp ups-realm-template.json ups-production-realm.json
cp ups-realm-template.json ups-dev-realm.json
- Change the realm name
For example, at ups-dev-realm.json
change "realm": "aerogear"
to "realm": "aerogear-dev"
.
- Import the realm configuration file and start WildFly in a separate port
$UPS_HOME/bin/keycloak-setup.sh --ups-host=http://localhost:8081,http://localhost:8082 --wildfly-offset=3 --realm-import=$UPS_HOME/bin/ups-dev-realm.json,$UPS_HOME/bin/ups-production-realm.json
-
Follow the setup instructions described here.
-
Setup the Keycloak subsystem
$UPS_HOME/bin/ups-setup.sh --subsystem-setup
$UPS_HOME/bin/ups-setup.sh --subsystem-setup
- Setup UPS instance to properly be attached to Keycloak instance
$UPS_HOME/bin/ups-setup.sh --ups-host=localhost:9991 --realm=aerogear-dev --auth-server=http://localhost:8083
$UPS_HOME/bin/ups-setup.sh --ups-host=localhost:9992 --realm=aerogear-production --auth-server=http://localhost:8083
- Deploy the UnifiedPush server
The following scenarios applies for sittuations where people already have Keycloak deployed and want to have all the setup in a single realm.
This is only available on Keycloak 1.8.x.
-
Deploy Keycloak following these instructions
-
Visit http://yourhost/auth/
-
Setup username and password
-
Open the Realm template located at $UPS_HOME/bin and replace
dummyhost
, by your host. -
Import users, clients and roles with Partial import
-
Follow the setup instructions described here.
-
Setup the Keycloak subsystem
$UPS_HOME/bin/ups-setup.sh --subsystem-setup
- Start WildFly in a separate port
$WILDFLY_HOME/bin/standalone.sh -Djboss.socket.binding.port-offset=2 --server-config=standalone-full.xml
- Setup UPS instance to properly be attached to Keycloak instance
$UPS_HOME/bin/ups-setup.sh --ups-host=localhost:9992 --realm=master --auth-server=http://localhost:8083
- Deploy the UnifiedPush server