Release Operations Center CLI Commands

This section defines Release Operations Center (ROC) CLI operations, lists the options for each operation, and provides best practices and examples.
ra50
This section defines Release Operations Center (ROC) CLI operations, lists the options for each operation, and provides best practices and examples.
Use the -h, --help option with any operation to view a list of all available options for the operation. All examples in this section use the sample application presented in CLI Best Practices.
The following Release Operations Center CLI operations can be executed against deployments:
  • run-deployment-plan
  • create-deployment
  • run-template-category
  • get-deployment-status
  • run-deployment
  • schedule-deployment
  • update-deployment
Ensure the following actions are completed before running the CLI operations against deployments.
  • Create a template category, such as ParamsTemplate
  • Create a deployment template, such as paramsTemp
  • Create a project, such as paramsProj
  • Create a deployment plan, if one has not yet been created, such as paramsDeployPlan
  • Create the necessary deployment
  • Make sure the user that you use to log in to the CLI has the appropriate permissions with the applications you are deploying.
The following screen capture shows a
Deployment Plan
s screen:
This screen capture illustrates a created deployment plan.
The following screen shows the location of listed parameters in the deployment plan as part of the concept of passing application-defined User Input parameters
The screen capture illustrates the User Input Parameters location in the Deployment Plan.
 
To enhance security, we recommend that you use the RA_HOME\scripts\encrypt_password utility to encrypt any passwords that you enter in CLI commands.
run-deployment-plan
This operation lets you run a deployment plan. Use this operation for all applications created in 
Release Automation (Nolio)
 5.x.
Options for the run-deployment-plan operation:
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -aid,--application-id <arg>
    Specifies the application id on which the operation occurs.
  • -ap,--artifact-package <arg>
    (Optional) Specifies the artifact package name. If you enter a value for this option, the package is assigned to the deployment plan.
  • -apf,--artifact-package-file-path <arg>
    (Optional) Specifies the path to the file that contains the XML of the artifact package.
  • -bd,--build <arg>
    Specifies the build name.
  • -dd,--deployment-description
    Specifies a description of the deployment.
  • -dp,--deployment-plan <arg>
    Specifies the name of the deployment plan to be created.
  • -dpd,--deployment-plan-description <arg>
    Specifies a description of the deployment plan.
  • -ds,--deployment-stage-to-perform <arg>
    (Optional) Executes the specified stage and all prior stages after the deployment has been created. Valid values are None, Initialization, Validation, Approval-Gate, Distribute-Execution-Server, Distribute-Agent, Deployment, and Post-Deployment. If you select None, the deployment is created by not run. The default is to run all deployment stages.
  • -dt,--deployment-template <arg>
    Specifies the deployment template name.
  • -eids,--environment-ids <arg>
    (Optional) Specifies a list of environment ids on which to run the deployment. Format as {12, 14, 9, ..}.
  • -es,–environments <arg>
    Specifies a list of the environments on which to perform the deployment. Format as {env1, env2..}. This will be sent if both environments and environment ids are entered.
  • -m,--template-category <arg>
    Specifies the template category name.
  • -mf,--manifest-file-path <arg>
    (Optional) Specifies the file path to the manifest XML file. If you enter a value for this option, the parameters' values in the release scope are loaded to the deployment plan.
  • -p,–password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -pj,–project <arg>
    Specifies the project name.
  • -r,–deployment <arg>
    Specifies the name of the deployment to be created.
  • -t,--timeout <arg>
    (Optional) Specifies the time-out for the execution in seconds.
  • -tcid,--template-category-id <arg>
    Specifies the template category name from which the deployment is created.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -y,--deployment-type <arg>
    Specifies the deployment type (Minor/Major/Emergency).
 C:\CA\RelAutoCLI>nolio.cmd run-deployment-plan --app ParamsTest --application-id 42432 --build 3 --deployment-description newdeployment --deployment-plan build3 --deployment-plan-description build3deploy --deployment-template paramsTemplate --environments {TestEnv} --template-category paramsTemplate --deployment paramsDeploy --project params --template-category-id 54 --deployment-type Major --user superuser -password <password>
