Welcome, Guest Login

Rundeck Pro Support Center

Install CLI tools from WAR

Last Updated: Jan 07, 2015 05:20PM PST
The RUNDECK CLI tools provide a set of utilities to manage jobs and administrate the instance.
The CLI tools can be extracted from the extracted RUNDECK webapp. 


Environment Information



The following variables are needed during the CLI installation
  • RDECK_BASE: The RDECK_BASE value specifies directory for the Rundeck instance directory.
  • CATALINA_BASE: The CATALINA_BASE value specifies the Tomcat directory where the webapps are deployed. 
  • TOOLSDIR: The TOOLSDIR is the base directory where you would like to install the CLI tools.



On Linux


Create the directory for the CLI tools:

TOOLSDIR=$RDECK_BASE/tools
mkdir -p $TOOLSDIR/{bin,lib}

Locate the rundeck-core.jar from the expanded webapp.

core_jar=($CATALINA_BASE/webapps/rundeckpro/WEB-INF/lib/rundeck-core-2.3.2.jar)

Extract the CLI tools from the rundeck-core.jar and copy to the utilities bin dir.

extract_dir=$(mktemp -d "/tmp/install-cli.templates-XXXX")
unzip -qu $core_jar  -d $extract_dir
cp $extract_dir/com/dtolabs/rundeck/core/cli/templates/{run,rd-setup,rd-queue,rd-project,rd-jobs,dispatch}  $TOOLSDIR/bin
chmod 755 $TOOLSDIR/bin/*

Copy the libraries needed by the CLI tools.

cp $core_jar  $TOOLSDIR/lib
libs=(ant-*.jar log4j-*.jar commons-codec-*.jar commons-beanutils-*.jar commons-collections-*.jar  commons-logging-*.jar commons-lang-*.jar dom4j-*.jar commons-cli-*.jar jsch-*.jar   snakeyaml-*.jar xercesImpl-*.jar jaxen-*.jar commons-httpclient-*.jar jdom-*.jar  icu4j-*.jar xom-*.jar)

cd $CATALINA_BASE/webapps/rundeckpro/WEB-INF/lib
cp ${libs[*]} $TOOLSDIR/lib


On Windows


Create the directory for the CLI tools:

set TOOLSDIR=%RDECK_BASE%\tools
mkdir %TOOLSDIR%\bin
mkdir %TOOLSDIR%\lib


Locate the rundeck-core.jar from the expanded webapp.

%CATALINA_BASE%\webapps\rundeckpro\WEB-INF\lib\rundeck-core-2.3.2.jar

Create a temporary directory for the extraction:

mkdir %Temp%\cli


Use a utility like 7-Zip or the Java jar command to extract the CLI tools from the rundeck-core.jar into the temporary directory.

Copy the utility scripts to the bin directory.

copy %Temp%\cli\com\dtolabs\rundeck\core\cli\templates\*.bat  %TOOLSDIR%\bin

Copy the libraries needed by the CLI tools. Change directory to the lib directory of the webapp

cd %CATALINA_BASE%\webapps\rundeckpro\WEB-INF\lib

copy rundeck-core-2.3.2.jar  %TOOLSDIR%\lib

copy ant-*.jar log4j-*.jar commons-codec-*.jar commons-beanutils-*.jar commons-collections-*.jar  commons-logging-*.jar commons-lang-*.jar dom4j-*.jar commons-cli-*.jar jsch-*.jar   snakeyaml-*.jar xercesImpl-*.jar jaxen-*.jar commons-httpclient-*.jar jdom-*.jar  icu4j-*.jar xom-*.jar %CATALINA_BASE%\WEB-INF\lib

 

CLI Tool Configuration


The CLI tools connect to the rundeck server using configuration data found in  the framework.properties.
  • Linux: $RDECK_BASE/etc/framework.properties
  • Windows: %RDECK_BASE%\etc\framework.properties


 
1fb43f9155a47800b95738aff7e657fc@rundeck.desk-mail.com
http://assets1.desk.com/
false
desk
Loading
seconds ago
a minute ago
minutes ago
an hour ago
hours ago
a day ago
days ago
about
false
Invalid characters found
/customer/en/portal/articles/autocomplete