wlst web logic scripting tool. wslt introduction what it is? command-line scripting environment used...

40
WLST Web Logic Scripting Tool

Upload: prosper-gaines

Post on 22-Dec-2015

274 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

WLSTWeb Logic Scripting Tool

Page 2: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

WSLT introduction• What it is?

• command-line scripting environment• Used for?

• create, manage, and monitor WebLogic Server domains

Page 3: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Web Server

• Specialized type of file server• Work

• The user requests a web page. The Web Server finds the web page file in a local directory and sends it back out to the user.Dasd

Page 4: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Application Server

• To extend web servers to support dynamic content.

Page 5: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Weblogic• Platform for developing multitier enterprise

applications based on the Java programming language.

Page 6: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Weblogic• Weblogic server

• Java EE application server, WebLogic Application Server• an enterprise portal, WebLogic Portal• an Enterprise Application Integration platform• a transaction server and infrastructure, 

WebLogic Tuxedo• a telecommunication platform, 

WebLogic Communication Platform• an HTTP web server

• Oracle Product

Page 7: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Weblogic also contains• Oracle WebLogic Server forms part of Oracle Fusion Middleware portfolio and

supports Oracle, DB2, Microsoft SQL Server, MySQL Enterprise and other JDBC-compliant databases. Oracle WebLogic Platform also includes:

• JRockit, a custom JVM.

• Korthal that includes Commerce Server and Personalization Server

• WebLogic Integration

• WebLogic Workshop, an Eclipse IDE for Java, SOA and Rich Internet Applications

• WebLogic Server includes .NET interoperability and supports the following native integration capabilities:

• CORBA connectivity

• COM+ Connectivity

• IBM WebSphere MQ connectivity

• Java EE Connector Architecture

• Native enterprise-grade JMS messaging

• WebLogic/Tuxedo Connector

• Oracle WebLogic Server Process Edition also includes Business Process Management and Data Mapping functionality. WebLogic supports security policies managed by security administrators. The Oracle WebLogic Server Security Model includes:

• application business logic separated from security code

• complete scope of security coverage for all Java EE and non-Java EE components

Page 8: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Weblogic Domain• Logically related group of WebLogic Server

resources.• Domains include a special WebLogic Server instance

called the Administration Server, which is the central point from which you configure and manage all resources in the domain.

• Usually, you configure a domain to include additional WebLogic Server instances called Managed Servers.

• You deploy Web applications onto the Managed Servers and use the Administration Server for configuration and management purposes only.

Page 9: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Weblogic Domain

Page 10: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Domain configuration• Config 1: WebLogic Server installation to create and run

multiple domains

• Config 2: Multiple installations to run a single domain

Page 11: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Domain configuration• Config 1: WebLogic Server installation to create and run

multiple domains

• Config 2: Multiple installations to run a single domain

Page 12: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Domain Configuration

• Which configuration to select?• How you organize your WebLogic Server

installations into domains depends on your business needs.

Page 13: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

WSLT introduction• What it is?

• command-line scripting environment• Used for?

• create, manage, and monitor WebLogic Server domains

Page 14: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

• Jython• JPython successor

• JPython = Java + Python

• Python written in Java

• Some facts• freely available for both commercial and non-commercial

• distributed with source code

• Features• Java can use Jython libraries

• To create scripts to add functionallity

• Jython can use Java classes (Interpreter used)

• Small code• Python programs are typically 2-10X shorter than the equivalent Java

program

• Why Jython?•  initially created in late 1997 to replace C with Java

Jython

Page 15: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

How WLST help?• Provides a set of scripting commands that are

specific to WebLogic Server• You can extend the WebLogic scripting

language to suit your needs by following the Jython language syntax. 

Page 16: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

• WLST Offline• WLST Online

WLST Modes

Page 17: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

WLST Offline• WLST Offline ->  command-line equivalent to

the Configuration Wizard 

Page 18: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

• WLST Online ->  command-line equivalent to the WebLogic Server Administration Console 

WLST Online

Page 19: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

WLST Offline vs WLST OnlineWLST Offline WLST Online

Configuration Wizard Administration Console

Create domain templates Connect to a running Administration Server

Create a new domain  manage the configuration of an active domain

