PDA

View Full Version : rmacros.sh with cygwin on Windows?


kapow
01-04-2008, 04:04 PM
Will rmacros.sh work with cygwin? I've installed it, but when I enter the controller command, it just hangs.

I'm attempting to use rmacros to enable me to scp directly to an appliance. If there is a better method for direct applicance scp, please let me know. I attempted to modify the standard LAMP template to add an ssh in port on the branched web appliance and hooked to the aux output on the inssl appliance, but no joy.

LeoKalev
01-04-2008, 08:28 PM
The 'controller' command attempts to 'ping' the given host, it shouldn't hang on anything. However, it is possible that the 'ping' command in Windows has different command-line parameters and the way it is being invoked causes it to run in an infinite loop (this is the default, I think). You should check what's the right syntax for your particular 'ping' and fix the script as needed.

Also, you can 'scp' directly into an appliance, even without using the 'rmacros'. For some reason, I wasn't able to find the documentation page that describes this on 'doc.3tera.net'. I know the page exists and I will check to see why it is missing. In the meantime, here is an excerpt from that page, with the command formats for accessing volumes on the grid, as well as 'scp' to a live appliance (note that 'sftp' doesn't work to live appliances, only scp):

scp localfile controllerhost:/vol/appname/volname/filepath
copy localfile to an application volume. Same with swapped 1st and 2nd args to copy from an application volume to a local file or directory. No additional command is needed to make the specified volume accessible.

scp localfile controllerhost:/app/appname/compname/filepath
copy localfile to the filespace of a running appliance. Same with swapped 1st and 2nd args to copy from an appliance to a local file or directory.

sftp [options] controllerhost
open an interactive or batch sftp session. The session has access to all volumes to which access is requested beforehand, via the 'vol mount' command sent to the 3t shell. The client sees a filesystem that contains only the 'mounted' volumes as '/appname/volname/ - the same as for the 'scp' command (except no vol root). All SFTP commands are allowed, including chown, chmod, etc., for manipulating file permissions and ownership on the volumes.

nautilus sftp://controllerhost/
This or any similar GUI-based SFTP client can be used to access volumes (pre-mounted with a shell command or via the Web GUI). The semantics and the level of access are exactly the same as for the command-line SFTP (barring any functionality restrictions imposed by the GUI app).

PeterNic
03-03-2008, 04:08 AM
The help page on the various ways to access the grid is at http://doc.3tera.net/AppLogic2/GridAccess.html. It is the very first topic in the first manual.

Also, I can confirm that cygwin (http://www.cygwin.org)'s scp can copy in and out of live appliances successfully (without the macros). A sample command:

$ scp -i mykey.pvt index.html root@mygrid.3tera.net:/app/myapp/main.mywebsrv/var/www/html

Note that the private key must be in the openssh format. If you generate your key with putty (which is still a nice terminal for Windows), you can export the putty private key in openssh format.


Regards,
-- Peter

PeterNic
03-03-2008, 04:18 AM
One caveat: if you are a grid maintainer and (incorrectly) use your maintainer's keys to do regular user's jobs on the grid, the scp to and from live appliance will not work for you. You need to use a regular user ssh key -- the one you set using 'user set user@domain sshkey="..."' command.