Configure WebLogic Machines

Application Release Automation: Configuring WebLogic Machines

This section describes the configuration steps required to configure a WebLogic Machine when you�re using the WebLogic plugin. This configuration is then used during deployment to create/modify the WebLogic Machine. A domain can contain zero or more Machines; the creation of just one Machine is shown here but this is easily extended to multiple Machines.

The Jython variable MachineList is used to pass the list of zero or more Machines 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 machine being created. Any change made to the Machine properties in this file will be reflected in the Machine created/modified by the tool.

About this task

This task creates the minimum set required for the creation of a WebLogic domain. Only one domain may be created per configuration file.

Procedure

Open the environment-specific py file and import the Machine 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.MachineTemplate import *

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

    Machine1 = copy.deepcopy(MachineTemplate)

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

MachineList =[Machine1,]

Example

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

Machine1 = copy.deepcopy(MachineTemplate)
Machine1['Name']='GenericMachine1'
Machine1['NodeManager']['ListenAddress']='localhost'
Machine1['NodeManager']['ListenPort']=5555
MachineList = [Machine1,]

What to do next

You can now configure the other domain objects, such as WebLogic DataSources, JMSResources and so on.