Writing a WLST script is an art of Administration. You will be using Python code, Jython scripting for building WebLogic platforms SOA, OSB, Portals, WebCenter, FMW. WLST is a Weapon in the hands of Middleware Engineers, Most of the WLST automations makes life easy for WebLogic Administrator, Configuring, Monitoring JDBC, JMS, JVM, Threads made simple.

Search This Blog

Oracle Fusion Middleware Administration Course

OFMW Admin Course

Saturday, August 2, 2014

Create Managed Server using WLST

This post is intended for those who just started working on WLST for configuration of WebLogic domain.
Here I have a sample WLST script that creates a Managed server.
You have two choices to configure managed server: offline and online mode. Here we have online configuration script.
Here the first trail with the direct connection parameter passing. I have tried it on my Oracle VirtualBox running WebLogic 12.1.2. I know this is bad coding style that is using hardcoding the values in the script.

Better you might try with properties file that can be updated frequently for your domains.

Script best practices says all the domain parameters must be generic and develop using propertice file.
try it yourself :)

The output of the above script

pavanbsd@ubuntu:~/pybin$ wlst createms.py
Initializing WebLogic Scripting Tool (WLST) ...
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Please enter managed server:BAms2
please enter listenip:192.168.1.106
please enter port:9102
Connecting to t3://192.168.1.106:9100 with userid weblogic ...
Successfully connected to Admin Server "BA_admin" that belongs to domain "BAdomain".
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
Location changed to edit tree. This is a writable tree with
DomainMBean as the root. To make changes you will need to start
an edit session via startEdit().
For more help, use help('edit')
You already have an edit session in progress and hence WLST will
continue with your edit session.
Starting an edit session ...
Started edit session, please be sure to save and activate your
changes once you are done.
Activating all your changes, this may take a while ...
The edit lock associated with this edit session is released
once the activation is completed.
Activation completed

Oracle WebLogic Administration Course

Followers

About Me

I am working as a Technical Consultant and providing solutions in WebLogic based platform architect, SOA, integration, Oracle Fusion Middleware, security and web development. Worked extensively on automation with generic WLST Scripts. Many people were impressed with my automation tasks which are developed with a foresight in re usability, troubleshooting the issues.

Worked as Java Developer till 2006. Contributed automation scripts for the book titled "Advanced WebLogic Server Automation". Started Technical blogging since 2008 for the following blogs: