Presentation is loading. Please wait.

Presentation is loading. Please wait.

IBM Certified WebSphere Application Server 8.5 Administrator

Similar presentations


Presentation on theme: "IBM Certified WebSphere Application Server 8.5 Administrator"— Presentation transcript:

1 IBM Certified WebSphere Application Server 8.5 Administrator
A course to get certified in 7 days Karun Subramanian, ESIS Consulting LLC Part 2

2 Section 4 Administrative Tools

3 Ways to Administer Admin Consoles Command line utilities
scripting using wsadmin JMX programs Admin Console is the widely used tool. Command line and scripting can be very powerful and can save time for repetitive tasks While JMX programs can be used to administer, it is very rare in practice Admin Console is the primary way to administer the environment

4 Admin Consoles Various types of consoles available
Admin consoles are web based applications ISC (Integrated Solutions Console) is the primary way to administer a cell. It is installed in the DMGR Admin Console for Administrative agents manages Nodes that are registered to it Job Manager Admin Console manages the Job manager settings and submits jobs The Admin console application is a system application and cannot be uninstalled, stopped or started using Admin console (you can, using wsadmin) In a standalone environment, the Admin console manages just the one Application server In a Network Deployment environment, the Admin console is installed in DMGR and manages the entire cell In summary, you can have types of Admin consoles 1. Admin console on a dmgr to manage the entire cell 2. Admin console on a standalone Application server to manage that particular Application Server 3. Admin console for an Administrative Agent that can manage Application servers that are registered to it. 4. Admin Console for Job manager that is used to manage the job manage and to submit jobs

5 Admin Consoles Cont... Generally accessed through URL “ server>/WC_adminhost_secure/ibm/console Your activity is tracked at <profile home>/wstemp so that it can be recovered in case of unexpected exit from the console Using Console preferences, the commands used by WAS during the Admin Console activity can be logged For most of the operations within Admin console, you can view the command used by WAS You can configure WAS to immediately synchronize the changes to all Nodes whenever you save the change in Admin Console.This option is available in Console preferences. WAS internally automatically synchronizes the configuration to all the nodes at periodic intervals ( 1 minute by default). This interval is configurable in Node Agent -> File Synchronization Service page

6 Admin Consoles Cont... Resources can be created in various scopes
Application Application Server Node Cluster Cell Granular scope overrides if the same resource is defined in multiple scopes Admin console provides an option to view the available scopes either in a drop down list or using fields Application scoped resources can only be set in the Application deployment descriptors (Cannot be set using Admin Console)

7 Admin Consoles Cont... Whenever you make changes in Admin console, you are prompted for ‘saving’. It is a good idea to click on the ‘review’ link to see what files are being modified You can also save the configuration using System Administration -> Save Changes to Master Repository You can get help on any page within the Admin console by clicking on the ‘Help’ link at the top right

8 Admin Consoles Cont... Admin Console provides few ‘Guided Activities’ such as ‘Creating and configuring a cluster for workload management’, ‘Configuring database connectivity’ etc Admin console can show runtime events generated by Application Server classes Guided activities walks you through step by step while you perform the actual steps You cannot login to the same Admin console using the same user id using two different browser windows You can use Admin console to generate Heap dump, java core dump or system dump for any running processes

9 Securing Admin Consoles
Enable ‘Administrative Security’ to secure Admin Console You must determine the user repository to use (Active directory, Local OS File based repository etc) Administrative security is NOT the same as ‘Application security’ In order to access the Admin console, the user must authenticate against the chosen repository and also belong to a administrative role defined in the Admin console (screenshot)

10 Securing Admin Consoles Cont...
Fine grained security possible. Resources can be grouped into Authorization groups and users can be assigned to required administrative role within the authorization group Cell wide authorization group is also available Users and Groups -> Manage Users (or) Manage Groups Users and Groups -> Administrative user roles (or) Administrative group roles

11 Various Administrative roles
Administrator: Can do everything except map users to Administrative roles Admin Security Manager: Map users to Administrative roles and manage authorization groups Auditor: View and change Security Auditing Configurator: Change WAS Configuration Operator: Can start/stop services Monitor:Can view configuration and runtime Deployer: Can configure/deploy Applications ISCAdmin: Manage users and groups within the Admin console only

12 Job Manager Console Manages jobs submitted to targets that are registered to the Job Manager Loosely coupled administrative functionality You can manage jobs via ISC (Integrated solutions console) as well (which tree ?) You can start/stop Servers, start/stop/install Applications and liberty profile resources, create/delete Servers and clusters, install/update IIM (IBM installation manager) You can also run wsadmin scripts on target using Job Manager console

13 Command line Tools Several commands available
Windows commands are .bat whereas Unix commands are .sh Commands are located in <WASHOME>/bin and <PROFILEHOME>/bin. Where you run the command from is significant Most commands accept -profileName parameter which ensures the profile against which the command is run When required, the command will prompt username/password When you use -profileName parameter, it does not matter where you run the command from

14 Sample commands startServer <server name> : Starts an Application Server stopManager : Stops Deployment Manager serverStatus -all : Shows status of all the Servers versioninfo : Shows versions of installed Websphere Application Server products addNode : Federates a node into a cell managesdk : defines the JDK version used by WAS manageprofile : Manages profiles

