8_System Administration Tasks

Embed Size (px)

Citation preview

  • 7/30/2019 8_System Administration Tasks

    1/19

    Systems Administration Tasks in WAS

    Unit Objectives

    1. Perform tasks in the administrative console and in wsadmin

    2. Configure WebSphere Application Server Java Message Service (JMS) providers

    3. Automate tasks

    Lessons in This Unit

    Lesson 1: Administrative Console and wsadmin Tasks

    Lesson 2: Configuring WebSphere Application Server JMS Providers

    Lesson 3: Automation

  • 7/30/2019 8_System Administration Tasks

    2/19

    Administrative Console and wsadmin Tasks

    Performing Tasks in the Administrative Console

    The administrative console is a Web-based tool that is used to manage the WebSphereApplication Server product. Before you can perform tasks in the administrative console, you

    must start the server for the administrative console. After you have started the server, you

    can access the administrative console by using a Web browser to navigate to:

    http://host_machine:9060/ibm/console

    where host_machine is the host name of the machine where the server is running, and9060 is the default port for the administrative console. It is possible that this number will be

    different, depending on your operating environment.

    If security is not enabled for the administrative console, you can supply any text string as

    the user ID. If security is enabled for the administrative console, you must supply a valid

    user ID and password in order to log in.

    The administrative console has several pages that can be used to configure various

    WebSphere Application Server parameters and resources. To change the configuration of a

    parameter or a resource, navigate to the proper page using the navigation tree, and update

    the values as required.

  • 7/30/2019 8_System Administration Tasks

    3/19

    Administrative Console and wsadmin Tasks

    Performing Tasks in wsadmin

    The wsadmin tool included with WebSphereApplication Server is a command-based tool

    used to run scripts. You can use this tool in

    place of the administrative console to configure

    WebSphere Application Sever parameters or

    resources.

    To start the wsadmin, execute the wsadmin

    command from a command prompt. wsadmin

    can be executed either in interactive mode in

    which you manually enter commands one by

    one, or in an automated mode in which a script

    file is used.

    To use a script file, use the f option when

    starting wsadmin, followed by the path of the file

    containing the wsadmin commands.

  • 7/30/2019 8_System Administration Tasks

    4/19

    Administrative Console and wsadmin Tasks

    wsadmin Objects

    Administrative tasks in wsadmin are carried out using special wsadmin objects. These objects are:

    AdminConfig

    This object is used to manage configuration information stored in the configuration repository. It communicates with the

    configuration service component of WebSphere Application Server to make changes to the parameters and resources of

    WebSphere Application Server. Examples of tasks that can be done using the AdminConfig object include:

    Querying existing configuration objects

    Creating configuration objects

    Modifying existing configuration objects

    Removing configuration objects

    Invoking configuration commands to create or change elements of WebSphere Application Server

    AdminControlThis object is used to perform control operations. It communicates with Managed Beans that represent live running objects in

    a WebSphere Application Server process. Examples of tasks that can be done using the AdminContol object include:

    Querying running objects and their attributes

    Invoking operations on running objects

    Querying information on the connected server

    Starting and stopping servers

    AdminTask

    This object is used to access administrative command, providing an alternative way to access configuration and running object

    management commands. Examples of tasks that can be done using the AdminTask object include:Adding a node group member

    Adding inbound and outbound ports for a service integration bus

    Adding service integration bus members

    Help

    This object is used to obtain information about running Managed Beans or for other scripting objects. Examples of tasks that

    can be done using the Help object include:

    Obtaining help on an error message

    Obtaining help for the AdminApp object

  • 7/30/2019 8_System Administration Tasks

    5/19

    Administrative Console and wsadmin Tasks

  • 7/30/2019 8_System Administration Tasks

    6/19

    Configuring WebSphere Application Server JMS Providers

    Lesson Objective:

    Configure WebSphere Application Server Java Message Service (JMS) providers

  • 7/30/2019 8_System Administration Tasks

    7/19

    The Default Messaging JMS ProviderThe default JMS messaging provider in WebSphere Application Server uses the

    service integration bus to transport messages. The following are components of a

    JMS provider that can be configured using the administrative console:

    JMS connection factories

    JMS queues

    JMS topics

    JMS activation specifications

    Configuring WebSphere Application Server JMS Providers

  • 7/30/2019 8_System Administration Tasks

    8/19

    Configuring WebSphere Application Server JMS Providers

    JMS Connection Factory Configuration

    To configure a JMS connection factory, perform the following steps:

    1. Navigate to the Resources > JMS Providers > Default messaging page

    of the administrative console.

    2. Set the Scope for the JMS connection factory.

    3. Click JMS connection factory under the Connection Factories heading.

    A list of existing connection factories is displayed.

    4. To create a new JMS connection factory object, click New.

    5. Enter the desired configuration properties for the JMS connection factory.

    6. Save the changes and synchronize the nodes.

    7. For the changes to become effective, you must restart any application

    servers within the scope of the resources.

  • 7/30/2019 8_System Administration Tasks

    9/19

    Configuring WebSphere Application Server JMS Providers

    JMS Queue Configuration

    To configure a JMS queue, perform the following steps:

    1. Navigate to the Resources > JMS Providers > Default messaging page

    of the administrative console.

    2. Set the Scope for the JMS queue.3. Click JMS queue under the Destinations heading. A list of existing

    queues is displayed.

    4. To create a new JMS queue, click New.

    5. Enter the desired configuration properties for the JMS queue.

    6. Save the changes and synchronize the nodes.

    7. For the changes to become effective, you must restart any applicationservers within the scope of the resources.

  • 7/30/2019 8_System Administration Tasks

    10/19

    Configuring WebSphere Application Server JMS Providers

    JMS Topic Configuration:

    To configure a JMS topic, perform the following steps:

    1.Navigate to the Resources > JMS Providers > Default messaging page of

    the administrative console.

    2.Set the Scope for the JMS topic.

    3.Click JMS topic under the Destinations heading. A list of existing queues is

    displayed.

    4.To create a new JMS topic, click New.

    5.Enter the desired configuration properties for the JMS topic.

    6.Save the changes and synchronize the nodes.

    For the changes to become effective, you must restart any application serverswithin the scope of the resource.

  • 7/30/2019 8_System Administration Tasks

    11/19

    Configuring WebSphere Application Server JMS Providers

    JMS Activation Specification Configuration:

    To configure a JMS activation specification, perform the following steps:

    1. Navigate to the Resources > JMS Providers > Default messaging page of

    the administrative console.

    2. Set the Scope for the JMS activation specification.3. Click JMS activation specification under the Activation specifications

    heading. A list of existing activation specifications is displayed.

    4. To create a new JMS activation specification, click New.

    5. Enter the desired configuration properties for the JMS activation

    specification.

    6. Save the changes and synchronize the nodes.7. For the changes to become effective, you must restart any application

    servers within the scope of the resource.

  • 7/30/2019 8_System Administration Tasks

    12/19

    Configuring WebSphere Application Server JMS Providers

  • 7/30/2019 8_System Administration Tasks

    13/19

    Automation

    Lesson Objective:

    1. Automate tasks by running scripts

  • 7/30/2019 8_System Administration Tasks

    14/19

    Automationwsadmin Scripting Client

    The WebSphere Application Server wsadmin tool provides the ability to automate configuration tasks for your

    environment by running scripts.

    However, there are some limitations for using the wsadmin tool, including:

    1. The wsadmin tool only supports the Jython and Jacl scripting languages. WebSphere Application

    Server V6.1 represents the start of the deprecation process for the Jacl syntax that is associated with

    the wsadmin tool.

    o The Jacl syntax for the wsadmin tool continues to remain in the product and is supported for at

    least two major product releases. After that time, the Jacl language support might be removedfrom the wsadmin tool.

    o The Jython syntax for the wsadmin tool is the strategic direction for WebSphere Application

    Server administrative automation. In WebSphere Application Server V6.1 contains significantly

    enhanced administrative functions and tooling that support product automation and the use of the

    Jython syntax.

    2. The wsadmin tool can manage the installation, configuration, deployment, and runtime operations for

    application servers and deployment managers that have the same version or a higher version of

    WebSphere Application Server installed. The wsadmin tool cannot connect to an application server ordeployment manager that is running a product version which is older than the version of the wsadmin

    tool.

    For example, a WebSphere Application Server V6.x wsadmin client cannot connect to a WebSphere

    Application Server V5.x application server or deployment manager. However, a WebSphere

    Application Server V5.x wsadmin client can connect to a WebSphere Application Server V6.x

    application server or deployment manager. This limitation exists because new functionality is added to

    the wsadmin tool in each product release. You cannot use new command functionality on application

    servers running previous product versions.

  • 7/30/2019 8_System Administration Tasks

    15/19

    Automation

    Starting the wsadmin Scripting Client

    First, you need to locate the command that starts the wsadmin scripting client.

    1. For z/OS, the command for invoking a scripting process is located in the

    app_server_root/bin directory. Use the wsadmin.sh file.

    2. For distributed platforms, and i5/OS, choose one of the following:

    Invoke the scripting process using a specific profile. The QShellcommand for invoking a scripting process is located in the profile_root/bin

    directory. The name of the QShell script is wsadmin. If you use this option,

    you do not need to specify the -profileName profilename parameter.

    Invoke the scripting process using the default profile. The wsadmin Qshell

    command is located in the app_server_root/bin directory. If you do not want

    to connect to the default profile, you must specify the -profileNameprofilename parameter to indicate the profile that you want to use.

    Next, you will need to start the wsadmin scripting client.

  • 7/30/2019 8_System Administration Tasks

    16/19

    Automation

    Specifying the Method for Running Scripts

    You can start the wsadmin scripting client in several different ways. To specify the

    method for running scripts, perform one of the following wsadmin tool options:

    1. Run scripting commands interactively

    Run wsadmin with an option other than -f or -c or without an option.

    An interactive shell is displayed with a wsadmin prompt. From the wsadmin

    prompt, enter any Jacl or Jython command. To leave an interactive scripting

    session, use the quit orexit commands. These commands do not take any

    arguments.

    2. Run scripting commands as individual commands

    Run the wsadmin tool with the -c option.

    3. Run scripting commands in a script

    Run the wsadmin tool with the -f option, and place the commands that you wantto run into the file.

    4. Run scripting commands in a profile script

    A profile script is a script that runs before the main script, or before entering

    interactive mode. You can use profile scripts to set up a scripting environment

    that is customized for the user or the installation.

  • 7/30/2019 8_System Administration Tasks

    17/19

    Automation

    startManager Command

    Use the startManager command to manipulate a deployment manager with scripting.

    For distributed platforms or z/OS, the startManagercommand reads the configuration file for

    the Network Deployment manager process and constructs a launch command. Depending on

    the options you specify, the startManagercommand launches a new Java virtual machine

    (JVM) API to run the manager process, or writes the launch command data to a file.

    You must run this command from the profile_root/bin directory of a Network Deploymentinstallation.

    For distributed platforms, if you are using the Windows platform and you have the deployment

    manager running as a Windows service, the startManager command will start the associated

    Windows service and it will be responsible for starting the deployment manager.

    For i5/OS, the startManagercommand reads the configuration file for the deployment manager

    profile and starts the server.

    You do not have to use a user name and password with the startManager command because

    this command launches a server process but does not invoke an MBean method.

  • 7/30/2019 8_System Administration Tasks

    18/19

    Using the startManager Command

    The command syntax is as follows:

    For distributed platforms or z/OS: startManager [options]For i5/OS: startManager [server] [options]

    where serveris an optional parameter that specifies the name of the deployment manager

    server. If you do not specify this option and you use the deployment manager profile, server

    defaults to the deployment manager. If you do not specify this option and you specify a profile

    other than the deployment manager, serverdefaults to the name of the profile.

    These are examples of the code:

    For distributed platforms:

    startManager

    startManager -script (produces the start_dmgr.sh or .bat file)

    startManager -trace (produces the startmanager.log file)

    For z/OS:

    startManager

    startManager -script (produces the start_dmgr.sh file)

    startManager -trace (produces the startmanager.log file)

    For i5/OS:

    startManager -profileName dmgr (starts the deployment manager for the dmgr profile)

    startManager -trace (produces trace files in the profile_root/logs directory)

    Automation

  • 7/30/2019 8_System Administration Tasks

    19/19

    Automation