refactor(distro): assume port 8085 for Keycloak to avoid clash with Vert.x Gateway API Verticle
MODIFY
README.md
README.md
@@ -37,7 +37,7 @@ Once Apiman has started up, and if all went well, you can point your browser to
* Username: `admin`
* Password: `admin123!`
-You can log into the Keycloak admin console via http://localhost:8081/admin (same credentials as above).
+You can log into the Keycloak admin console via http://localhost:8085/admin (same credentials as above).
This quickstart seeds a bunch of content into apiman. This is not strictly necessary, but it does populate the API Manager with some data so that it doesn't feel so lonely the first time you log in.

MODIFY
distro/data/src/main/resources/README.md
distro/data/src/main/resources/README.md
@@ -14,7 +14,7 @@ Historically, a Keycloak server was bundled with the Apiman WildFly overlay; thi
* [Bootstrap Keycloak with the demonstration Apiman realm definition](https://www.keycloak.org/server/importExport) in `data/apiman-realm-for-keycloak.json`.
-* Set the `APIMAN_AUTH_URL` environment variable to point to the running Keycloak instance; for example `export APIMAN_AUTH_URL=http://localhost:8081/auth`.
+* Set the `APIMAN_AUTH_URL` environment variable to point to the running Keycloak instance; for example `export APIMAN_AUTH_URL=http://localhost:5/auth`.
You can modify details such as secrets, trust manager settings, etc, in `standalone/configuration/standalone-apiman.xml`.
Look for the Keycloak subsystem `<subsystem xmlns="urn:jboss:domain:keycloak:1.1">...</subsystem>`.

MODIFY
distro/wildfly/src/main/resources/overlay/standalone/configuration/standalone-apiman.xml
distro/wildfly/src/main/resources/overlay/standalone/configuration/standalone-apiman.xml
<subsystem xmlns="urn:jboss:domain:keycloak:1.1">
<secure-deployment name="apiman.war">
<realm>${apiman.auth.realm, env.APIMAN_AUTH_REALM:apiman}</realm>
- <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:/auth}</auth-server-url>
+ <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:http://localhost:8085}</auth-server-url>
<resource>apiman</resource>
<credential name="secret">${apiman.auth.api.secret, env.APIMAN_AUTH_API_SECRET:password}</credential>
<disable-trust-manager>true</disable-trust-manager>
</secure-deployment>
<secure-deployment name="apimanui.war">
<realm>${apiman.auth.realm, env.APIMAN_AUTH_REALM:apiman}</realm>
- <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:/auth}</auth-server-url>
+ <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:http://localhost:8085}</auth-server-url>
<resource>apimanui</resource>
<credential name="secret">${apiman.auth.ui.secret, env.APIMAN_AUTH_UI_SECRET:password}</credential>
<disable-trust-manager>true</disable-trust-manager>
</secure-deployment>
<secure-deployment name="apiman-gateway-api.war">
<realm>${apiman.auth.realm, env.APIMAN_AUTH_REALM:apiman}</realm>
- <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:/auth}</auth-server-url>
+ <auth-server-url>${apiman.auth.url, env.APIMAN_AUTH_URL:http://localhost:8085}</auth-server-url>
<resource>apiman-gateway-api</resource>
<credential name="secret">${apiman.auth.gateway.secret, env.APIMAN_AUTH_GATEWAY_SECRET:password}</credential>
<disable-trust-manager>true</disable-trust-manager>

MODIFY
tools/server-all/pom.xml
tools/server-all/pom.xml
<copy file="${apiman.apiman-tools-services.war}" tofile="${apiman.wildfly.webapps}/services.war"
overwrite="true" />
- <!-- Point Apiman auth to port 8081, where (hopefully) Keycloak is running from Docker -->
+ <!-- Point Apiman auth to port 8085, where (hopefully) Keycloak is running from Docker -->
<echo file="${apiman.wildfly.home}/bin/standalone.conf" append="true"><![CDATA[
if [[ -z $APIMAN_AUTH_URL ]]; then
- export APIMAN_AUTH_URL=http://localhost:8081/
+ export APIMAN_AUTH_URL=http://localhost:8085/
fi
echo "*** Please ensure Keycloak is running and available at $APIMAN_AUTH_URL or set the environment variable APIMAN_AUTH_URL to your Keycloak instance ***"
]]></echo>

MODIFY
tools/server-all/src/main/resources/docker/docker-compose.yml
tools/server-all/src/main/resources/docker/docker-compose.yml
@@ -13,11 +13,11 @@ services:
./bin/kc.sh build
./bin/kc.sh start-dev --import-realm
ports:
- - "8081:8080"
+ - "8085:8080"
environment:
- "KEYCLOAK_ADMIN=admin"
- "KEYCLOAK_ADMIN_PASSWORD=admin123!"
- - "KEYCLOAK_FRONTEND_URL=http://localhost:8081"
+ - "KEYCLOAK_FRONTEND_URL=http://localhost:8085"
volumes:
- ${PWD}/apiman-realm-for-keycloak.json:/opt/keycloak/data/import/apiman-realm-for-keycloak.json
- ${PWD}/apiman-keycloak-theme.jar:/opt/keycloak/providers/apiman-keycloak-theme.jar

refactor(distro): assume port 8085 for Keycloak to avoid clash with Vert.x Gateway API Verticle