Appendix A. Using Penrose Virtual Directory Command-Line Tools

Using Penrose Virtual Directory Command-Line Tools

Several scripts are included with Penrose Virtual Directory to configure and control Penrose Server operations. The various script provide a simple way to perform Penrose Server management operations (like configuring partitions) through the command line; each script has a corollary to a Penrose Studio action. These scripts' options and usage information are described in more detail in this chapter.

A.1. Tool Locations

These tools are all contained in the /opt/vd-server-2.0/bin directory and must be run from that directory.

This script can clear the in-memory cache.

Options
cache.sh [options] commands [partition [source]]
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-v Runs the script in verbose mode.
Table A.1. cache.sh Options

Commands Description
clean Empties the tree nodes and tables for the cache.
drop Deletes the tree notes and tables for the cache.
invoke application_command Manually runs the specified command for the cache. For example, this is another way of having the cache module automatically run the clear method.
partition Optionally, specifies the name of the partition being modified.
source Optionally, specifies the data source for the partition. This can only be used when a partition is specified.
Table A.2. cache.sh Commands

The connection.sh script manages connections within the partition by importing or exporting, starting and stopping, and editing the connections.

Options
connection.sh [options] commands connection partition
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-D rootDN Gives the root user for Penrose Server; the default username is uid=admin, ou=system.
-h hostName Gives the hostname for the machine on which the service is running.
-p port Gives the port number for the service to which Penrose Server is connecting.
-P protocol Gives the protocol for Penrose Server to communicate with the MBeans object; the only supported JMX protocol is rmi.
-w password Gives the password for the Penrose Server root user; the default is secret.
-v Runs the script in verbose mode.
Table A.3. connection.sh Options

Commands Description
show Lists the connections configured for the given partition.
start Starts the connection for that partition.
stop Stops the connection for that partition.
restart Restarts the connection for that partition.
import connection path Imports the connection configuration from the specified directory into the given partition.
export connection path Exports the connection configuration for the named partition to the specified directory.
rename connection name1 name2 Renames the connection from name1 to name2.
remove connection name Deletes the specified connection.
partition Specifies the name of the partition being modified.
invoke application_command Manually runs the specified command for the connection server.
Table A.4. connection.sh Commands

The module.sh script manages modules used by the partition. The script can be used to import or export, start and stop, modify, and remove modules associated with any partition.

Options
module.sh [options] commands module partition
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-D rootDN Gives the root user for Penrose Server; the default username is uid=admin, ou=system.
-h hostName Gives the hostname for the machine on which the service is running.
-p port Gives the port number for the service to which Penrose Server is connecting.
-P protocol Gives the protocol for Penrose Server to communicate with the MBeans object; the only supported JMX protocol is rmi.
-w password Gives the password for the Penrose Server root user; the default is secret.
-v Runs the script in verbose mode.
Table A.5. module.sh Options

Commands Description
show Lists the modules configured for the given partition.
start Starts the module for that partition.
stop Stops the module for that partition.
restart Restarts the module for that partition.
import module path Imports the module configuration from the specified directory into the given partition.
export module path Exports the module configuration for the named partition to the specified directory.
rename module name1 name2 Renames the module from name1 to name2.
remove module name Deletes the specified module.
partition Specifies the name of the partition being modified.
invoke application_command Manually runs the specified command for the cache. For example, this is another way of having the cache module automatically run the clear method.
Table A.6. module.sh Commands

Penrose Server has an integrated monitoring feature which tracks the Penrose Server process and will send a notification, either an email or an SNMP trap, if the server stops.

Options
monitor.sh [options] [start|stop]

NOTE

All of the options can only be run when the monitor.sh script is run in the foreground.

Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-v Runs the script in verbose mode.
--version Returns the version number of the current Penrose Server.
Table A.7. monitor.sh Options

NOTE

Using either script command causes the monitor.sh script to run in the background.

Commands Description
start Starts the monitor service for Penrose Server.
stop Stops the monitor service for Penrose Server.
Table A.8. monitor.sh Commands

Used to synchronize a NIS server, meaning this script copies the entries in the NIS server and any changes over to the global repository.