15 Administration using Scripting
Very powerful way of Administering WAS If you can do it through Admin Console, you can do it through wsadmin Uses Bean Scripting framework. Jython is the preferred language. Jcal is being deprecated Can be run offline or online (attaches to a running process) Will require username/password when needed Can be run to remotely when connecting to a running process wsadmin connects to the Mbean server within the the JVM. Mbean servers makes the Mbeans available for wsadmin to operate on Using offline mode (also known as local mode), you can manipulate the xml configuration documents. If you connect to a node directly in local mode, any configuration update you make are lost when node synchronization occurs.So, you must connect to dmgr Use “-conntype NONE” to connect in local mode

16 wsadmin Introduction Launch wsadmin
<profilehome>/bin/wsadmin -lang jython wsadmin.sh in Unix systems <profilehome>/properties/wsadmin.properties for setting certain parameters. You can, for example set ‘com.ibm.ws.scripting.defaultLang’ to Jython A script profile can be used with ‘-profile’ option to run a script before the main script (for example, you can define your own methods/functions in this file) You can use ‘-p’ flag to specify your own custom properties file script profile is useful to load user defined functions, set the scripting environment, etc

17 wsadmin Introduction Cont...
You can use the interactive mode to run commands in wsadmin prompt wsadmin -lang jython Using ‘-c’ flag, you can invoke one command as part of invoking wsadmin wsadmin -lang jython -c AdminControl.getCell() Using ‘-f’ flag, you can run your own script and then exit from wsadmin wsadmin -lang jython -f c:\createMyCluster.py To enable tracing of wsadmin, uncomment the following line in wsadmin.properties com.ibm.ws.scripting.traceString=com.ibm.*=all=enabled

18 wsadmin Introduction Cont...
Five Management objects available AdminControl AdminConfig AdminTask AdminApp Help print Help.AdminControl() : General help about the Administrative object print AdminControl.help(“queryNames”) : More specific help about the particular method/command You can also use print AdminControl.help() to print available commands within AdminControl object

19 wsadmin Management objects - AdminControl
Controls Objects in running Websphere process, for example stop a node agent, or change log level of an application server Get the Object on which to run AdminControl and use AdminControl commands against it myServer = AdminControl.completeObjectName(‘node=myNode,type=server,name=myAppServer’,*’) print Help.attributes(myServer) print Help.operations(myServer) AdminControl.invoke(myServer,’stop’) Another way to determine the object name servers=AdminControl.queryNames(‘type=server,*’) import java lineSeparator = java.lang.System.getProperty(line.separator) myServer = servers.split(lineSeparator) [0]

20 wsadmin Management objects - AdminControl Cont...
To change an attribute of the running process myServerTrace = AdminControl.completeObjectName(‘type=TraceService,process=myAppServer,*) AdminControl.setAttribute(myServerTrace,’traceSpeficiation’,’*=info:com.ibm.ws.rsadapter.jdbc.*=all’) The above commands enables sql tracing on myAppServer You can sync the nodes using AdminControl using the following command node_sync = AdminControl.completeObjectName(‘type=NodeSync,process=nodeagent,node=myNode,*) AdminControl.invoke(node_sync,’sync’) Note that you can also use AdminNodeManagement.syncActiveNodes() to sync the nodes (this is using the scripting libraries)

21 wsadmin Management objects - AdminConfig
Retrieves, updates, creates and removes Configuration objects in WAS repository Only available when connected to dmgrs Major steps in using AdminConfig Determine the the configuration object type print AdminConfig.types() Get the configuration object id print AdminConfig.list(‘Server’) Server=AdminConfig.getid(‘/Node:myNode/Server:myServer/’)

22 wsadmin Management objects - AdminConfig Cont...
View the attributes print AdminConfig.attributes(‘Server’) perform the operation (update,remove,create etc) jdbcpr = AdminConfig.getid(‘/JDBCProvider:UserDefi ned-mySQLServerJDBCProvider/’) print AdminConfig.show(jdbcpr) AdminConfig.modify(jdbcpr, [[‘description’,‘Custom JDBC driver’]]) Save the configuration and sync the nodes AdminNodeManagement.syncActiveNodes()

23 wsadmin Management objects - AdminApp
Installs,updates and removes Enterprise Application print AdminApp.list() AdminApp.edit(‘AppName’,options) AdminApp.editInteractive(‘AppName’)

24 wsadmin Management objects - AdminTask
Set of Administration commands (grouped based on the function) to simplify wsadmin scripts Generally more user friendly than standard wsadmin commands Interactive and batch mode. Interactive mode presents text based wizards print AdminTask.help(‘-commands’) print AdminTask.help(‘-commandGroups’)

25 AdminTask - Property file based configuration
Configuration of WAS can be extracted to a single text file,modified and then applied using wsadmin Helps avoid complex wsadmin commands AdminTask.extractConfigProperties(‘-configData Node=node1 -propertiesFileName=myProps.txt’) Other commands: validateConfigProperties applyConfigProperties deleteConfigProperties createPropertiesFileTemplates

26 Using Administration Scripting libraries
Perform complex functions using just one command. Pre built Jython scripts for your use, categorized into various types Located in <WASHOME>/scriptLibraries. When you invoke wsadmin, these commands are loaded and available to you Review the jython scripts or invoke their ‘help’ method to find out more print AdminJDBC.help() print AdminJDBC.listDataSources() The name of the script is the command used in wsadmin (withouth the py extension). For example, <WASHOME>/scriptLibraries/v70/servers/AdminClusterManagement.py is the script name. To invoke help on this library you would type AdminClusterManagement.help()


Download ppt "IBM Certified WebSphere Application Server 8.5 Administrator"

Similar presentations


Ads by Google