Configuring WebLogic Managed Server

This section describes the configuration steps required to configure a WebLogic Managed Server when you're using the WebLogic plugin for Application Release Automation. This configuration is then used during deployment to create/modify the WebLogic Server.

A domain can contain zero or more Managed Servers; the creation of just one Server is shown here but this is easily extended to multiple Servers. The Jython variable ManagedServerList is used by the plugin to pass the list of zero or more Managed servers 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 managed Server being created. Any change done to the Server properties in this file will be reflected in the Server created/modified by the tool.

About this task

This task creates the minimum set required for the creation of a WebLogic Managed Server.

Procedure

Open the environment-specific py file and import the Managed Server 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.ManagedServerTemplate import *

A pre-requisite is that the configuration for a Domain and AdminServer has already been completed in the Jython file. Make a copy of the Managed Server 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 Managed Server objects and we will show afterwards how a list of your servers is created

ManagedServer_1 = copy.deepcopy(ManagedServerTemplate)

Change the required set of parameters of the Managed Server template copy by accessing the parameters using Jython syntax. The parameters set will reflect the Managed Server configuration that you want to create. Once the Manager Server properties are set, the instance has to be added to the ManagedServer list so it is eligible for creation. The list is what is read by the tool.

ManagedServerList =[ManagedServer_1,]

SSL Configuration

If you want to enable the SSL protocol for a Managed Server (t3s) you will need to set some additional properties. These properties are:

  • Protocol: which can have the values t3 or t3s. For SSL protocol enabling set it to t3s.
  • Default SSL Configuration: set this parameter to true if you want the keystore parameters of this Managed Server to be the same as the Admin Server ones.
  • Listen Port: set to the specific port used for SSL connections.
  • Identity Keystore File Name: the path to the keystore that has the server identification certificate.
  • Identity Keystore Type: depending on the type of the keystore.
  • Identity Keystore Passphrase: the passphrase to access the keystore.
  • Private Key Alias: the alias of the private key inside the keystore used for the server identification.
  • Private Key PassPhrase: the passphrase used to access the private key.
  • Trust Keystore File Name: the path to the keystore that has the trusting certificates (CAs).
  • Trust Keystore Type: depending on the type of the keystore.
  • Trust Keystore Passphrase: the passphrase to access the keystore.
  • Hostname Verification Ignored: to ignore the hostname verification.
  • Client Certificate Enforced: to enforce the client certification.

Example

The example below shows the configuration required to create a new Managed Server with the name ClusteredManagedServer1. We also show the setting of some other Managed Server parameters and the SSL configuration. Open and view the Managed Server template (ManagedServerTemplate.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.

ManagedServer_1 = copy.deepcopy(ManagedServerTemplate)
ManagedServer_1['Name']='ClusteredManagedServer1'
ManagedServer_1['WebServer']['WebServerLog']['FileName'] = 'ClusteredManagedServer1/access.log'
ManagedServer_1['Machine']='GenericMachine2'
ManagedServer_1['Cluster']='GenericCluster'
ManagedServer_1['NetworkAccessPoint']=None
ManagedServer_1['ListenPort']=22345
ManagedServer_1['ListenAddress'] = '82.165.195.36'
ManagedServer_1['ServerStart']['RootDirectory']='/var/tmp/RapidDeploy-Test/bea/WLSTestCases/11g/ManagedServersFolder'
ManagedServer_1['ServerStart']['ClassPath']=None
ManagedServer_1['ServerStart']['BeaHome']=None
#ManagedServer_1['ServerStart']['JavaHome']="/usr/java/jdk1.6.0_17/"
ManagedServer_1['ServerStart']['Username']='weblogic'
ManagedServer_1['ServerStart']['Password']='weblog1c'
ManagedServer_1['ServerStart']['Arguments']='-Xmx256m -Xms100m -XX:MaxPermSize=256m'

protocol = 't3s'

# SSL configuration
ManagedServer_2['defaultSSLConfig'] = 'false'

ManagedServer_1['SSL']['ListenPort'] = 7002
ManagedServer_1['SSL']['HostnameVerificationIgnored'] = 'true'
ManagedServer_1['SSL']['ClientCertificateEnforced'] = 'false'

ManagedServer_1['KeyStores'] = 'CustomIdentityAndCommandLineTrust'
ManagedServer_1['CustomIdentityKeyStoreFileName'] = 'C:/tmp/DemoIdentity.jks'
ManagedServer_1['CustomIdentityKeyStoreType'] = 'jks'
ManagedServer_1['CustomIdentityKeyStorePassPhraseEncrypted'] = 'DemoIdentityKeyStorePassPhrase'
ManagedServer_1['SSL']['ServerPrivateKeyAlias'] = 'demoidentity'
ManagedServer_1['SSL']['ServerPrivateKeyPassPhraseEncrypted'] = 'DemoIdentityPassPhrase'

ManagedServer_1['CustomTrustKeyStoreFileName'] = 'C:/tmp/DemoTrust.jks'
ManagedServer_1['CustomTrustKeyStoreType'] = 'jks'
ManagedServer_1['CustomTrustKeyStorePassPhraseEncrypted'] = 'DemoTrustKeyStorePassPhrase'

ManagedServerList =[ManagedServer_1,]

What to do next

You can now configure the other domain objects, such as WebLogic Clusters.