This documentation supports the 18.05 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

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.

Advantages of using CLI to manage a package 

  • The AR System Administrator can push a patch to all servers using a single command. This reduces the efforts required to manually upgrade all servers to the latest patch.
  • An administrator or a package deployer can trigger patch 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 2019-10-21_03-49-49_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:

CommandDescriptionFormatExample

Help

Provides syntax for the requested command.
help <operation name>
help deploy
ListDisplays 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"
ImportImports 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"
StatusDisplays 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"
DeletePermanently 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"

To use CLI

  1. Open the 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

To apply a patch using CLI

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

  1. Import the patch by using the Import command.
    For example, ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "import" -f "C:\D2P_Packages\ar9104_01.zip"
  2. Deploy the patch by using the Deploy command.
    For example, ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0  -m "deploy" -k "ar9104_01.zip" -v "1"

For more information about applying a patch, see Applying a patch  in BMC Remedy IT Service Management Deployment online documentation.

Note

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


Related topic

Creating and deploying a package using BMC Remedy Deployment Application

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Steve Bechstein

    To use CLI - "Whatch this video to understand...." So where is the Video?

    Oct 03, 2018 08:46
    1. Anagha Deshpande

      Hello Steve,

      The line Watch this video was added by mistake. I have corrected the documentation.

      Apologies for the inconvenience.

      Regards,

      Anagha


      Oct 03, 2018 10:46