Automating WLSDM Upgrade in Multiple Domains

WLSDM for WebLogic
May 12 · 4 min read

The wlsdm update process is quite simple. wlsdm_agent.jar and wlsdm.war are replaced by new packages. The update steps are exactly as follows.

  1. Replace wlsdm_agent.jar file with the new release and keep wlsdm_agent.jar JVM arguments. *($JAVA_OPTIONS)
  2. Replace wlsdm.war file with the new release to WebLogic domain’s console-ext folder.
  3. (Re)start WebLogic managed server(s) then admin server.
  4. That’s all! WLSDM will be upgraded after restart processes.

For more Infomation : https://wlsdm.com/docs/README#VII.Upgrade&Reinstall&Uninstall

While the update steps are very simple, things can get a little more difficult as the number of domains increases. This can create an extra workload for you. In this blog post, we will focus on how to transfer wlsdm jar and war packages then subsequently restarting managed servers and admin servers through the central operation server. This scenario created consists of 2 steps.

  1. Distribute package to servers ( ./bulkScp.sh servers.csv).
  2. Restart managed servers over WLST if the server has WLSDM params. Then Restart Admin Server. If Admin Server has a machine, it will be over Node Manager, otherwise we’ll connect over ssh and execute the startWebLogic.sh script from central operation server.
    ( ./wlst.sh restartForWLSDMUpgrade.py servers.csv )

Pre — Requirement : What is Expect Command ?

Installation with Source
In case you cannot load with package manager, you can download the files from the link below and then install them by applying the commands in sequence.

http://prdownloads.sourceforge.net/tcl/tcl8.5.15-src.tar.gz
https://downloads.sourceforge.net/expect/expect5.45.4.tar.gz

tar xzf tcl8.5.15-src.tar.gz
cd tcl8.5.15/unix
./configure --prefix=$HOME/local
make
make install
cd ../../tar xzf expect5.45.tar.gz
cd expect5.45
./configure --prefix=$HOME/local
make
make install

Transfering Packages to Servers with Bulk Scp Script

Now let’s examine in bulkScp script.

#5 : Hosts’ informations is taken from the host file which is passed as a parameter.
#10 : We use the -c parameter with expect command because of we call expect from the bash script file.
#12 : log_file will record the session to the file.
#13 : Spawn command opens a new process.
#15–16 : Expect command waits for spawned process. If output contains yes/no, we’ll send yes answer.(If the remote host key is unknown to your SSH client.)
#20 :
If output contains *pass* it, we send $_PASS information from the host file.

The step of distributing packages is finished. Next step is restarting managed and admin servers.

Restarting Managed and Admin Servers Over WLST or SSH

#12–47 : These lines contain functions for simply restarting the servers.
#49–59 : Server parameters are taken to check whether wlsdm parameter is present.
#64–81 : Here it is checked if the the AdminServer is targeted to a machine.
#95–117 :
This function restarts the Admin Server. If it is not targeted to a machine, the ssh script given in line 163 is executed.

The SSH Script is as follows. You can rearrange the scripts in this post according to your own environment and easily complete wlsdm upgrade process.

Please Watch YouTube Tutorial Video For Upgrade WLSDM:

Installation is really easy and you can setup a complete monitoring infrastructure in less than 5 minutes. If you want to try then go to download page below URL:

https://wlsdm.com/download

Download WLSDM Now !

WLSDM for WebLogic

WLSDM is a WebLogic console extension which enables…

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

WLSDM for WebLogic

Written by

WLSDM for WebLogic

Native Oracle WebLogic Monitoring WLSDM is developed by the best WebLogic developers for the best WebLogic administrators to support mission critical HA domains. Supports all plain WebLogic and Fusion Middleware (FMW) WebLogic domains. Download now! https://wlsdm.com/download

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store