366 lines
14 KiB
HTML
366 lines
14 KiB
HTML
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
|
<html>
|
||
|
<head>
|
||
|
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||
|
<LINK rel="stylesheet" type="text/css" href="../../../rzahg/ic.css">
|
||
|
|
||
|
<title>The AdminApp object for scripted administration</title>
|
||
|
</head>
|
||
|
|
||
|
<BODY>
|
||
|
<!-- Java sync-link -->
|
||
|
<SCRIPT LANGUAGE="Javascript" SRC="../../../rzahg/synch.js" TYPE="text/javascript"></SCRIPT>
|
||
|
|
||
|
<h5><a name="wsaobjadmapp"></a>The AdminApp object for scripted administration</h5>
|
||
|
|
||
|
<p>The AdminApp object interacts with the WebSphere Application Server - Express management and configuration services to administer applications. For example, you can use the AdminApp object to install and uninstall applications, list the modules for an application, and export an application.</p>
|
||
|
|
||
|
<p>You can invoke most of the AdminApp functions in local mode, which means that the client does not communicate with the server to accomplish the function. To run in local mode, use the -conntype NONE option when you start the scripting client. If a server is running, it is not recommended that you run the AdminApp tool in local mode.</p>
|
||
|
|
||
|
<p>For additional information about the AdminApp object, see these topics:</p>
|
||
|
<ul>
|
||
|
<li><a href="help/rxml_taskoptions.html">Installation options for the AdminApp object</a> <img src="help.gif" width="18" height="15" align="absbottom" alt="Go to Help documentation"></li>
|
||
|
<li><a href="help/rxml_taskinfo.html">Example: Obtaining information about task options for the AdminApp install command</a> <img src="help.gif" width="18" height="15" align="absbottom" alt="Go to Help documentation"></li>
|
||
|
</ul>
|
||
|
|
||
|
<p>The following public methods are available for the AdminApp object:</p>
|
||
|
|
||
|
<p><strong>deleteUserAndGroupEntries</strong>
|
||
|
<br>Deletes users or groups for all roles, and deletes userids and passwords for all of the RunAs roles defined in the application.</p>
|
||
|
<p>Parameters: appname</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp deleteUserAndGroupEntries myapp</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.deleteUserAndGroupEntries('myapp')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>edit</strong>
|
||
|
<br>Edits an application or module in interactive mode.</p>
|
||
|
<p>Parameters: appname, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp edit "JavaMail Sample" {-MapWebModToVH {{"JavaMail
|
||
|
Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH}}}</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.edit("JavaMail Sample", '[-MapWebModToVH [["JavaMail
|
||
|
Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH]]]')</pre></li>
|
||
|
</ul>
|
||
|
<p><strong>Note:</strong> The edit command changes the application deployment. Specify these changes in the options parameter. No options are required for the edit command.</p>
|
||
|
|
||
|
<p><strong>editInteractive</strong>
|
||
|
<br>Edits an application or module in interactive mode.</p>
|
||
|
<p>Parameters: appname, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp editInteractive ivtApp</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.editInteractive('ivtApp')</pre></li>
|
||
|
</ul>
|
||
|
<p><strong>Note:</strong> The editInteractive command changes the application deployment. Specify these changes in the options parameter. No options are required for the editInteractive command.</p>
|
||
|
|
||
|
<p><strong>export</strong>
|
||
|
<br>Exports the application appname parameter to a file you specify by file name.</p>
|
||
|
<p>Parameters: appname, filename</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp export "My App" /usr/me/myapp.ear</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.export("My App", 'usr/me/myapp.ear')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>exportDDL</strong>
|
||
|
<br>Extracts the description definition language (DDL) from the application appname parameter to the directoryname parameter that a directory specifies.</p>
|
||
|
<p>Note: This command is not supported when running from a system with only standalone scripting client install.</p>
|
||
|
<p>Parameters: appname, directoryname, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp exportDDL "My App" /usr/me/DDL
|
||
|
{ddlprefix myApp}</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.exportDDL("My App", /usr/me/DDL',
|
||
|
'[-ddlprefix myApp]')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>help</strong>
|
||
|
<br>Displays help for the AdminApp object and AdminApp commands.</p>
|
||
|
<p>Parameters: operation name (optional)</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp help</pre>
|
||
|
<pre>$AdminApp help uninstall</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>print AdminApp.help()</pre>
|
||
|
<pre>print AdminApp.help('uninstall')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>install</strong>
|
||
|
<br>Installs an application in non-interactive mode, given a fully qualified file name and a string of installation options.</p>
|
||
|
<p>Note: This command is not supported when running from a system with only standalone scripting client install.</p>
|
||
|
<p>Parameters: earfile, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp install /home/mydir/apps/myapp.ear</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.install('/home/mydir/apps/myapp.ear')</pre></li>
|
||
|
</ul>
|
||
|
<p>There are many options available for this command. You can obtain a list of valid options for an EAR file with the following command:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp options <em>earfilename.EAR</em></pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.options('earfilename.EAR')</pre></li>
|
||
|
</ul>
|
||
|
<p>You can also obtain help for each object with the following command:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp help <em>optionname</em></pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.help('<em>optionname</em>')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>installInteractive</strong>
|
||
|
<br>Installs an application in interactive mode, given a fully qualified file name and a string of installation options.</p>
|
||
|
<p>Note: This command is not supported when running from a system with only standalone scripting client install.</p>
|
||
|
<p>Parameters: earfile, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp installInteractive /QIBM/UserData/WebASE51/ASE/
|
||
|
myInstance/installableApps/jmsample.ear</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.installInteractive('/QIBM/UserData/WebASE51/ASE/
|
||
|
myInstance/installableApps/jmsample.ear')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>list</strong>
|
||
|
<br>Lists the applications installed in the configuration.</p>
|
||
|
<p>Parameters: none</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp list</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>print AdminApp.list()</pre></li>
|
||
|
</ul>
|
||
|
<p>Example output:</p>
|
||
|
<pre>wsadmin>$AdminApp list
|
||
|
adminconsole
|
||
|
DefaultApplication
|
||
|
ivtApp</pre>
|
||
|
|
||
|
<p><strong>listModules</strong>
|
||
|
<br>Lists the modules in an application.</p>
|
||
|
<p>Parameters: appname, options</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp listModules ivtApp</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>print AdminApp.listModules('ivtApp')</pre></li>
|
||
|
</ul>
|
||
|
<p>Example output:</p>
|
||
|
<pre>wsadmin>$AdminApp listModules ivtApp
|
||
|
ivtApp#ivtEJB.jar+META-INF/ejb-jar.xml
|
||
|
ivtApp#ivt_app.war+WEB-INF/web.xml</pre>
|
||
|
<p>This example is formed by the concatenation of appname, #, module URI, +, and DD URI. You can pass this string to the edit and editInteractive AdminApp commands.</p>
|
||
|
|
||
|
<p><strong>options</strong>
|
||
|
<br>Displays a list of options for installing an EAR file.</p>
|
||
|
<p>Parameters: earfile</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp options /QIBM/UserData/WebASE51/ASE/
|
||
|
myInstance/installableApps/jmsample.ear</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.options('/QIBM/UserData/WebASE51/ASE/
|
||
|
myInstance/installableApps/jmsample.ear')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>publishWSDL</strong>
|
||
|
<br>Publishes WSDL files for the application specified in the appname parameter to the file specified in the filename parameter using the soap address prefixes specified in the soapAddressPrefixes parameter.</p>
|
||
|
<p>Parameters: appname, filename, soapAddressPrefixes (optional)</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp publishWSDL JAXRPCHandlersServer /temp/a.zip
|
||
|
{{JAXRPCHandlersServerApp.war {{http http://localhost:9080}}}}</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.publishWSDL('JAXRPCHandlersServer', 'c:/temp/a.zip',
|
||
|
'[[JAXRPCHandlersServerApp.war [[http http://localhost:9080]]]]')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>taskInfo</strong>
|
||
|
<br>Provides information about a particular task option for an application file.</p>
|
||
|
<p>Parameters: earfile, task name</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp taskInfo /QIBM/UserData/WebASE51/ASE/myInstance/installableApps/jmsample.ear
|
||
|
MapWebModToVH</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>print AdminApp.taskInfo('c:/websphere/appserver/installableApps/jmsample.ear',
|
||
|
'MapWebModToVH')</pre></li>
|
||
|
</ul>
|
||
|
<p>Example output:</p>
|
||
|
<pre>MapWebModToVH: Selecting virtual hosts for Web modules
|
||
|
Specify the virtual host where you want to install the Web modules contained in
|
||
|
your application. Web modules can be installed on the same virtual host
|
||
|
or dispersed among several hosts.
|
||
|
Each element of the MapWebModToVH task consists of the following 3 fields:
|
||
|
"webModule," "uri," "virtualHost."
|
||
|
Of these fields, the following may be assigned new values: "virtualHost"
|
||
|
and the following are required: "virtualHost"
|
||
|
|
||
|
The current contents of the task after running default bindings are:
|
||
|
webModule: JavaMail Sample WebApp
|
||
|
uri: mtcomps.war,WEB-INF/web.xml
|
||
|
virtualHost: null</pre>
|
||
|
|
||
|
<p><strong>updateAccessIDs</strong>
|
||
|
<br>Updates the access id information for users and groups assigned to various roles defined in the application. The access ids are read from the user registry and saved in the application bindings. It is recommended that you call this method after you install an application or after you edit security role information for an installed application. The scripting client must be connected to the application server when you invoke this command.</p>
|
||
|
<p>The bAll boolean parameter retrieves and saves all access IDs for users and groups in the application bindings. Specify false if you want to retrieve access ids for users or groups that do not have an access id in the application bindings.</p>
|
||
|
<p>Parameters: appname, bAll</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp updateAccessIDs myapp true</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.updateAccessIDs('myapp', 'true')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p><strong>view</strong>
|
||
|
<br>View the task specified by the taskname option parameter for the application or module specified by the name parameter. Use -tasknames as the option to get a list of valid task names for the application. Otherwise, specify one or more task names as the option.</p>
|
||
|
<p>Parameters: name, taskname (optional)</p>
|
||
|
<p>Example usage:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp view adminconsole</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.view('adminconsole')</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p>Example output:</p>
|
||
|
|
||
|
<pre>MapRolesToUsers: Mapping Users to Roles
|
||
|
|
||
|
Each role defined in the application or module must be
|
||
|
mapped to a user or group from the domain's user registry.
|
||
|
|
||
|
Role: administrator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: operator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: configurator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: monitor
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
MapWebModToVH: Selecting Virtual Hosts for Web Modules
|
||
|
|
||
|
Specify the virtual host where you want to install the Web
|
||
|
modules contained in your application. You can install Web
|
||
|
modules on the same virtual host or dispersed among several hosts:
|
||
|
|
||
|
Web Module: adminconsole
|
||
|
URI: adminconsole.war,WEB-INF/web.xml
|
||
|
Virtual Host: admin_host
|
||
|
MapModulesToServers: Selecting Application Servers
|
||
|
|
||
|
Specify the application server where you want to install
|
||
|
modules contained in your application. You can install
|
||
|
modules on the same server or dispersed among several servers.
|
||
|
|
||
|
Module: adminconsole
|
||
|
URI: adminconsole.war,WEB-INF/web.xml
|
||
|
Server: WebSphere:cell=juniartiNetwork,node=juniartiManager,server=dmgr
|
||
|
AppDeploymentOptions: Specifying Application Options
|
||
|
|
||
|
Specify the various options available to prepare and install your application:
|
||
|
|
||
|
Directory to Install Application: $(APP_INSTALL_ROOT)/juniartiNetwork
|
||
|
Distribute Application: Yes
|
||
|
Use Binary Configuration: No
|
||
|
Application Name: adminconsole
|
||
|
Create MBeans for Resources: Yes
|
||
|
Enable Class Reloading: No
|
||
|
Reload Interval in Seconds: 0</pre>
|
||
|
|
||
|
<p>Example usage with the taskname option:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp view adminconsole {-AppDeploymentOptions -MapModulesToServers}</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.view('Test', ['-AppDeploymentOptions', '-MapModulesToServers'])</pre></li>
|
||
|
</ul>
|
||
|
|
||
|
<p>Example output:</p>
|
||
|
|
||
|
<pre>Specify the application server where you want to install
|
||
|
modules contained in your application. Modules can be installed
|
||
|
on the same server or dispersed among several servers:
|
||
|
Module: adminconsole URI: adminconsole.war,WEB-INF/web.xml Server:
|
||
|
WebSphere:cell=juniartiNetwork,node=juniartiManager,server=dmgr
|
||
|
AppDeploymentOptions: Specifying Application Options
|
||
|
Specify the required options to prepare and install your application:
|
||
|
Directory to Install Application: $(APP_INSTALL_ROOT)/juniartiNetwork
|
||
|
Distribute Application: Yes Use Binary Configuration: No Application Name:
|
||
|
adminconsole Create MBeans for Resources: Yes Enable Class Reloading:
|
||
|
No Reload Interval in Seconds: 0</pre>
|
||
|
|
||
|
<p>Example usage with the taskname option:</p>
|
||
|
<ul>
|
||
|
<li>Jacl:
|
||
|
<pre>$AdminApp view adminconsole#adminconsole.war+WEB-INF/web.xml {-MapRolesToUsers}</pre></li>
|
||
|
<li>Jython:
|
||
|
<pre>AdminApp.view('adminconsole#adminconsole.war+WEB-INF/web.xml', ['-MapRolesToUsers'])</pre></li>
|
||
|
</ul>
|
||
|
<p>Example output: </p>
|
||
|
<pre>MapRolesToUsers: Mapping Users to Roles
|
||
|
|
||
|
Each role defined in the application or module must be
|
||
|
mapped to a user or group from the domain's user registry.
|
||
|
|
||
|
Role: administrator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: operator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: configurator
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
Role: monitor
|
||
|
Everyone?: No
|
||
|
All Authenticated?: No
|
||
|
Mapped Users:
|
||
|
Mapped Groups:
|
||
|
MapWebModToVH: Selecting Virtual Hosts for Web Modules</pre>
|
||
|
|
||
|
</body>
|
||
|
</html>
|