You are on page 1of 23

ORACLE

PRODUCT
LOGO

WebLogic Server Administration


Roger Freixa
Principal Product Manager
1 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
WebLogic
Concepts

2 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.


Key Concepts
WebLogic Terminology
• Domain - group of instances and clusters under
unified control

• Administration Server - central configuration


controller for the domain

• Managed Server - Instance that hosts


applications and required resources

• Cluster - group of managed servers to provide


increased scalability and reliability

• Node Manager - per-machine process used to


start, stop and auto-restart instances
Key Concepts
Installation distinct from Domain configuration
Key Concepts
Clusters
• Can have zero or more clusters in a domain
• Clusters can have one or more servers
• Some servers in a domain may not belong to any cluster

Example domain: 2 clusters - 1 for hosting “UI” part of a distributed app,1 for “Business Logic”
Key Concepts
Single Administration Server for a Domain
Installation
& Configuration

7 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.


Installation (add ZIP installer)
Installer
• Different installers
• Net (selective download) installer, Package (full) installer, Generic (jar, Unix) installer

One installer - different install modes


• Graphical mode, Character mode, Silent (scripted) mode

Custom/Selective Installation
 Can choose installation of core
application server only
 Optionally add Admin Console,
Drivers, Plugins, Examples,
UDDI server, and others

8
Installation
Install Specifics
• Middleware Home (formerly “BEA Home”)
• To store one or more installed products (eg. WLS, WLI, WLP, SOA Suite)
• Traditionally c:\Oracle\Middlware or /opt/oracle/middleware
• Recommendation: Use separate MW homes for separate products
• WebLogic Home
• To store installed WebLogic product, containing all the WebLogic library JARs, executables,
tools, licence info, examples and scripts
• Usually a directory underneath MW home, eg.: c:\Oracle\Middleware\wlserver_10.3 or
/opt/oracle/middleware/wlserver_10.3
• Neither MW nor WebLogic Home should be used to store configuration of
Domains
• A machine can be used to host more than one WebLogic server or domain
• Domains are physically separate from the product installation on a file-system

9
Domain Configuration
Domain
• Reminder: Collection of servers and clusters managed centrally
• 1 Admin Server per Domain for centralised administration
• Domain configuration stored locally to the Admin Server (see
<domain>/config/config.xml)
• Config is 'pushed out' on demand by Admin Server to Managed Servers
• Options to Create a Domain
• Domain Configuration Wizard
• WebLogic Scripting Tool (WLST) in Offline mode
(both can use Domain Templates to provide a 'pre-canned' outline structure)
• Additional Options to Modify an Existing Domain *
• Admin Console
• WLST Online mode
• Any JMX client * Admin Server must be running

10
Domain Configuration
WebLogic Domain Structure

11
Domain Configuration
Domain Configuration Wizard
• Graphical or Character mode
• Silent mode no longer supported –
use WLST instead (far more
flexible)
• Configure, servers, clusters,
addresses, ports, machines, data-
sources, JMS modules and many
others
• Default templates provided (eg.
Basic WLS Domain Template) or
choose own custom template

RUN: <wlhome>/common/bin/config.sh (or .cmd)

12
Administration
Commands

13
Server Start
Many Options
• Java Node Manager (Best Option for HA)
• Use Admin Console | Control | Server Start tools (except for Admin Server)
• Use WLST based Node Manager nmStart() function
• Server/JVM start-up parameters obtained from Domain Config (config.xml)
• Automatic restart of failed servers
• Supplied Command Line Scripts
• Admin Server: <domain>/bin/startWebLogic.sh
• Managed Server: <domain>/bin/startManagedWebLogic.sh MngdSrvr t3://admin-
host:adminport
• Server/JVM start-up parameters sourced from 'setDomainEnv.sh
• Operating System Service
• A 'Windows Service' configured using the WebLogic 'beasvc' tool
• Custom start/start/restart init.d script on Unix/Linux

14
Node Manager & WebLogic
Start/Stop WebLogic Managed Servers Remotely
•Two choices • Start/Stop servers remotely via:
•Java Node Manager (more established) • Admin Console
•Script (SSH) Node Manager • JMX
• Command Shell
• ANT / WLST
• Small 'agent' process running on
host machine (Java NM)
• Supports multiple domains
• Looks after one or more WLS
instances on the physical machine
• Server health monitoring
• Automatic server re-start upon
failure

15
Management
Domain Management
Runtime Management
• Performed directly or in-directly via JMX
• Most operations do not require restart
• Variety of tools
• Administration Console
• WLST (online mode)
• Oracle Enterprise Manager
• Java client (using JMX API)
• Third-party tools (eg. HP OpenView)
Build-time Management
• Domain Configuration Tool
• WLST (offline mode)
• Only 'supported' way to automate the building of domains from scratch
• Although some customers still hack together config.xml files

16
Scripting
WebLogic Scripting Tool (WLST)
Command-line/scripting tools for WebLogic domains
• Offline (not connected to live server - primarily for domain creation)
• Online (connected to live server - primarily for runtime monitoring)
• Interactive mode (a command shell)
• Scripted mode (for automation)

Jython based
• Python code in JVM
• WebLogic specific set of management
APIs
• Easy access to WebLogic JMX API (in
online mode only)

17
Scripting
The Value of WLST
It's a “must use” which most customers are using today
• Stable supported API for domain creation
• Easy access to WebLogic JMX MBeans
• Enables flexibility for generating dev/test/prod domain
• But beware: it has a learning curve (Jython, WLST APIs)

Repeatable automated process for domain creation


• Typically property file driven
• Greatly reduces opportunity for manual errors
• Single command to create a complex domain
• Pays-off even for scripting domains for the development lifecycle of project (not just for
test/prod)
• Often integrated into 'continuous integration' processes

18
Scripting
Some Common Command Examples
• Start WLST in interactive mode
– <wlshome>common/bin/wlst.sh
• List all available commands/functions
– help()
• Connect to a Admin Server running on local machine
– connect('weblogic', 'weblogic', 't3://localhost:7001')
• Connect to the Runtime Server Tree
– serverRuntime()
• List attributes and child objects of current MBean
– ls()
• Move to the 'JMS Runtime' child object
– cd('JMSRuntime')

19
WLST Script Recording
Learn WLST by Using the Admin Console
• Make configuration
changes using the
admin console
• See the
corresponding WLST
• Create a library of
WLST scripts for
commands you use
most frequently
• Keep a running log of
changes to your
production domains

20
Join the Middleware Community
Twitter
twitter.com/OracleMiddle
Facebook
facebook.com/FusionMiddleware
LinkedIn
Oracle Fusion Middleware
Oracle’s Data Integration blog
blogs.oracle.com/fusionmiddleware

Oracle.com/Middleware

21 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.


22 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.
23 Copyright © 2011, Oracle and/or its affiliates. All rights reserved.

You might also like