Options
nis.sh [options] synchronize Federation domain [NIS domain [NIS maps...]]
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-D rootDN Gives the root user for Penrose Server; the default username is uid=admin, ou=system.
-h hostName Gives the hostname for the machine on which the service is running.
-p port Gives the port number for the service to which Penrose Server is connecting.
-P protocol Gives the protocol for Penrose Server to communicate with the MBeans object; the only supported JMX protocol is rmi.
-w password Gives the password for the Penrose Server root user; the default is secret.
-v Runs the script in verbose mode.
--version Returns the version number of the current Penrose Server.
Table A.9. nis.sh Options

Commands Description
synchronize Sycnhronizes the NIS server with the global repository. Depending on the options used with it, this can synchronize a specific NIS domain or NIS maps with a specific federation domain.
Table A.10. nis.sh Commands

Partitions are the primary entry in Penrose Server, which contain all of the data sources, connections, modules, and other virtual directory configuration. Partitions, as with the other configuration entries, can be managed through the command line,

Options
partition.sh [options] commands partition
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-D rootDN Gives the root user for Penrose Server; the default username is uid=admin, ou=system.
-h hostName Gives the hostname for the machine on which the service is running.
-p port Gives the port number for the service to which Penrose Server is connecting.
-P protocol Gives the protocol for Penrose Server to communicate with the MBeans object; the only supported JMX protocol is rmi.
-w password Gives the password for the Penrose Server root user; the default is secret.
-v Runs the script in verbose mode.
Table A.11. partition.sh Options

Commands Description
show Lists the partitions configured for the Penrose Server.
start Starts the partition.
stop Stops the partition.
restart Restarts the partition.
invoke application_command Manually runs the specified command for the partition (the virtual directory). For example, invoke can be used to run LDAP commands such as ldapmodify and ldapsearch against the partition's virtual directory.
import path Imports the partition configuration from the specified directory.
export path Exports the partition configuration to the specified directory.
rename name1 name2 Renames the partition from name1 to name2.
remove name Deletes the specified partition.
partition Specifies the name of the partition being modified.
Table A.12. partition.sh Commands

There are two schema.sh scripts with Penrose Virtual Directory, both to use for the integrated LDAP services to communicate with clients. One is for compiling schema to work with ApacheDS. The other is for converting OpenLDAP formatted schema files into OpenDS formatted schema files.

These schema.sh scripts are in two different locations:

  • The ApacheDS tool is in /opt/vd-server-2.0/services/ApacheDS/bin/.

  • The ApacheDS tool is in /opt/vd-server-2.0/services/OpenDS/bin/.

Options
schema.sh [options] commands partition
Options Description
/path/to/file The absolute path to the schema file which is being compiled or formatted. For schema files to be loaded by Penrose Server, they should be located in the /opt/vd-server-2.0/schema directory and have the extension .schema.
Table A.13. schema.sh Options

The source.sh script manages data sources used by the partition. The script can be used to import or export, start and stop, modify, and remove sources associated with any partition.

Options
source.sh [options] commands source partition
Options Description
-?, - -help Prints the help for the script.
-d Runs the script in debug mode.
-D rootDN Gives the root user for Penrose Server; the default username is uid=admin, ou=system.
-h hostName Gives the hostname for the machine on which the service is running.
-p port Gives the port number for the service to which Penrose Server is connecting.
-P protocol Gives the protocol for Penrose Server to communicate with the MBeans object; the only supported JMX protocol is rmi.
-w password Gives the password for the Penrose Server root user; the default is secret.
-v Runs the script in verbose mode.
Table A.14. source.sh Options

Commands Description
show Lists the sources configured for the given partition.
start Starts the source for that partition.
stop Stops the source for that partition.
restart Restarts the source for that partition.
invoke application_command Manually runs the specified command for the source. For example, invoke can be used to run LDAP commands such as ldapmodify and ldapsearch against the source LDAP directory.
import source path Imports the source configuration from the specified directory into the given partition.
export source path Exports the source configuration for the named partition to the specified directory.
rename source name1 name2 Renames the source from name1 to name2.
remove source name Deletes the specified source.
partition Specifies the name of the partition being modified.
Table A.15. source.sh Commands