Beruflich Dokumente
Kultur Dokumente
Interactively wsadmin
AdminConfig – Managing Configurations
•Configuration management scripts use the AdminConfig
object to access the repository where configuration
information is stored
AdminConfig
•Example: Output
•Example:
Output
#############################################
# Use of set, variable and $ #
#############################################
set node [$AdminConfig list Node]
$AdminConfig show $node
Variable
#############################################
# Use of foreach, puts and show #
#############################################
set serverlist [$AdminConfig list Server]
foreach i $serverlist {puts "$i \n[$AdminConfig show $i]"}
#############################################
# Modify the JVM settings #
#############################################
set jvmid [$AdminConfig list JavaVirtualMachine $sid]
$AdminConfig modify $jvmid {{initialHeapSize 128} {maximumHeapSize 256}}
$AdminConfig save
#############################################
# Start the server #
#############################################
$AdminControl startServer $server $node
•stopServer
–Stops the specified server
•serverStatus
–Obtains the status of one or all the servers on a node
–Example: serverStatus –all
•Also:
–startNode / stopNode for the Node Agent
–startManager / stopManager for the Deployment Manager
Configuring Nodes
•addNode
–Adds a node to an existing cell
–Connects to the JMS port on the deployment manager
–Use -includeapps option to copy applications to cell config
–Examples:
•addNode mydmgr 8879
•addNode mydmgr 8879 -includeapps
•removeNode
–Removes a node from a cell
–Returns the node to its previous standalone configuration
•cleanupNode
–Deletes a node from the master configuration
–Use on deployment manager to cleanup a failed node
•syncNode
–Pulls configuration changes to the node
–Useful if you have disabled automatic synchronization
Configuring Messaging
•createmq
–Creates for the node:
•The messaging broker
•Queue Manager
•Supporting messaging objects
•deletemq
–Deletes for the node:
•The messaging broker
•Queue Manager
•Supporting messaging objects
–This command does not uninstall the WebSphere MQ or
broker products
Managing Configuration Data
•backupConfig
–Backs up the configuration of the node to a zip file
–All servers will be stopped first
–Default file name is: WebSphereConfig_yyyy-mm-dd.zip in
the bin directory
•restoreConfig
–Restores the configuration of the node from the zip file
created by the backupConfig command
–Usage: restoreConfig backup_file
Other Configuration and Deployment Tools
•assembly – Run Application Assembly Tool
•clientConfig – Run Application Client Resource Configuration
Tool
•earconvert – Convert J2EE 1.2 ear file to 1.3
•EARExpander – Expand ear file to directory or collapse to file
•ejbdeploy – Deploy EJBs in an ear file
•GenPluginCfg – Regenerate plug-in configuration
•ikeyman – Run IBM Key Management Utility to create SSL
keys
•JspBatchCompiler – Compile JSPs in an installed application
•PropFilePasswordEncoder – Encode passwords in properties
files
•SoapEarEnabler – Add SOAP administration tool to an ear
file
Unit Summary
•Discussed the functionality of wsadmin
•Discussed how to invoke wsadmin
•Discussed JACL scripting and when to use it
•Described the differences between managing
–Applications
–Configurations
–Running objects
•Discussed the use of wsadmin objects
–AdminApp
–AdminConfig
–AdminControl
•Discussed the use of profiles
•Discussed tracing and security issues
•Discussed the use of command line tools
Additional Material
JMX - Why is it important?
•All WebSphere Application Server V5.0 Admin client
programs use JMX
–Web Admin console
–wsadmin scripting
–Admin Client Java API
•Included in both “base” Application Server package and
Network Deployment
•Use the APIs to control WebSphere runtime
•Extend the set of managed objects with custom JMX MBeans
•Attach Admin clients to Cell Manager in order to access entire
Admin domain
•Node Agents start & monitor individual Application Servers
JMX - Java Management Extensions
•Framework oriented at the management of applications and
resources
•Your application or resources can be "exposed" to remote
and local management tools
•Framework allows a provider to implement functions such as:
–listing configuration settings
–editing of configuration settings
•Also allows management applications to monitor events such
as:
–startup of an application server
–shutdown of an enterprise application
wscp to wsadmin Migration Path
•Bad news
–no wscp wrapper
–wscp scripts will have to change
–no magic bullet to convert scripts
•Good news
–InfoCenter provides lots of examples that will make
migration easier
–Tcl still used in wsadmin, so learning curve should not be
too high for wscp script writers
wscp to wsadmin Migration Path
•High level migration steps
•Identify the wscp commands in your scripts
•Determine if each command is for configuration or
operation
•Locate the corresponding wsadmin object type for each
configuration command.
•Use AdminConfig create, list, modify, remove, show and
showAttribute to perform equivalent operation in V5.0
•Determine V5.0 attribute names
•Convert application installation commands.
•Convert operational commands.
•Save configuration changes.
Conversion Table 1: V4.0 Configuration
Command to V5.0 Configuration Type
ApplicationServer server
Context N/A
DataSource WAS40DataSource, DataSource
Domain N/A
EnterpriseApp ApplicationDeployment: also use AdminApp
GenericServer Server
J2CConnectionFactory J2CConnectionFactory
J2CResourceAdapter J2CResourceAdapter
JDBCDriver JDBCProvider
JMSConnectionFactory JMSConnectionFactory
JMSDestination JMSDestination
JMSProvider JMSProvider
MailSession MailSession
Module ModuleDeployment: also use AdminApp
Node Node
ServerGroup ServerCluster
URL URL
URLProvider URLProvider
VirtualHost VirtualHost
Conversion Table 2: V4.0 Action to V5.0
Operational Command