Configure WebLogic Clusters
Application Release Automation: Configuring WebLogic Cluster
This section describes the configuration steps required for the WebLogic plugin, to configure a WebLogic Cluster. This configuration is then used during deployment to create/modify the WebLogic Cluster. A domain can contain zero or more Clusters; the creation of just one Cluster is shown here but this is easily extended to multiple Clusters.
The Jython variable ClusterList is used to pass the list of zero or more Clusters to be created.
Before you begin
Open or create a new Jython environment-specific configuration file. This file will contain the configuration settings that will describe the WebLogic Cluster being created. Any change made to the Cluster properties in this file will be reflected in the Cluster created/modified by the tool.
About this task
This task creates the minimum set required for the creation of a WebLogic cluster.
Procedure
Open the environment-specific py file and import the Cluster template. This pre-populated template is typically populated with default values or None (Jython value for null) or a pre-defined name. The pre-defined names should typically be overridden in the environment-specific py file. Where a None value exists, the tool will preserve the default value setting.
from templates.ClusterTemplate import *
A pre-requisite is that the configuration for a Domain, AdminServer and at least one Managed Server has already been completed in the Jython file. Make a copy of the Cluster Template using the provided deepcopy function and assign an appropriate name to it; it can be any name of your choice.
There can be multiple Cluster objects and we will show afterwards how a list of your clusters is created
Cluster1 = copy.deepcopy(ClusterTemplate)
Change the required set of parameters of the Cluster template copy by accessing the parameters using Jython syntax. The parameters set will reflect the Cluster configuration that you want to create. Once the Cluster properties are set, the instance has to be added to the Cluster list so it's eligible for creation. The list is what is read by the tool.
ClusterList =[Cluster1,]
Example
The example below shows the configuration required to create a new Cluster with the name Cluster1. We also show the setting of some other Cluster parameters. Open and view the Cluster template (ClusterTemplate.py) file for a list of all the parameters that may be set and to understand the syntax to be used to set each property.
Cluster1 = copy.deepcopy(ClusterTemplate) Cluster1['Name']='GenericCluster' Cluster1['MulticastAddress']='239.192.0.0' Cluster1['MulticastPort']=8081 ClusterList = [Cluster1, Cluster2]
What to do next
You can now configure the other domain objects, such as WebLogic Machines.