Usual practice with WSO2 artifacts deployment is to, enable DepSync [4] (Deployement Synchronization). And upload the artifacts via the management console of master node. Which will then upload the artifacts to the configured SVN repository and notify the worker nodes regarding this new artifact via a cluster message. Worker nodes then download the new artifacts from the SVN repository and apply those.
In this approach you have to log in to the management console and do the artifacts deployment manually.
With the increasing use of continuous integration tools, people are looking in to the possibility of automating this task. There is a simple solution in which you need to configure a remote file copy to the relevant directory inside the [WSO2_SERVER_HOME]/repository/deployment/server directory. But this is a very low level solution.
Following is how to use Admin Services to do the same in much easier and much manageable manner.
NOTE: Usually all WSO2 servers accept deployable as .car file but WSO2 BPS prefer .zip for deploying BPELs.
For ESB,
- Call 'deleteApplication' in ApplicationAdmin service and delete the
application existing application - Wait for 1 min.
- Call 'uploadApp' in CarbonAppUploader service
- Wait for 1 min.
- Call 'getAppData' in ApplicationAdmin, if it returns application data
continue. Else break
- Call the 'listDeployedPackagesPaginated' in
BPELPackageManagementService with page=0 and
packageSearchString=”Name_” - Save the information
<ns1:version>
<ns1:name>HelloWorld2‐1</ns1:name>
<ns1:isLatest>true</ns1:isLatest>
<ns1:processes/>
</ns1:version> - Use the 'uploadService' in BPELUploader, to upload the new BPEL zip
file - Again call the 'listDeployedPackagesPaginated' in
BPELPackageManagementService with 15 seconds intervals for 3mins. - If it finds the name getting changed (due to version upgrade. Eg:
HelloWorld2‐4), then continue. (Deployment is success) - If the name doesn't change for 3mins, break. Deployment has some
issues. Hence need human intervention
[1] http://wso2.com/products/enterprise-service-bus/
[2] http://wso2.com/products/business-process-server/
[3] https://docs.wso2.com/display/BPS320/Calling+Admin+Services+from+Apps
[4] https://docs.wso2.com/display/CLUSTER420/SVN-Based+Deployment+Synchronizer
No comments:
Post a Comment