create-deployment
The execution of this operation is limited to those projects imported or updated from
Release Automation (Nolio)
 4.7.x/4.5.x.
If attempting to run this operation for 5.x templates, then the following error occurs:
deployment status: /create-release cannot be created and run from templates that were created in (v5.0+) as an input. To create deployments out of new templates (v5.0+) please use /run-deployment-plan
Options for the create-deployment operation:
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -l,--skip-validation
    (Optional) Skips the validation of the release if all of its steps are assigned to the requested environment.
  • -m,--template <arg>
    Specifies the template category name from which the release is created.
  • -n,–async
    (Optional) Runs the deployment asynchronously. Do not wait until execution terminates.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -t,--timeout <arg>
    (Optional) Specifies the time-out for the execution in seconds.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
  • -y,--deployment-type <arg>
    Specifies the deployment type (Minor/Major/Emergency).
C:\CA\RelAutoCLI>nolio.cmd create-deployment --app ParamsTest --env TestEnv --template paramsTemplate --deployment paramsDeploy --version 1.0 --deployment-type Major --user superuser -password <password> executing create-deployment
run-template-category
The execution of this operation is limited to those projects imported or updated from
Release Automation (Nolio)
 4.7.x/4.5.x.
If attempting to run this operation for 5.x templates, then the following error occurs:
deployment status: Failure in stage create release. Reason is /create-release cannot be created and run from templates that were created in (v5.0+) as an input. To create deployments out of new templates (v5.0+) please use /run-deployment-plan
Options for the run-template-category operation:
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -l,--skip-validation
    (Optional) Skips the validation of the release if all of its steps are assigned to the requested environment.
  • -m,--template <arg>
    Specifies the template category name from which the release is created.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -rp,--deployment-properties <arg>
    (Optional) Specifies a list of properties to set. Format as {property1, val1, property2, val2…}.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
  • -y,--deployment-type <arg>
    Specifies the deployment type (Minor/Major/Emergency).
C:\CA\RelAutoCLI>nolio.cmd run-template-category --app ParamsTest --env TestEnv --template ParamsTemplate --deployment paramsTemp --user superuser --password <password> --version 1 --deployment-type Major executing run-template-category
get-deployment-status
This operation returns the status of a deployment:
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -i,--deployment-id <arg>
    Specifies the unique deployment ID.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
C:\CA\RelAutoCLI>nolio.cmd get-deployment-status --app ParamsTest --env TestEnv --deployment-id 6 --deployment Parmas-Deploy-Run-ROC --user superuser --password <password> --version 0.1 executing get-deployment-status deployment id: 6 deployment status: 100% Succeeded
run-deployment
When you use the run-deployment operation, the parameters are not passed directly by this operation; rather, the parameters are passed by the update-deployment operation.
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -i,--deployment-id <arg>
    Specifies the unique deployment ID.
  • -n,–async
    (Optional) Runs the deployment asynchronously. Do not wait until execution terminates.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -t,--timeout <arg>
    (Optional) Specifies the time-out for the execution in seconds.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
C:\CA\RelAutoCLI>nolio.cmd run-deployment --app ParamsTest --env TestEnv --deployment-id 7 --deployment Parmas-Deploy-Run-ROC2 --version 0.1 --user superuser --password <password> executing run-deployment deployment id: 7 deployment status: Release finished with status Finished
schedule-deployment
This option lets you schedule a deployment for a later date:
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -d,--scheduled-date <arg>
    Specifies the scheduled date formatted as dd/mm/yy. The date is calculated from the time zone of the Management Server.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -ed,--estimated-duration <arg>
    (Optional) Specifies the estimated duration for the release in minutes. Default is 120 minutes.
  • -i,--deployment-id <arg>
    Specifies the unique deployment ID.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -ti,--scheduled-time <arg>
    Specifies the scheduled time formatted as HH:mm. The time is calculated from the time zone of the Management Server.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
