weblogic for dbas

43
WebLogic for DBAs WebLogic for DBAs WebLogic for DBAs WebLogic for DBAs Simon Haslam Veriton Limited

Upload: veriton-limited

Post on 19-May-2015

2.612 views

Category:

Technology


1 download

DESCRIPTION

A presentation delivered most recently at OUG Norway on 16/4/2011. It introduces WebLogic terminology, how to install/configure it, high level monitoring and an example of its use to run Oracle Enterprise Manager 12c Cloud Controle.

TRANSCRIPT

Page 1: WebLogic for DBAs

WebLogic for DBAsWebLogic for DBAsWebLogic for DBAsWebLogic for DBAsSimon Haslam

Veriton Limited

Page 2: WebLogic for DBAs

Consultant & Oracle Partner,

established for 16 years

I mainly work on the middle tier of

demanding web & contact-centre applications:

architecture planning to installation

to troubleshooting (and most things

in between!)

Simon Simon Simon Simon HaslamHaslamHaslamHaslam / / / / VeritonVeritonVeritonVeriton

Page 3: WebLogic for DBAs

Agenda

� WebLogic Architecture and Components

� Installing WLS & Configuring a Domain

� Oracle Enterprise Manager 12c

� Managing WebLogic

Page 4: WebLogic for DBAs

Recap.Recap.Recap.Recap. �

Web Server

Application Server

Database etc

HTTP(S)

HTTP(S)

used

to return

HTMLHTTP(S), AJP etc

e.g. SQL*Net

Page 5: WebLogic for DBAs

Key WebLogic TermsKey WebLogic TermsKey WebLogic TermsKey WebLogic Terms� Domain◦ Grouping of config/resources for an environment◦ Has one set of administrators/security privileges◦ Supports one major release of WebLogic at a time◦ Is run in either ‘Production’ or ‘Development’ mode

� Admin Server◦ Only one per domain◦ Runs the Admin Console

� Managed Server◦ The server(s)/JVM that run your app(s)◦ Cluster(s) distribute your app over several MS

� Node Manager◦ Java program that (re)starts your servers (MS & AS)

Page 6: WebLogic for DBAs

host

server

admin

server

webserverplug-in

Example ArchitectureExample ArchitectureExample ArchitectureExample Architecture

adminconsole

app

requests

domain nodemanager

nodemanager

managed

server

managed

server

END

Note: with 64 bit OS &

VMs it’s becoming

common to have one

WebLogic server

process per host

A node manager can

manage multiple

domains, though this

may not be desirable

Page 7: WebLogic for DBAs

Component NotesComponent NotesComponent NotesComponent Notes

� A domain only ever has one Admin Server◦ it looks after the master config.xml

� The Admin Server doesn’t actually need to be running all the time◦ Managed Server Independence (MSI) – the MS can start up/run on

its own◦ AS primarily used for changing configuration or deploying apps◦ BUT… more reliance post-Oracle on admin apps on AS

� You want Node Manager running all the time to stop/start WebLogic servers

Page 8: WebLogic for DBAs

Quick DemoQuick DemoQuick DemoQuick Demo

� WebLogic Console

◦ machines

◦ servers

◦ data sources

◦ deployed applications

Page 9: WebLogic for DBAs

Cluster

Typical Enterprise ApplicationTypical Enterprise ApplicationTypical Enterprise ApplicationTypical Enterprise Application

Services Layer

WebLogic

Managed Server

WebLogic

Managed Server

Oracle DatabaseServices

Web

Services

Web Server Web Server

Load Balancers

App App

Page 10: WebLogic for DBAs

Agenda

� WebLogic Architecture and Components

� Installing WLS & Configuring a Domain

� Oracle Enterprise Manager – 11g & 12c

� Managing WebLogic

Page 11: WebLogic for DBAs

InstallInstallInstallInstall

� Middleware Home◦ ‘binaries’ which may include various Oracle layered products

(such as SOA Suite or Forms)◦ read-only*

� Domain Home◦ configuration and logs◦ can live happily outside the middleware home: nice!◦ one middleware home / WebLogic installation can be used to

run several separate domains* a few parts of Oracle ignore this

Page 12: WebLogic for DBAs

WebLogic Installation StepsWebLogic Installation StepsWebLogic Installation StepsWebLogic Installation Steps

1. Install JVM

2. Install a Middleware Home and WebLogic

3. Configure a Domain

� Note: I usually install the JVM and use the generic .jar installer (i.e. same for all platforms) rather than using installer bundled with a JVM

Page 13: WebLogic for DBAs

1) Install JVM1) Install JVM1) Install JVM1) Install JVM

� Sun HotSpot or JRockit (being merged in Java7/8), or

JVM for your platform (e.g. IBM or HP)

� JRockit specific:

◦ Don’t install demos & samples/source code

◦ You probably don’t want JRockit as the public JRE

Page 14: WebLogic for DBAs

2) Install WebLogic2) Install WebLogic2) Install WebLogic2) Install WebLogic

� E.g.java java java java ----jar wls1036_generic.jar jar wls1036_generic.jar jar wls1036_generic.jar jar wls1036_generic.jar \\\\[[[[----mode=silent mode=silent mode=silent mode=silent ----silent_xmlsilent_xmlsilent_xmlsilent_xml=wls1036.rsp]=wls1036.rsp]=wls1036.rsp]=wls1036.rsp]◦ On small test environments without much /tmp you can use:-Djava.io.tmpdir=/softlib/tmp◦ Don’t forget WLS has PSUs (e.g. 10.3.6.0.3) and quarterly SPUs (fka

CPUs)

� Only most relevant screens follow…

Page 15: WebLogic for DBAs

InstallationInstallationInstallationInstallation

