Default language.

Using a command-line interface to manage a package


In addition to using BMC Remedy Deployment Management console, you can use a command-line interface (CLI) to promote data and definitions across development, QA, and production environments. 

You can perform multiple command-line operations such as Build, Import, Export, Deploy, and Rollback. If you have package-level or content-level precheck qualification defined, these prechecks also work from the CLI.

Advantages of using CLI to manage a package

  • The AR System Administrator can push a package to all servers using a single command. This reduces the efforts required to manually upgrade all servers to the latest package.
  • An administrator or a package deployer can trigger package deployment across environments. This saves time for manual deployment and increases the frequency of deployments.
  • A Package Creator and an administrator can automatically build an application package. This saves time and automates the build to test the toolchain.

Using CLI

When you use a CLI to manage a package, BMC Remedy Deployment Application permission model is applicable. For information about roles and permissions, see BMC-Remedy-Deployment-Application-roles-and-permissions.

Use the following files to run the commands to deploy, import, export, or rollback a package:

  • (Windowsard2putil.bat
  • (UNIXard2putil.sh

These files are located in the <AR_Install_Dir>/ARSystem/pluginsvr directory.

The command syntax is as follows:

ard2putil.bat -x <serverName> -u <userName>  -p <password> [-a authString] [-portnum <TCPPort>]  [-k packageName]  [-v packageVersion] [-m packageOperations] [-f filename ]

The following table describes the details about the commands:

Command

Description

Format

Example

Help

Provides syntax for the requested command.

help <operation name>

help deploy

List

Displays the available packages on the server. It also displays the Version and State information about the package. 

ard2putil.bat -x <serverName>
-u <userName>
-p <password>
[-portnum 0] -m "list"

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "list"

Import

Imports a package from the file location on the server that you have specified in the command.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "import"
-f <packageLocation>

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "import" -f "C:\D2P_Packages\CustomPackage_1.zip"

Build

Builds an existing package. The package must be in the Draft state.

If the package is not in the Draft state, the operation aborts with the following message:

Package which are in draft state can be built only. The package <packageName> with version <packageVersion> is not in draft state.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "build"
-k <packageName>
-v <packageVersion> 

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "build" -k "PackageToBuild" - v "1"

Deploy

Deploys a package with a version specified. The package is deployed on the server that you have specified in the command.

The package must be in the Ready To Deploy state. The following error message is displayed if the package is not in the Ready To Deploy state:

Package which are in Deployable state can be exported only. The packge <PackageName> with version <version> is not in Deployable state.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "deploy"
-k <packageName> -v <packageVersion> 

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "deploy" -k "PackageToDeploy" - v "1"

Export

Exports a package that is in the Ready To Deploy or Deployed state.

The following error message is displayed if the package is not in the Ready To Deploy or Deployed state:

Package which are in Deployable state can be exported only. The packge <PackageName> with version <version> is not in Deployable state.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "export"
-k <packageName>
-v <packageVersion>

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "export" -k "PackageToDeploy" - v "1"

Rollback

Triggers rollback for the package that you specify in the command.

You can trigger rollback only for the packages that are in the Deployed or Deployed with Errors state. The following error message is displayed if the package is not in the Deployed or Deployed with Errors state:

Package which are in 'Deployed/Deployed With Errors' can be rollback only. The package <packageName> with version <packageVersion> is in <currentState>

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "rollback"
-k <packageName>
-v <packageVersion>

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "rollback" -k "PackageToRollback" - v "1"

Status

Displays the status of the package. It also displays the details of Status and Status Reason fields on the RDA:DeploymentPackageDetails form. 

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "status"
-k <packageName>
-v <packageVersion> 

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "status" -k "CustomPackage" -v "1"

Delete

Permanently deletes a package.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "delete"
-k <packageName>
-v <packageVersion>

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "delete" -k "CustomPackage" -v "1"

Copy

Creates a copy of the specified package. 

Important:

The Copy command does not support versions earlier than AR System server 9.1.04.001.

ard2putil.bat -x <serverName>
-u <userName> -p <password>
[-portnum 0]  -m "copy"
-k <packageName>
-v <packageVersion>

ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "copy" -k "CustomPackage" -v "1"

Before you begin

Ensure that in the deployConfig.properties file, the value of the filedeployer.localDeploymentRequired parameter is set to false.
The deployConfig.properties file is located in the following folder:

  • (Windows/AR_Install_Dir
  • (UNIX/ARSystem/bin

To apply a package using CLI

The AR System Administrator or a Package Deployer can use CLI to apply a package provided by BMC. Perform the following steps to apply a package:

  1. Open a command prompt.
  2. Navigate to the <AR_Install_Dir>/ARSystem/pluginsvr directory.
  3. Run the following command based on the operating system you are using:
    • (Windowsard2putil.bat
    • (UNIXard2putil.sh
  4. Import the package by using the Import command as follows: {{code language="none"}}


    {{/code}}
    ard2putil.bat -x <serverName> -u <userName> -p <password> [-portnum 0] -m "import" -f <packageLocation>

    For example:
    ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "import" -f "C:\D2P_Packages\ITSM1808_01.zip"

  5. Deploy the package by using the Deploy command as follows:{{code language="none"}}


    {{/code}}
    ard2putil.bat -x <serverName> -u <userName> -p <password> [-portnum 0] -m "deploy" -k <packageName> -v <packageVersion>

    For example:
    ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "deploy" -k "ITSM1808_01.zip" -v "1"

For information about applying a package using Remedy Deployment Management Console, see Applying a deployment package in BMC Remedy IT Service Management Deployment online documentation.

Note

The ard2pplugin.log file is created in the <AR_Install_Dir>/Arserver/Db directory. You can use this log file for troubleshooting.


Related topic

Creating-and-deploying-a-package-using-BMC-Remedy-Deployment-Application

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*