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:
- (Windows) ard2putil.bat
- (UNIX) ard2putil.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> | 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:
| ard2putil.bat -x <serverName> | 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:
| ard2putil.bat -x <serverName> | 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:
| ard2putil.bat -x <serverName> | 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:
| ard2putil.bat -x <serverName> | 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> | ard2putil.bat -x "localhost" -u Demo -p "" -portnum 0 -m "status" -k "CustomPackage" -v "1" |
Delete | Permanently deletes a package. | ard2putil.bat -x <serverName> | 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 | ard2putil.bat -x <serverName> | 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:
- Open a command prompt.
- Navigate to the <AR_Install_Dir>/ARSystem/pluginsvr directory.
- Run the following command based on the operating system you are using:
- (Windows) ard2putil.bat
- (UNIX) ard2putil.sh
- Import the package by using the Import command as follows:
For example: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\ITSM1808.zip"
- Deploy the package by using the Deploy command as follows:
For example: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 "ITSM1808.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
Comments
In Version 18.08 the file ard2putil does not exist anymore. Now seqdeploymentcli.sh is present and does not work with self created binary payload packages
Hi Uwe,
Both utilities are different.
The ard2putil located in \ARSystem\pluginsvr folder deploys any deployment package on any server. The functionality is the same for version 18.08.
This utility works for all types of packages including a binary payload.
The seqdeploymentcli located in the \ARSystem\artools folder deploys a deployment package on the basis of package version and package name in sequence on any server.
This utility works for self-created binary payloads when you specify any sequence for more than one packages.
Regards,
Nitesh
Can please give an example of the config-file required to start the seqdeploymentcli tool?
Hello Uwe,
We are working on your query. We will respond soon.
Regards,
Anagha
Hello Uwe,
There is no such configuration file to start the sequential utility. Could you please elaborate on the issue you are facing?
Regards,
Anagha
Hi Anagha, I would just like to know how to use the tool: I get this when i start the tool: Usage: d2ppayloadstatus [-u user] [-p password] [-a authString] [-x server] [-t tcpPort] [-f filename file containing deployment/rollback package name and package version] [-w wait time in minutes for payload or deploy status check, default value is 30 minutes , int value e.g -w 20] [-o rollback , pass this paramter to rollback packages]
Hello Uwe,
The ard2putil and seqdeploymentcli utility are different. This topic describes the ard2putil utility.
Hope this helps.
Regards,
Anagha