Page 16: WebLogic for DBAs
Page 17: WebLogic for DBAs
Page 18: WebLogic for DBAs

3) Configure a Domain3) Configure a Domain3) Configure a Domain3) Configure a Domain

� You use the config wizard to create domains◦ $WL_HOME/common/bin/config.sh (.cmd)◦ there are several other methods too

� There’s a good chance your app will configure a domain for you (though you may wish to standardise)

� Only most relevant screens follow…

Page 19: WebLogic for DBAs
Page 20: WebLogic for DBAs
Page 21: WebLogic for DBAs
Page 22: WebLogic for DBAs
Page 23: WebLogic for DBAs

Agenda

� WebLogic Architecture and Components

� Installing WLS & Configuring a Domain

� Oracle Enterprise Manager 12c

� Managing WebLogic

Page 24: WebLogic for DBAs

Enterprise Manager GC/CCEnterprise Manager GC/CCEnterprise Manager GC/CCEnterprise Manager GC/CC

� Mostly a big java application

� Runs an Oracle Management Service (OMS) which

OEM Agents (a java process running on each remote

machine you want to manage) connect to over HTTPS

� Has a web application that provides the main EM

console (and EM CLI)

Page 25: WebLogic for DBAs

EM EM EM EM Cloud ControlCloud ControlCloud ControlCloud Control

Services Layer

Repository DatabaseMy Oracle

Support

Web ServerOracle

Management

Service Managed Server

Software

Library

Software

Library

Admin

Server

Agent

AdministratorAdministrator

Node

Manager

�Fri 11:30

Page 26: WebLogic for DBAs

(OEM (OEM (OEM (OEM Grid Control Grid Control Grid Control Grid Control 11g)11g)11g)11g)

� 11g GC was first OEM release to use WebLogic instead of OC4J

� You had to install WebLogic yourself first, then use SmartUpdate (BSU) to apply WDJ7 set of patches◦ online or offline

◦ see http://www.veriton.co.uk/roller/fmw/entry/offline_patching_of_weblogic_server

� If you’re installing now go straight to EM 12cR2 ☺

Page 27: WebLogic for DBAs

Page 28: WebLogic for DBAs

OEM Cloud Control 12cOEM Cloud Control 12cOEM Cloud Control 12cOEM Cloud Control 12c

� Installer sets up WebLogic for you

� Some options to customise to be consistent with your

environment

Page 29: WebLogic for DBAs

Page 30: WebLogic for DBAs

Page 31: WebLogic for DBAs

DemoDemoDemoDemo

� Installation (JDK, WebLogic)

� Domain creation

� Startup

Page 32: WebLogic for DBAs

Agenda

� WebLogic Architecture and Components

� Installing WLS & Configuring a Domain

� Oracle Enterprise Manager 12c

� Managing WebLogic

Page 33: WebLogic for DBAs

Page 34: WebLogic for DBAs

Managing WebLogicManaging WebLogicManaging WebLogicManaging WebLogic

� Admin console is usually starting point

� Processes to check

◦ java for admin server & managed server

◦ java for nm

� Node manager (only use java version)

Page 35: WebLogic for DBAs

� Admin & Managed server logs are under:

◦ DOMAIN_HOME/servers/<name>/logs

◦ Accessible through console too

� Monitoring dashboard

Page 36: WebLogic for DBAs

Monitoring ToolsetMonitoring ToolsetMonitoring ToolsetMonitoring Toolset

� Pure WebLogic

◦ WebLogic Admin Console

� WebLogic plus middleware components (single

system)

◦ OEM Fusion Middleware Control

� All products

◦ OEM 12c Cloud Control

Page 37: WebLogic for DBAs

DemoDemoDemoDemo

� Processes

� Log files

� Monitoring Dashboard

Page 38: WebLogic for DBAs

Check Check Check Check out WebLogic out WebLogic out WebLogic out WebLogic Scripting ToolScripting ToolScripting ToolScripting Tool

� wlst.sh◦ sets environment

Initializing WebLogic Scripting Tool (WLST) ...

Welcome to WebLogic Server Administration Scripting Shell

Type help() for help on available commands

wls:/offline> exit()

Page 39: WebLogic for DBAs

WLST WLST WLST WLST ExampleExampleExampleExample

def create_ds (DS_NAME, DS_PARAMS, TARGETS, JNDI, DB_USER, DB_PASS, DB_SERVICE, DB_HOSTS, ONS_HOSTS):

cd( '/' )cmo.createJDBCSystemResource(DS_NAME)

cd( '/JDBCSystemResources/' +DS_NAME+'/JDBCResource/' +DS_NAME)cmo.setName(DS_NAME)

cd( 'JDBCDataSourceParams/' +DS_NAME)set( 'JNDINames' ,jarray.array([String(JNDI)], String))

...etc...

�Fri 15:45

Page 40: WebLogic for DBAs

Agenda

� WebLogic Architecture and Components

� Installing WLS & Configuring a Domain

� Oracle Enterprise Manager 12c

� Managing WebLogic

Page 41: WebLogic for DBAs
Page 42: WebLogic for DBAs

� WebLogic is a java application server◦ typically delivers HTML over HTTP(S)

� All WLS processes run on a JVM� Middleware home is static; domain home contains config

and logs� WLS Console is usually first point of contact (though don’t

forget about WLST for automation)� OEM 12c runs on WebLogic but the installer now does the

WLS set up work for you

Page 43: WebLogic for DBAs

Thanks for listening!Thanks for listening!Thanks for listening!Thanks for listening!Twitter: @simon_haslam

Oracle Fusion Middleware Architecture & Admin blog:

http://simonhaslam.co.uk

Fri 15:45

Fri 11:30