Remote compiling occurs when RCB runs on a local machine but has all of its build operations take place remotely. This is useful if the target machine lacks some required capability that the local machine has, such as support for Java 1.6.
As an example, you could build on a local machine with Java 1.6 support and export to a machine that lacks Java 1.6 support if:
The remote machine, without Java 1.6 support, is part of a network with machines that support Java 1.6.
The remote machine, without Java 1.6 support, has a common nfs mounting with those machines.
This is true if absolute path names on the two machines are the same, usually something like /nfs/some-path.
The local machine, with Java 1.6 support, has a remote shell.
You have access to Korn shell.
Apart from some initial system setup and starting RCB with an additional command line option, using RCB in remote-compile mode looks the same to you as normal operation.
The requirements necessary for the system setup are:
Preparing to use a remote shell
Many UNIX platforms call the remote shell rsh. However, on some platforms rsh is a restricted shell. On these platforms the remote shell is probably called remsh.
The remote shell must be set up so that the user ID and password prompt does not appear. You may have to make arrangements with your System Administrator.
Ensuring access to the needed tools
The environment on the remote machine must be set up so that the compiler and make utility are accessible. This may be accomplished through the default login profile or by an environment setup script.
Putting in place the needed local and remote scripts
Remote compiling depends on a Korn shell command processor script that processes commands from RCB and passes them to the remote machine by way of the remote shell.
Rogue Wave provides two sample scripts, xrcb_local and xrcb_remote, that are mostly complete. These scripts are internally documented with instructions on how to make the needed modifications.
xrcb_local must be modified to provide, at a minimum, the remote machine name and runenv configuration specifier(s). Here are the lines that must or may need modifying (see following notes for additional discussion):
########################################################### ## These items are the ones that you will typically need ## to customize ########################################################### ## The remote system name machine=PLACE_MACHINE_NAME_HERE ## This is the parameter to be passed to runenv (a standard ## setup script used within Rogue Wave). Multiple configs ## (compiler and database) are separated by colons (i.e.: ## sunpro50:sybase1111p) config=PLACE_RUNENV_CONFIG_HERE ## On some platforms, the remote shell utility is called ## "rsh" on other platforms "rsh" is the restricted shell ## (not what you want to use). On those platforms, the ## remote shell is probably invoked by "remsh" remote=rsh ## That machine's place to work location=`pwd` ## ################################################### ## These items are ones that you may need to customize ## ################################################### ## what to put after $location for that machine filesep=/ ## what to put after $machine for your rcp/rsh machsep=: |
xrcb_remote can be run as is, unless you want to enable/disable logging for debugging purposes. By default, logging is enabled.
LOG=echo # replace with : to avoid logging, use echo # to log |
Keep the following in mind when setting up your system:
The setting config=PLACE_RUNENV_CONFIG_HERE in xrcb_local is passed to the remote script, which uses it as $thisconfig in this line:
## This will set up the environment for eval $(runenv $thisconfig 2>/dev/null) |
If your remote machine is set up to set the compiler environment at login, you can remove the above lines from xrcb_remote and ignore the config= setting in xrcb_local.
If your remote machine uses a script similar to Rogue Wave Software's runenv to set compiler environments, you must modify the above lines in xrcb_remote to call the setup script as required by the remote system. If the setup script requires one or more parameters, you can: 1) hard code the parameters into xrcb_remote, or 2) define config= in xrcb_local and use $thisconfig in xrcb_remote to represent the passed value.
The setting
## That machine's place to work location='pwd' |
makes the working directory for the remote shell whatever directory you land in upon logging onto the remote machine. If you want the working directory to be some other location, enter the absolute path as the value of location=.
Once setup is complete, compiling remotely is straightforward.
Be sure you have set the RCB_HOME environment variable so that it points to the directory where you installed RCB (rcb_install).
To run the GUI interface, execute rcb with the -remote flag. If the local remote-compiling script is in the same directory as rcb itself, you need only provide the script name. If located elsewhere, you must provide a relative path from the directory containing rcb.
</usr/rcb/bin>$ rcb -remote xrcb_local |
A command line invocation of the build manager using a buildspec previously created with the GUI would look like this:
</usr/rcb/bin>$ rcb build -buildspec /usr/rcb/records/specs/8s.bsf -remote xrcb_local |
Copyright © Rogue Wave Software, Inc. All Rights Reserved.
The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.