Faster domain setup and enable secure-admin without starting or restarting domain

We create virtual machine instances and then use asadmin to create a new domain on them; copy libraries (mostly jdbc drivers) to the domain lib directory; start the domain; configure the domain by running asadmin commands to remove and add (replace) jvm options, disable phone home (we are running on air gapped network), set logging properties and log attributes, set transaction timeout values, add pool and queue resources from xml resource files, create realms, setup certificates (add our certs to key/trust stores, delete all the preconfigure ca certs and only add the ones we explicitly manage), configure thread pool sizes, enable secure admin; restart the domain for some of the settings to apply such as enable secure admin and configuring the jvm options; and then deploy all of our applications to the domain. This is a slow process due to restarting the domain, each asadmin call being a separate process forked and having to establish a new connection to the domain each time, and having to run a separate deploy command for each application we want to deploy. This process also results in several warnings about “Unprocessed event: UnprocessedChangeEvent …” “Addition of: … cannot take effect without server restart” in the domain log. Is there a way to configure settings like jvm options before starting the domain to avoid these warnings in the log and avoid the costly restart? Are there other techniques that people use to speed up this domain setup and deployment process? An important part of our automated creation is for any failures in deployment commands to result in error exit code and stop any further setup processing so that the system knows that creation/deployment failed.

2 Likes