Vous êtes sur la page 1sur 38

2006 BEA Systems, Inc.

71
Basic Tuxedo Application Configuration
At the end of this module, you will be able to:
Understand the major roles of the Tuxedo administrator
Configure the sections of the Tuxedo configuration file
Understand and use common configuration parameters
Create Tuxedo client and server executables
Module 4
Basic Tuxedo Application Configuration-1
2006 BEA Systems, Inc. 72
Road Map
1. Tuxedo Configuration File Basics
Formatting Requirements
Common RESOURCES Section Parameters
MACHINES and GROUPS Required Parameters
2. Tuxedo Application Deployment Basics
Basic Tuxedo Application Configuration-2
2006 BEA Systems, Inc. 73
Review: The Tuxedo Configuration File
A configuration file defines parameters needed to boot a
Tuxedo application domain.
This file is usually created by application developers and
modified by administrators.
The configuration file exists in two formats:
UBBCONFIG: text version
TUXCONFIG: binary version
tmloadcf compiles UBBCONFIG into TUXCONFIG
Required prior to booting the Tuxedo application
tmunloadcf can be used to create a backup text copy
of the binary version
Basic Tuxedo Application Configuration-3
2006 BEA Systems, Inc. 74
UBBCONFIG Documentation
The on-line documentation provides details concerning:
Syntax and formatting rules
The usage of all section parameters
Navigate from the main product documentation page:
Reference > Section 5 > UBBCONFIG(5)
Basic Tuxedo Application Configuration-4
2006 BEA Systems, Inc. 75
Configuration File Content
ATMI application configurations can use
up to eight configuration sections:
Dynamic routing criteria for Tuxedo services
ROUTING
Network groups available in the domain
NETGROUPS
Network configuration for the domain NETWORK
System-wide information & IPC defaults
RESOURCES
Machine specific information
MACHINES
Parameters for BEA Tuxedo services
SERVICES
Server processes to be booted
SERVERS
Application server group settings
GROUPS
Description Parameter
Basic Tuxedo Application Configuration-5
2006 BEA Systems, Inc. 76
*RESOURCES
<parameter> <value>
<parameter> <value>

*MACHINES
<machine name>
<parameter> = <value>
<parameter> = <value>
# adding a comment here
*GROUPS
<Server Group Name>
<parameter> = <value>
<parameter> = <value>

*SERVERS
<Server Executable File Name>
<parameter> = <value> <parameter> = <value>
<parameter> = <value> <parameter> = <value>
Tuxedo Configuration File Layout
Sections are defined by *<SECTION>
<parameter=value> may be defined as
one per line or multiple parameters per line
GROUPS section must be
defined before SERVERS
RESOURCES and MACHINES are required
sections and must be listed first
Comments are preceded with a #
Basic Tuxedo Application Configuration-6
2006 BEA Systems, Inc. 77
Scope of Section Elements
*RESOURCES
application-wide information

*MACHINES
machine-wide information

*GROUPS
group-wide information

*SERVERS
server-wide information
[ Server-1 ]
[ Server-2 ]
[ Server-3 ]
[ Server-4 ]

*SERVICES
service-wide information
[ Service-1 ]
[ Service-2 ]
[ Service-3 ]
[ Service-4 ]

*NETGROUPS
network group-wide information

*NETWORK
network-wide information
Basic Tuxedo Application Configuration-7
2006 BEA Systems, Inc. 78
Minimal Configuration Example
*RESOURCES
IPCKEY 39211
MASTER SITE1
MODEL SHM

*MACHINES
MYMACHINE
LMID=SITE1
TUXDIR=C:\bea\tuxedo9.0
APPDIR=C:\student\course_tux\domains\adminTng
TUXCONFIG=C:\student\course_tux\domains\adminTng\tuxconfig

*GROUPS
GROUP1
LMID=SITE1
GRPNO=1