C:\CA\RelAutoCLI>nolio.cmd schedule-deployment --app ParamsTest --env TestEnv --deployment-id 8 --deployment Parmas-Deploy-Run-ROC3 --scheduled-date 27/08/2014 --scheduled-time 19:20 --user superuser --password <password> executing schedule-deployment deployment id: 8 deployment status: Release [8] scheduled for [1409181600000]. Estimated duration is [7200000].
update-deployment
The update-deployment operation necessitates the creation of an update release XML-based file. This file lets you update the User Input parameters defined for the release in question. See update-release-template for a more detailed description of the shipped template.
  • -a,--app <arg>
    Specifies the application name on which the operation occurs.
  • -c,--conf-file <arg>
    Specifies the path to the configuration file that contains the update information.
  • -e,--env <arg>
    Specifies the environment name on which the operation occurs.
  • -i,--deployment-id <arg>
    Specifies the unique deployment ID.
  • -p,--password <arg>
    Specifies the password for the user name you enter in the -u option.
  • -r,--deployment <arg>
    Specifies the name of the deployment to be created.
  • -u,--user <arg>
    Specifies a 
    Release Automation (Nolio)
     user name that lets you connect to the application.
  • -v,--version <arg>
    Specifies the release version.
C:\CA\RelAutoCLI>nolio.cmd update-deployment --app ParamsTest --env TestEnv --deployment-id 8 --deployment Parmas-Deploy-Run-ROC3 --user superuser -password <password> --version 0.1 --conf-file .\Params-Test-Deploy-Update.xml executing update-deployment deployment id: 8 deployment status: Release updated successfully
Use a Configuration File with Release Operations Center
Using a configuration file lets you update deployments through the CLI as follows:
  • Step name
  • Step description
  • Step dependencies
  • Server dependencies in a specific step
  • Release property
  • Assigning a release property to a parameter used in the step
  • Link a file parameter to an artifact
The CLI installation package installs a template file named 
update-release-template.xml.
 This file contains the valid XML tags that are used to update a given release.
The CLI syntax for Release Operations Center is:
nolio.cmd update-deployment -c cli-file-path –r releaseName –v releaseVersion –a applicationName –e environmentName -u superuser -p suser
Configuration File Guidelines
The following rules apply to using an XML configuration file in the CLI:
  • If you use a configuration file, you cannot use the parameter (-r) and server (-s) switches in the CLI.
  • A command that is entered in the CLI overrides the same command that is entered in the configuration file.
    For example, you enter '-a' in the CLI and have a tag for 'application' in the configuration file, the CLI '-a' command overrides the parameter data that is contained in the configuration file tag.
  • The specified configuration file must reside on the computer where the CLI is executed and not on a Management Server.
  • Server Type names must be unique per application.
  • Server name can be either an IP address or its Node ID.
  • For each server, you can optionally define dependencies in the configuration file. You cannot define dependencies in the CLI.
  • Server dependencies are added or changed but not deleted from the environment using the configuration file.
  • Commas can be included in the parameter value without the backslash as is required for the CLI.
Configuration File Examples:
The following screen capture shows examples of configuration files:
This screen capture illustrates the Update-Release-Template.xml contents file.
In the example, an update file is created with the following XML tags filled:
  • Name
  • Description
  • Type
  • Version
  • Properties
  • Steps
  • Server-type
  • Servers
  • Parameters
Take close note of the 
parameters
 tag, since these XML tags correlate to the User Input parameters defined in the application. The first and second values process at the application level. Include only the component level parameter in the component folder.
The following screen capture shows configuration files and application parameter XML tags:
This screen capture illustrates a sample Update File.