Java Ssh plugin
This transport plugin allows the framework server to connect to remote targets via Ssh.
This transport plugin enables connectivity to a target using the ever popular SSH protocol. This plugin equips the framework server with a fully integrated, java based, ssh client. You can configure connectivity to target hosts via Ssh using username/password authentication or public/private key authentication with or without passphrase secured keys.
Each target host can be configured to support multiple different authenticated users.
The Ssh plugin can be used to deploy java and the required orchestration jar files to the target as a precursor to managing the target with the remote agent plugin, or you can just use Ssh to run all of your jobs on the specified target.
Prerequisites
You will need access to an Ssh user on the remote target and should obtain the necessary credentials and host/port for this.
Credentials
The Ssh plugin supports a number of mechanisms to communicate with the remote target.
- Username and password - Provide a valid username and password to connect to the target server
- Username and key file - Provide a username and the path to a local public key which is not passphrase protected
- Username, key file and passphrase - Provide a username, passphrase and the path to a local public key which is passphrase protected
Alternative execution mode
There are a number of alternative execution modes, which can be set for the plugin to run the tasks with an alternative execution mode.
Set the type and parameters for the execution. The execution type will suffixed with the parameters, which together prefixed to the java command.
Attributes and parameters
List and description of all user interface plugin parameters.
List and description of all tasks and parameters.
Deploy Java and Remote Agent via SSH
It is possible to deploy Java and RapidDeploy Remote Agent to the target server via SSH. A buttons will appear for these operations, when the Java settings are completed on the SSH tab. In order to be able to start the agent as well, you need to place the agent configuration xml file with 'midvision-remoting-server.xml' name, under the MV_HOME/remoting directory on the server.
Ssh Configuration
UNIX SSH Configuration Requirements for the RapidDeploy Application Release Automation Tool
If you want to set environment variables for an SSH invoked shell then the following guidelines may be helpful. Please note that this is not necessary for RapidDeploy if you set the environment variables through the RapidDeploy GUI on the server panel.
SSH Daemon
Make the following setting in:
/etc/ssh/sshd_config
PermitUserEnvironment yes
Restart sshd daemon:
/lib/svc/method/sshd restart
sles:
/etc/rc.d/sshd restart
The $USER_HOME/.ssh/environment file
Create an environment file in the SSH directory of the SSH user:
touch ~/.ssh/environment
This file looks like this:
PATH=.:/was/websphere7/ndb70_dev01/java/bin:/usr/bin:/usr/sbin:/sbin:/bin
or this:
PATH=.:/bin/sh:/usr/websphere7/ndbase70_01/java/bin:/usr/local/bin:/bin:/usr/bin: JAVA_HOME=/usr/websphere7/ndbase70_01/java
USER_HOME/.bashrc file
You may also need to create/edit the .bashrc file and add exports for the PATH and JAVA_HOME variables.
for example:
# User specific aliases and functions alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' export PATH=.:/opt/RAFW/java/linux/X32/bin:/usr/bin:/bin:/usr/local/bin:/usr/sbin:/bin/sh export JAVA_HOME=/opt/RAFW/java/linux/X32 # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi
Setting environment variables through the RapidDeploy framework server
- Go to Infrastructure.
- Select the desired server.
- Go to the treansport tab.
- Under "Server Environment Variables", add a new environment variable with the "Add Environment Variable" button.
JAVA_OPTS
In this section, you can also set the JAVA_OPTS environment variable, which will pass java options when invoking the java runtime. For example, setting:
JAVA_OPTS=-Xms1024m -Xmx2048m
will set the maximum heap of the java process running the deployment to 2048Mb.