*SERVERS
simpserv
SRVGRP=GROUP1
SRVID=1
ubb.tux
Basic Tuxedo Application Configuration-8
2006 BEA Systems, Inc. 79
Configuring the RESOURCES Section
The RESOURCES section:
Is a required section.
Must appear as the first section.
Parameters apply to the entire application:
Some parameters may not be overridden or dynamically
changed.
Other parameters serve as default values and may be
overridden in other applicable sections.
Configuration syntax rules are unique compared to all
other sections:
PARAM VALUE as opposed to: PARAM=VALUE
Basic Tuxedo Application Configuration-9
2006 BEA Systems, Inc. 80
RESOURCES Parameters
Multiplier of SCANUNIT that sets BBL application checks SANITYSCAN
# of seconds used as a multiplier for other parameters SCANUNIT
Total # of unique services advertised the in domain MAXSERVICES



Required
Unique identifier for all IPC resources IPCKEY
LMID of the Master Tuxedo machine MASTER
String value to uniquely identify this domain DOMAINID
Total # of all Tuxedo app servers in domain MAXSERVERS
Single or multiple machine architecture MODEL
Description Parameter
NONE | APP_PW | USER_AUTH | ACL SECURITY
Multiplier of SCANUNIT for timing-out a blocking call BLOCKTIME
The following table lists the more common parameters found in
the RESOURCES section:
Basic Tuxedo Application Configuration-10
2006 BEA Systems, Inc. 81
IPCKEY Parameter
IPCKEY
Used to allocate resources used by the BB to include shared
memory segments, semaphores, and message queues
Must be unique among Tuxedo domains if configured on the
same machine
Must be in the range between 32,769262,143
*RESOURCES
IPCKEY 39211
...
ubb.tux
Basic Tuxedo Application Configuration-11
2006 BEA Systems, Inc. 82
MASTER Parameter
MASTER
Specifies the logical machine identifier of the machine that
will assume the administration role for booting and shutting
down
Logical machine identifiers are mapped to real machine names
in the MACHINES section
In a multiple machine configuration, a second machine can be
specified as a backup to the master machine
*RESOURCES
IPCKEY 39211
MASTER SITE1,SITE2
...
ubb.tux
Basic Tuxedo Application Configuration-12
2006 BEA Systems, Inc. 83
MODEL Parameter
MODEL
SHM For single machine applications
MP For networked connected, multiple machine
configurations
OPTIONS is set to LAN if MODEL is MP
*RESOURCES
IPCKEY 39211
MASTER SITE1
MODEL SHM
...
ubb.tux
*RESOURCES
IPCKEY 39211
MASTER SITE1,SITE2
MODEL MP
OPTIONS LAN
...
ubb.tux
Basic Tuxedo Application Configuration-13
2006 BEA Systems, Inc. 84
Parameters Impacting IPC Resources
The Bulletin Board (BB) maintains tables statically allocated
for fast processing.
The size of these tables will be related to IPC resource parameters:




You may also override this parameter in the MACHINES section:


Although defaults are used, a failure to specify values for
MAXSERVERS and MAXACCESSERS will generate warnings
when compiling the binary with the tmloadcf utility.
100
50
Def
1 32,765
1 8,191
Range
Max # of servers, admin and apps MAXSERVERS
Max # of services that can be
advertised in Tuxedo apps
MAXSERVICES
Description Parameter
50 1 32,767
Max # of processes allowed to
connect to the BB
MAXACCESSERS
Version 9.0 +only
Basic Tuxedo Application Configuration-14
2006 BEA Systems, Inc. 85
Sanity Checks
The BBL periodically checks to see if the servers it
started are still running.
60s
Period a message blocks before timing out
BLOCKTIME * SCANUNIT < 32767s
BLOCKTIME
10s
Default
Sets the granularity of checks in seconds.
Must be a multiple of 2 or 5 secs
SCANUNIT
Seconds between sanity checks of servers
SANITYSCAN * SCANUNIT < 300s
SANITYSCAN
Description Parameter
*RESOURCES
SCANUNIT 20 # 10 seconds
SANITYSCAN 3 # 3 * 10 = 30 seconds
BLOCKTIME 2 # 2 * 10 = 20 seconds
ubb.tux
120s
Basic Tuxedo Application Configuration-15
2006 BEA Systems, Inc. 86
Configuring the MACHINES Section
The MACHINES section:
Is a required section
Must appear as the second section
Contains parameters related to a specific machine in
the configuration
Can contain certain parameters that override
parameter values defined in the RESOURCES
section
Basic Tuxedo Application Configuration-16
2006 BEA Systems, Inc. 87
MACHINES Section Parameters
The MACHINES section contains the following
information for each node involved in the Tuxedo
domain application:
Load to be added to requests made to remote machines NETLOAD
Max # of remote clients that can access this machine MAXWSCLIENTS
Name of the environment file to be read by all servers ENVFILE




