Deploying to a Cluster of WebSphere Servers Using WSAdmin
Continuous Deployment to a WebSphere Cluster can be a bit tricky, particularly called via your continuous delivery process. The good news is there’s an easier way to build a list of servers in the cluster using WebSphere WSAdmin. This DevOps blog covers how to get a list of servers in a cluster using wsadmin.
Improving Continuous Deployment Without Scripts
Managing a cluster of servers can be difficult to do with simple scripting. DeployHub provides a platform for developing more intelligence in your DevOps scripts that can be reused by other team members, and called as part of your continuous delivery workflow. Once you figure out that clever process, you can share it with others.
Whatever you use to orchestrate the calling of your continuous deployment process, what matters is the ability to create a reproducible DevOps process for calling wsadmin, one that all team members, from development to operations, can understand and track. DeployHub allows you to define a DevOps process, calling wsadmin to build a list of servers in the cluster, that can adapt to the different pipeline environments. Below is the code you will need to add to your DeployHub workflow step that calls the websphere cluster list.
clusterId=AdminConfig.getid("/ServerCluster:"+clusterName) clusterMembers=AdminConfig.list('ClusterMember', clusterId) clusterMembers = wsadminToList(clusterMembers)This code performs 3 basic steps:
1. Get the cluster id based on the cluster name.
2. Get the list of members for the cluster id.
3. Convert the list of members into a Jython array.