As the title says, I need to automate the deployment of an application running on a Payara-Full Pod.
For now I've manually deployed the .war file by copying it inside the Pod (through the kubectl cp
command), and then logging inside the pod console through kubectl exec --stdin --tty <pod-name> -- /bin/bash
.
Once I'm logged in, I access the Payara console by running the command asadmin
and logging in, and then I manually deploy the .war through deploy <filename>.war
.
How can I automate this process?
I thought of using a custom Payara image or an InitContainer, but I don't know what is the best practice for this type of deployment.
You can merely copy your .war to payara autodeploy directory inside container (${PAYARA_HOME}/glassfish/domins/[domain you use]/autodeploy
) and restart service. You web-app will be deployed automatically on domain restart.