Required
Logical machine identifier (used as a nickname) LMID
Location & name of the binary configuration file TUXCONFIG
Location & name of the application log file prefix ULOGPFX
Default location of the application servers APPDIR
Location of Tuxedo product directory TUXDIR
Description Parameter
Basic Tuxedo Application Configuration-17
2006 BEA Systems, Inc. 88
Other MACHINES Parameters
These parameters can be specified for each machine
configured in the application:
Used in multiple UNIX or mixed UNIX/Windows machine
configurations
Defaults can also be specified in the RESOURCES section
that will apply to all machines
UID
GID
PERM
Description Parameter
UNIX-style (octal) permissions set on IPC resources
Numeric user ID owner of IPC resources
Numeric group ID owner of IPC resources
Basic Tuxedo Application Configuration-18
2006 BEA Systems, Inc. 89
Example MACHINES Section
In addition, the machine name must match:
UNIX: uname -n
Windows: echo %COMPUTERNAME%
Minimum MACHINES section example:
. . .
*MACHINES
STUDENT14
LMID=SITE1
TUXDIR=C:\bea\tuxedo9.0
APPDIR=C:\appdir
TUXCONFIG=C:\appdir\tuxconfig
. . .
ubb.tux
Basic Tuxedo Application Configuration-19
2006 BEA Systems, Inc. 90
Configuring the GROUPS Section
The GROUPS section associates related servers to a
specific machine and provides for other common
behavior.
In addition, the GROUPS section can be used for:
Migration: groups can be migrated to backup machines
Distributed Transaction Processing (DTP): each group can be
configured to be associated with one XA-compliant Resource
Manager (RM)
Specifies a logout statement for the RM CLOSEINFO


Required
Associates the group with a machine LMID
Associates a unique identifier with the group [1-29999] GRPNO
Specifies a log statement for an RM [max=256 chars] OPENINFO
# copies of TMSs should be started [min=2, default=3] TMSCOUNT
Associates Transaction Management Service (TMS) with group TMSNAME
Description Parameter
Basic Tuxedo Application Configuration-20
2006 BEA Systems, Inc. 91
Example GROUPS Section
Example GROUPS Section:
*GROUPS
PP
LMID=SITE1
GRPNO=2
APPGRP2
LMID=SITE1
GRPNO=3
ORAGRP1
LMID=SITE2
GRPNO=4
OPENINFO="ORACLE_XA:Oracle_XA+Acc=P/scott/tiger+SesTm=100"
CLOSEINFO=""
TMSNAME="TMS_ORA"

APPGRP1
Name of group is APPGRP1
LMID=SITE1
Group is associated with SITE1 machine
GRPNO=2
Group ID is 2
OPENINFO=ORACLE_XA:Oracle_XA+Acc=P/scott/tiger+SesTm=100
Group has access to an
ORACLE XA Resource Manager
and this is the login string
(more on this later)
CLOSEINFO=
No logout string
TMSNAME=ORA_TMS
This is the logical name of the
Transaction Management Service
(more on this later)
ubb.tux
Basic Tuxedo Application Configuration-21
2006 BEA Systems, Inc. 92
Configuring the SERVERS Section
The SERVERS section contains server-specific
information for each server executable to be booted in
the application.
Application servers are created by developers using the
buildserver utility.
In addition to the name of the server executable, only
two paramaters are required.
We will discuss additional parameters in the next module.


