It seems that the instructions within Deploy UAA to Cloud Foundry may be incomplete or outdated? Some possible issues...
1. Memory Spec is Too Low
When testing the deployment of UAA to a Cloud Foundry installation (PWS), the specification of 512M for UAA is too low:
cf push APP-NAME -m 512M -p PATH-TO-WAR-FILE --no-start
Until pushed > 672M of memory, the logs showed insufficient memory or that UAA would not spin up as healthy:
2018-10-25T06:41:11.22-0600 [APP/PROC/WEB/0] ERR Cannot calculate JVM memory configuration: There is insufficient memory remaining for heap. Memory available for allocation 512M is less than allocated memory 672257K (-XX:ReservedCodeCacheSize=240M, -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=160257K, -Xss1M * 250 threads)
2018-10-25T07:14:21.60-0600 [HEALTH/0] ERR Failed to make TCP connection to port 8080: connection refused
2018-10-25T07:14:21.60-0600 [CELL/0] ERR Timed out after 1m0s: health check never passed.
2. Clients Setup is Not Clear
Interacting with UAA typically requires obtaining a token from a client account. Usually this is "admin" to start with. Running UAA locally is different than running in CF, but this is not explicitly mentioned or detailed. (Which could leave the dev with a non-working UAA install when deployed to CF.)
Locally, the admin client comes from
\uaa\src\main\webapp\WEB-INF\spring\oauth-clients.xml
But when running in CF, the admin client must be specified somewhere elsewhere as oauth-clients.xml
does not seem to be used.
To run remotely...
The admin secret comes from uaa_admin_client_secret
in a cf-deployment according to @jhamon in Issue 620.
...or...
The admin client account can also be specified directly in uaa.yml
(or an override) as specified in Issue 543.
Including instructions on how to set up the admin account for a CF deployment might be helpful.
3. required_configuration.yml vs uaa.yml
When running locally (per \uaa\build.gradle
), required_configuration.yml
is used. But in a CF deployment, this file is NOT used? Which means that uaa.yml
(or an override), must be re-configured in order to get fully running UAA instance.
This seems to be an important step that could be mentioned or referred to (along with a link to some guidance).
Obviously the docs must strike a balance between highlighting the basics and diving into too much detail, but at least mentioning these steps above might save some time for others since they seem to be required.
If I am approaching the deployment of UAA to CF improperly, any correction would be appreciated.
Thanks!