Extend an existing, inactive domain

View performance data about resources in the domain

Manage security data

View runtime performance data 

Can also connect to managed Servers

Modify security data cannot modify configuration data from Managed ServersCreate a new domain

Page 21: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Interactive Mode• Enter a command and view the response at a

command-line prompt• useful for getting immediate feedback• useful for learning the tool, prototyping

command syntax, and verifying configuration options before building a script.

Page 22: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Script Mode• Invoke a sequence of WLST commands without requiring your input

• Much like a shell script.

• = WLST commands in a text file with a .py file extension.• E.g. filename.py.

• To run commands Jython commands are used.

• What can be achieved?• Automate WebLogic Server configuration and application

deployment• Apply the same configuration settings, iteratively, across

multiple nodes• Most Programming concepts available:

• loops, flow control constructs, conditional statements• Schedule scripts to run at various times• Automate repetitive tasks and complex procedures.

Page 23: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Embedded Mode• Run WLST commands and scripts from java code.• All WLST commands and variables that you use in interactive and

script mode can be run in embedded mode.• Example:

import weblogic.management.scripting.utils.WLSTInterpreter;import org.python.util.InteractiveInterpreter;

public class function{ InteractiveInterpreter interpreter = new WLSTInterpreter();

StringBuffer buffer = new StringBuffer(); buffer.append("connect('weblogic','weblogic')"); interpreter.exec(buffer.toString());

}

Page 24: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Demo• Step 1: Start WLST• Step 2 : Start using commands

• Interactive Mode• Script Mode• Embedded Mode

Page 25: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

More Demos• Shutdown Admin Server• Start Admin Server• Create Manage Server & Cluster

Page 26: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Command Categories• Browse Commands• Control Commands• Deployment Commands• Diagnostics Commands• Editing Commands• Information Commands• Life Cycle Commands• Node Manager Commands• Tree Commands

Page 27: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

MBean• MBean

• Managed bean• Java bean that provides a JMX interface• JMX is the J2EE solution for monitoring and

managing resources on a network• JMX is a public specification and many vendors

of commonly used monitoring products support it.

• Here can be used to configure, monitor, and manage WebLogic Server resources through JMX.

Page 28: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Browse Commands

Page 29: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Control commands• Connect/disconnect server• Create/configure domain• Exit WLST

Page 30: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Deployment commands• Deploy, undeploy, and redeploy applications.• Update an existing deployment plan.• Start and stop a deployed application.

Page 31: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Diagnostics Commands

Page 32: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Editing Commands

Page 33: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Information Commands• Interrogate

• domains• servers• variables

• Provide • configuration bean• runtime bean• and WLST-related information.

Page 34: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Life Cycle Commands• Manage the life cycle of a server instance.

Page 35: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Node Manager Commands• Start, shut down, restart, and monitor

WebLogic Server instances using Node Manager.

Page 36: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

• Navigate among MBean hierarchies.

Tree Commands

Page 37: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

FAQs• What about existing command-line utilities?

• It includes capabilities of following:

• weblogic.Admin->Used to interrogate MBeans and configure a WebLogic Server instance

• wlconfig Ant -> for making WebLogic Server configuration changes

• weblogic.Deployer utility for deploying applications.

• When would I choose to use WLST over the other command-line utilities or the Administration Console?

• Tasks can be done interchangeably

• But the method that you choose depends on whether you prefer using a graphical or command-line interface, and whether you can automate your tasks by using a script.

• WLST online vs offline?

• online -> connected to a running Administration Server or Managed Server instance

• offline -> not connected to a running server.

Page 38: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

FAQs• Can I run regular Jython scripts from within WLST?

• Yes scripting language can be extended following the Jython language syntax.

• Can I invoke WLST via Ant?• Yes, one could fork a new weblogic.WLST process inside an Ant

script and pass your script file as an argument.• Can I customize WLST?

• Yes. You can update the WLST home directory to define custom WLST commands, WLST commands within a library, and WLST commands as a Jython module. For more information, see Customizing WLST.

Page 39: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Most Important• Help (‘command’)

Page 40: WLST Web Logic Scripting Tool. WSLT introduction What it is? command-line scripting environment Used for? create, manage, and monitor WebLogic Server

Thank you.