Required
The name of the group associated with this server SRVGRP
Unique integer server ID (range 1 30,000) SRVID
Description Parameter
Basic Tuxedo Application Configuration-22
2006 BEA Systems, Inc. 93
SERVICES Section
The SERVICES section is used only when there is a
need to override the default service parameter values.
These parameters will be discussed in the next module.
Although this section is optional, a warning message
will be received when the UBBCONFIG is loaded to
binary. The common practice is to add an empty
SERVICES section entry.
. . .
*SERVERS
simpserv SRVGRP=APPGRP1 SRVID=10

*SERVICES

ubb.tux
Basic Tuxedo Application Configuration-23
2006 BEA Systems, Inc. 94
Complete Configuration Example
setenv.ksh
10
0101
1110
Example UBBCONFIG text file:
*RESOURCES
IPCKEY 67881
MASTER Site1
MODEL SHM
MAXSERVERS 150
MAXACCESSERS 200
*MACHINES
student14
LMID=Site1
APPDIR=/opt/apps
TUXCONFIG=/opt/apps/tuxconfig
TUXDIR=/opt/bea/tuxedo9.0
*GROUPS
APPGRP1 GRPNO=1 LMID=Site1
APPGRP2 GRPNO=2 LMID=Site1
*SERVERS
InqServer SRVID=10 SRVGRP=APPGRP2
UpdateServer SRVID=20 SRVGRP=APPGRP1
*SERVICES

Basic Tuxedo Application Configuration-24
2006 BEA Systems, Inc. 95
Section Review
Format the Tuxedo configuration file
Use the more common RESOURCES parameters
Configure the MACHINES and GROUPS sections
In this section, we learned how to:
Basic Tuxedo Application Configuration-25
2006 BEA Systems, Inc. 96
Road Map
1. Tuxedo Configuration File Basics
2. Tuxedo Application Deployment Basics
Tuxedo Administrator Tasks
Building Tuxedo Client Executables
Building Tuxedo Server Executables
Load and Unload the Tuxedo Configuration File
Basic Tuxedo Application Configuration-26
2006 BEA Systems, Inc. 97
Administrator Tasks
There are several roles that the Tuxedo application administrator
may be asked to perform:
Planning to deploy and then deploying the application in a production
environment.
Monitoring the Tuxedo application in production then implementing
maintenance of the application to include performance enhancement.
Planning for and implementing additional growth in the Tuxedo
application to support more services and/or users.
An administrators job can be viewed as two broadly defined
tasks:
Setup tasks All tasks required to prepare your system before booting the
application
Run-time administration Any tasks on an application that has been
configured
Basic Tuxedo Application Configuration-27
2006 BEA Systems, Inc. 98
Setup Tasks
Tuxedo Administrator setup tasks include:
Collecting information from designers, programmers, and
business users of the application
Installing the BEA Tuxedo system and application software
Configure the Tuxedo system parameters
Additionally, you may need to configure:
Data Dependent Routing criteria
Networked machines settings
Connectivity options for remote clients
XA transaction support
Queue spaces for the /Q subsystem

Basic Tuxedo Application Configuration-28
2006 BEA Systems, Inc. 99
Run-Time Administration
After the application is installed and configured,
administrators may need to:
Start up and shut down the application
Monitor the activities, problems, and performance of the
application
Identify and resolve problems as they occur
Take action on failures to maintain application availability
Dynamically modify the application as new features are
developed or improved
Manage and monitor remote clients
Tune the application to maximize performance
Basic Tuxedo Application Configuration-29
2006 BEA Systems, Inc. 100
The Deployment Process



TUXCONFIG
Deployed
Application
boots
Server
(*.c)
Environment
Variables
buildserver
UBBCONFIG
tmloadcf
tmboot
Client
(*.c)
buildclient
Other
source files

Server Executable

Client Executable

Header Files (*.h)
Other Object Files &
Libraries
(*.o & lib*)
Other Header Files
(*.h)



1
5
4
3
2
Basic Tuxedo Application Configuration-30
2006 BEA Systems, Inc. 101
Review: Environment Variables
Before running Tuxedo commands we need to set some
environment variables.
These can be set using a command/shell script file.


