FILE: @(#) 1.2 07/08/09 23:54:47 README.razorRemoteCLI The Razor remote command-line interface (CLI) allows a subset of the razor 'local' command-line functionality to be executed on a machine other than the Razor server host. The Razor remote CLI is supports UNIX clients, Windows clients, UNIX-based Razor servers, and Windows-based Razor servers. The remote CLI currently requires ssh, i.e. secure shell, for use in executing commands on the remote Razor server host machine. The remote CLI currently requires 'scp', i.e. secure copy, for use in uploading/downloading files to/from the remote Razor server. Rather than requiring the user to specify ssh-related and scp-related arguments on the command-line for each operation, the CLI makes use of 'remote database connection profiles'. A given profile caches all of the information necessary to execute Razor commands remotely for a given Razor DB. A user may create multiple profiles for working with multiple Razor DBs. A particular profile could be referenced on the remote CLI to indicate the applicable Razor DB. In the absence of a specified profile, the default profile, $HOME/.defaultRmtRzConnProfile.xml is used. It should be noted that the default profile can only reference a *single* Razor database. Here's how a profile could be created for use by an Apple OS X client to run the Razor command-line remotely on a Linux-based Razor server. razorRemote -c make_profile -conn /usr/bin/ssh -port 22 -copy /usr/bin/scp -host Glsclinux -prep /usr/local/razoradm/razor_db/db1/rz_prep.sh -tmp /home/brian/tmp/cli NOTE: As no '-f' option was specified the profile is saved as $HOME/.defaultRmtRzConnProfile NOTE: The scp, ssh commands specify the command for execution on the CLIENT NOTE: The 'prep' option specifies the filename of the Razor DB prep file on the remote server NOTE: The 'tmp' option specifies the tmp directory on the REMOTE server Let's dump the profile created in the previous example: razorRemote -c view_profile profile: [/Users/brian/.defaultRmtRzConnProfile.xml] conn: [/usr/bin/ssh] connOptions: [] xfer: [/usr/bin/scp] xferOptions: [] user: [brian] host: [glsclinux] licenseDir: [/usr/local/razoradm/Razor_lm] razorHome: [/usr/local/razoradm/Razor] userHome: [/Users/brian] prep: [/usr/local/razoradm/razor_db/db1/rz_prep.sh] rmtTmpDir: [/usr/local/rztmp/remote]] JVM: [1.5.0_07-87] OS: [Mac OS X;10.4.9;ppc] Usage: razorRemote -c make_profile -conn [-connOpts ] -copy [-copyOpts ] -host [-user ] -prep -tmp -razorHome -licenseDir [-f ] [-dbgLevel ] razorRemote -c view_profile [-f ] [-dbgLevel ] Options: -c make_profile - Create default or named remote Razor DB connection profile for use with subsequent remote command-line operations. view_profile - View contents of default or specified remote Razor DB connection profile -conn Connection method to be used to connect to remote Razor DB host. E.g. 'ssh' -connOpts Connection method optional parameters -copy Copy method used to upload/download files to/from remote DB. E.g. 'scp' -copyOpts Copy method optional parameters -host Remote Razor DB hostname. Remote Razor command-line will execute 'local' razor commands on this host -user Username for Razor operations -prep Specifies rz_prep filename for specific remote Razor DB to be used -tmp Specifies temporary, working directory located on remote host -razorHome Specifies RAZOR_HOME on remote host -licenseDir Specifies RAZOR_LICENSE_DIR on remote host -f Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' razorRemote -admin id - Display license id information razorRemote -admin license_info - View license information razorRemote -admin version - Display the current version information razorRemote -admin info - Displays connections to all db servers razorRemote -admin who - Display current connections to db server File operations: razorRemote -c ci -f -g [-d dir] -t [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-p <file>] [-profile <file>] [-dbgLevel <level>] razorRemote -c co -f <file> -g <group> [-d dir] -t <title> [-o] [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-p <file>] [-profile <file>] [-dbgLevel <level>] razorRemote -c un_co -f <file> -g <group> [-profile <file>] [-dbgLevel <level>] razorRemote -c intro -f <file> -g <group> [-b] [-k] [-d folder] [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-profile <file>] [-dbgLevel <level>] razorRemote -c branch -f <file> -g <group> [-v version] -t <title> [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-p <file>] [-profile <file>] [-dbgLevel <level>] razorRemote -c terminate -f <file> -g <group> -v <version> [-profile <file>] [-dbgLevel <level>] razorRemote -c get -f <file> -g <group> [-v version] [[-d dir] [-o] | [-z]] [-profile <file>] [-dbgLevel <level>] razorRemote -c get_issue -f <issue> [-v version] [-g <issue group>] [[-d dir] [-o] | [-z]] [-profile <file>] [-dbgLevel <level>] razorRemote -c new_folder -f <folder> -g <group> [-profile <file>] [-dbgLevel <level>] razorRemote -c rename -f <name> -g <group> -n <new_name> [-profile <file>] [-dbgLevel <level>] razorRemote -c rm -f <file> -g <group> [-i <issue[<:issue group>]>] [-q] [-profile <file>] [-dbgLevel <level>] razorRemote -c rm_folder -f <folder> -g <group> [-i <issue[<:issue group>]>] [-q] [-profile <file>] [-dbgLevel <level>] razorRemote -c rm_issue -f <issue> [-g <issue group>] [-q] [-profile <file>] [-dbgLevel <level>] razorRemote -c modify_issue -f <issue> [-g <issue group>] -a <attribute name:attribute value> [-profile <file>] [-dbgLevel <level>] razorRemote -c promote -f <file> -v <version> -s <state> -g <group> [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-profile <file>] [-dbgLevel <level>] razorRemote -c promote_issue -f <issue> -s <state> [-g <issue group>] [-profile <file>] [-dbgLevel <level>] razorRemote -c dup -f <thread> -n <new name> -g <group> -t <title> [-i <issue[<:issue group>]>] [-profile <file>] [-dbgLevel <level>] razorRemote -c bump -f <file> -g <group> -t <title> [-r <new major>] [-i <issue[<:issue group>]>[,<issue[<:issue group>]]] [-profile <file>] [-dbgLevel <level>] Options: -c ci - Check the specified <file> in. co - Check the specified <file> out. un_co - Un-check out the specified <file>. intro - Introduce the specified <file> branch - Branch the specified <file> terminate - Terminate branch specified by <version> of <file> get - Get a read only copy of the specified <file>. get_issue - Get a read only copy of the specified Issue. new_folder - Create a folder. rename - Rename a file or folder. rm - Remove the specified file. rm_folder - Remove the specified folder and all of its files. rm_issue - Remove the specified Issue. modify_issue - Modify the specified Issue. promote - Promote the file to the specified state. promote_issue - Promote the issue to the specified state. dup - Duplicate the contents of the specified thread. bump - Bump the major version of the specified file. The default is to increment the major version by one unless -r <new major> is specified. -a Attribute name, value pair For TIME_STAMP attributes must use same format as specified in Attributes file. For TEXT_PANE attributes must specify attribute value as file to replace (Writeable TEXT_PANEs) or append to (AppendOnly TEXT_PANEs) current text pane contents. -b Use binary archival. -d Optional directory to put/get file. If none specified, use current directory. For file introduction this name will represent the folder to introduce the file to. -f Name of file on which to perform operation. -g Name of group to which file belongs. For issues commands, the <issue group> is the name of the group which appears in the issues Group pulldown. For the main issues group, no group name should be entered. -i An issue to relate to the operation. More than one -i <issue> may appear on a line. If the issue is in the default issue group, no <issue group> should be specified. For other issue groups, the issue number must be followed by :<issue group> where <issue group> is the name that appears in the Group pulldown of issues. -k Set file property such that keyword expansion is disabled. -n New name. -o Force overwrite of existing files. -p File containing description text (prose). -q No interactive query. Do not ask user to confirm operation -r Major revision number. -s The state used for promotion. -t Title for operation. -v Version. -z For get and get_issue operations, send output to stdout -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' Creating thread scripts: razorRemote -c thread -f <file> -g <group> [-t top dir] [-v version] [-d dir] [-o] [-profile <file>] [-dbgLevel <level>] Options: -c thread -Generate a thread script. -d -Optional directory to write script to. If none specified, current directory will be used. -f -Name of thread to generate script from. -g -Name of group to which thread belongs. -t -Optional top level directory to populate in script. If none specified, $HOME will be used. -v -Optional version of thread to generate script from. If none specified, latest version will be used. -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' Comparing two versions of a thread or two different threads: razorRemote -c thread_compare -f <thread> [-f <thread>] -g <group> [-v <v1>] [-v <v2>] [-profile <file>] [-dbgLevel <level>] Options: -f -Name of thread to compare. If two thread names are specified, the specified version of each thread will be used. -g -Name of group to which thread belongs. -v -Version to compare. If one version is specified. the latest version will be used. -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' Creating a thread razorRemote -c new_thread -f <name> -g <group> [-n <file>] [-i <issue[<:issue group>]>] [-m] [-profile <file>] [-dbgLevel <level>] Options: -c new_thread -Create a thread. -f -Name of new thread. For threads, file contains 3 fields of: < + | - > <file> <version> where '+' indicates inclusion, '-' exclusion. -g -Name of group to which thread belongs. -i -An issue to relate this operation to. See the '-i' description above for more details. -m -Allow multiple versions of a file (trunk/branch) to be included in the thread . -n -Alternate name of list file. <name> is the default, file should be in the format described for -f -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' Thread and project editing: razorRemote -c modify -f <name> -g <group> -t <title> [-v <ver>] [-p <file>] [-n <file>] [-i <issue[<:issue group>]>] [-m] [-profile <file>] [-dbgLevel <level>] Options: -c modify -Modify a thread or project. -f -Name of thread or project to edit. For threads, file contains 3 fields of: < + | - > <file> <version> For projects, file contains 4 fields of: < + | - > <thread> <group> <version> where '+' indicates inclusion, '-' exclusion. -g -Name of group to which thread belongs or ++PROJECT++. -n -Alternate name of change file. <name> is the default -p -File containing description text (prose). -v -Modify the specified version. If no version is specified, the latest version will be modified. -t -Title for the modification -i -An issue to relate this operation to. See the '-i' description above for more details. -m -Allow multiple versions of a file (trunk/branch) to be included in the thread . -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' Report functions: razorRemote -c report -f <name> -g <group> [-l <u | d>] [-profile <file>] [-dbgLevel <level>] Options: -c report -Run a report. -g -Name of group to which the report belongs. -f -Name of report. -l -Specifies report locale (user or database). -profile Remote Razor DB connection profile filename. If no filename is specified, the default profile ($HOME/.defaultRmtRzConnProfile.xml) is used -dbgLevel Debug level for console logger. Level specified as 'DEBUG', 'INFO', 'WARN' or 'ERROR' SAMPLE USAGE _____________________________________________________________________________________ % razorRemote -admin info The license manager is running on GlscLinux.localdomain, pid = 4894 Remote Clients are using Local and Razor Password files Connections: ------------ Database '/usr/local/razoradm/razor_db/db1/RAZOR_UNIVERSE', is active on GlscLinux.localdomain, rz_server pid = 4944 1 - brian is running Issues on machine GlscLinux.localdomain, pid = 5551 2 - brian is running Versions on machine GlscLinux.localdomain, pid = 5553 ---- Database '/usr/local/razoradm/razor_db/demo/RAZOR_UNIVERSE', is active on GlscLinux.localdomain, rz_server pid = 5604 1 - brian is running Versions on machine GlscLinux.localdomain, pid = 5613 There are 3 applications connected. _____________________________________________________________________________________ % razorRemote -admin who Connections: brian is running Issues on machine GlscLinux.localdomain. brian is running Versions on machine GlscLinux.localdomain. _____________________________________________________________________________________ % razorRemote -c co -f ByteArrayPool.java -g db1_grp1 -d . -t "Adding RCS tags to header" -i I...-..5 0 [main] ERROR com.visible.cli.rmt.RazorRemote - Remote command [/usr/bin/ssh brian@glsclinux source /usr/local/razoradm/razor_db/db1/rz_prep.sh ; RAZOR_LICENSE_DIR=/usr/local/razoradm/Razor_lm ; export RAZOR_LICENSE_DIR ; RAZOR_HOME=/usr/local/razoradm/Razor ; export RAZOR_HOME ; /usr/local/razoradm/Razor/bin/razor -c co -f ByteArrayPool.java -g db1_grp1 -d /usr/local/rztmp/remote -t "Adding RCS tags to header" -o -i I...-..5 ] failed with status of [1] stdout [] stderr [Overwrite flag [-o] required] % razorRemote -c co -f ByteArrayPool.java -g db1_grp1 -d . -t "Adding RCS tags to header" -i I...-..5 -o % razorRemote -c ci -f ByteArrayPool.java -g db1_grp1 -d . -t "Adding RCS tags to header" -i I...-..5 _____________________________________________________________________________________