Reputation: 41300
How do you deploy to a WebSphere Liberty Collective? At the moment I am just copying the EAR files across into each node's apps folder and adding a reference to it in server.xml
Is there some sort of deployment manager say I upload to the control node and it will replicate across?
Upvotes: 0
Views: 1044
Reputation: 738
Another option besides Brian's suggestion is to package the server with the app and deploy to the hosts you want using either Admin Center's Deploy tool (https://www.ibm.com/support/knowledgecenter/was_beta/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_ui_deploy.html) or the Deploy Service REST API (https://www.ibm.com/support/knowledgecenter/was_beta_liberty/com.ibm.websphere.wlp.nd.multiplatform.doc/ae/twlp_deployservice_liberty.html). Note that both of these options end up creating a new server in your collective with app instead of adding an app to an existing server, so it may not be what you're after.
The other thing I'll mention is that if you don't want to have to have to update the server.xml to reference the application, you can place it in the server's dropins directory.
Upvotes: 1
Reputation: 181
There is no Deployment Manager, but a Collective Controller which is not the same. There is an MBean that is available to deploy applications to a cluster, and a simple Jython application that can be used to deploy the application. This can be run remotely, but you would need a copy of the truststore.
jython manageAppOnCluster.py --install=\path\to\war.war --truststore=\path\to\controller\resources\security\trust.jks --truststorePassword=password --host=localhost --port=9443 --user=admin --password=adminpwd --clusterName=clustername
Please note that your Liberty servers will need to give write access to the apps directory, which is done by adding the following to the server.xml:
<remoteFileAccess>
<writeDir>${server.config.dir}</writeDir>
</remoteFileAccess>
If you just have 1 member and not in a cluster, then you can just drop the application into the apps directory as you are doing.
Upvotes: 3