setenv.ksh
10
0101
1110
Example setenv.cmd script:
set TUXDIR=C:\bea\tuxedo9.0
set PATH=%TUXDIR%\bin;%PATH%
set TUXCONFIG=C:\student\course_tux\domains\adminTng\tuxconfig
These two are normally
already set as system
environment variables.
setenv.ksh
10
0101
1110
Example setenv.ksh script:
export TUXDIR=/opt/bea/tuxedo9.0
export PATH=$TUXDIR/bin:$PATH
export LD_LIBRARY_PATH=$TUXDIR/lib:$LD_LIBRARY_PATH
export TUXCONFIG=/appdir/tuxconfig
Example shown for SVR4
Name & location of
binary configuration file
Basic Tuxedo Application Configuration-31
2006 BEA Systems, Inc. 102
Building the Client Applications
Use the buildclient utility to create Tuxedo client
executables:
-o <file-name> Specifies the name of the executable to be built
-f <file(s)> Files to be linked in before the ATMI libraries
-l <files(s)> Files to be linked in after the ATMI libraries
-v Verbose mode, writes compilation command to stdout
Creating a Tuxedo client executable example:
C:\> buildclient v o clientdb f clientdb.c

Basic Tuxedo Application Configuration-32
2006 BEA Systems, Inc. 103
Building Tuxedo Servers
Use the buildserver utility to create Tuxedo server
executables:
-o <file-name> Specifies the name of the executable to be built
-f <file(s)> Files to be linked in prior to the ATMI libraries
-l <files(s)> Files to be linked in after the ATMI libraries
-v Verbose mode, writes compilation command to stdout
-s Specifies the names of services to be advertised and the
corresponding handler function with the server application to be used
In this example, the InqServer.exe will be created from the
Inq.c source code. At boot time, the INQ service will be
advertised invoking the Inq function.
Creating a Tuxedo server executable example:
C:\> buildserver v o InqServer f Inq.c s INQ:Inq

Basic Tuxedo Application Configuration-33
2006 BEA Systems, Inc. 104
tmloadcf and tmunloadcf Utilities
Use tmloadcf to build the binary configuration file
from the UBBCONFIG text file:




Use tmunloadcf to create a text version of the
current tuxconfig binary file:
Overwrite existing tuxconfig unconditionally -y
Only perform syntax checks on the UBBCONFIG text file -n
Description
tmloadcf
Options
Using the tmloadcf utlity:
C:\student\course_tux\labs\Lab04_CONF> tmloadcf y ubb.tux
Using the tmunloadcf utlity:
C:\student\course_tux\labs\Lab04_CONF> tmunloadcf > ubbBackup.tux
Basic Tuxedo Application Configuration-34
2006 BEA Systems, Inc. 105
Viewing the User Log File
Once the Tuxedo application has been started, all
Tuxedo system messages are logged to the user log
(ULOG) file called ULOG.mmddyy
By default, this file is located in the APPDIR
There is also another general ULOG located in TUXDIR
A ULOG message consists of two parts:
Tag - Time of day (hhmmss), the name of the machine, and
the name and identifier of the process logging the message
Text - BEA Tuxedo system message, with a message catalog
name, a message number, and the text of the message
Example ULOG system message:
121449.gumby!simpserv.27190: LIBTUX_CAT:262: std main starting
Basic Tuxedo Application Configuration-35
2006 BEA Systems, Inc. 106
Section Review
Compile and build Tuxedo client executables
Compile and build Tuxedo server executables
Archive a text version of the tuxconfig binary
In this section, we learned how to:
Basic Tuxedo Application Configuration-36
2006 BEA Systems, Inc. 107
Lab Exercise
For details on the exercise, refer to the Lab Guide.
If questions arise, ask the instructor.
The instructor will determine the stop time.
Lab 04 CONF: Configure, Build, and Deploy
a Tuxedo Application
Basic Tuxedo Application Configuration-37
2006 BEA Systems, Inc. 108
Module Review
Format the sections of the Tuxedo configuration file
Configure the mandatory parameters for each section
Build Tuxedo client and server executables
In this module, we learned how to:
Basic Tuxedo Application Configuration-38

Vous aimerez peut-être aussi