As discussed in WFLY-20611, we need to improve the user experience to create user credentials (application & management) for cloud deployment.
One of the approach is to use add-users.sh script to create these user credentials outside of the server directory and inject them to the deployment as a secret.
Currently, the add-user.sh script fails if the directories specified by -sc or -dc do not exist:
mkdir users-secret
./target/server/bin/add-user.sh -sc users-secret
What type of user do you wish to add?
a) Management User (mgmt-users.properties)
b) Application User (application-users.properties)
(a): a
* Error *
WFLYDM0023: No mgmt-users.properties files found.
We could add an option to create the required properties file if they do not exist.
Something like:
-cf, --create-files Create files & directories if they do not exist
With that enhancement, create a Kubernetes secret to hold the WildFly credentials would be:
./target/server/bin/add-user.sh -a -cf -u 'quickstartUser' -p 'quickstartPwd1!' -sc user-secrets kubectl create secret generic users-secret --from-file=users-secret
This flag would be optional and disabled by default (to preserve the existing behaviour)
- is related to
-
WFLY-20611 Common functionality for quickstarts to add users in provisioning
-
- Open
-