Command Line Interface Best Practices

The  CLI lets you perform  operations without invoking the user interface.
ra50
The
Release Automation (Nolio)
 CLI lets you perform
Release Automation (Nolio)
 operations without invoking the user interface.
The nolio.cmd/sh script supports the following operations:
  • Run a process
  • Stop a job run (executing process)
  • Get the status of a job run
  • Create an export file of application data
  • Create a deployment
  • Update a deployment
  • Run a deployment
  • Run a deployment plan
  • Get deployment status
  • Schedule a deployment
  • Run a template category
Install the CLI
To enable the use of commands that perform various tasks without invoking the UI, install the
Release Automation (Nolio)
CLI. The CLI communicates with the Management Server and can exist locally or on a remote system.
To upgrade the CLI, uninstall the current version and follow the installation steps.
Follow these steps:
  1. Find the following files on your
    Release Automation (Nolio)
     installation image, and transfer the appropriate platform-specific executable to the target server.
    nolio_cli_linux_<version>_b<#>.sh nolio_cli_windows_<version>_b<#>.exe
  2. (Linux only) Grant “a+x” permission to the installation file:
    chmod a+x nolio_cli_linux_5_5_2_b<#>.sh
  3. Execute the installation file:
    ./nolio_cli_linux_5_5_2_b<#>.sh ./nolio_cli_windows_5_5_2_b<#>.exe
  4. Follow the instructions on the screen.
    The CLI is installed.
Sample Application for CLI Usage
For demonstration purposes, this section uses a sample application that shows how the CLI is used for the different CLI operations. The sample application contains two flows. One flow checks for the existence of a file and, if the file exists, the other flow executes.
The sample application contains the three User Input parameters defined in different focus areas:
  • Application level -- firstValue
  • Server type level -- secValue
  • Component level -- thirdValue
These values are written into the newly created or existing file. The values demonstrate how to pass parameters, which are the User Input for the various CLI operations. This concept is key to understand how to process input parameters to the
Release Automation (Nolio)
 applications.
The following screen capture shows a sample appication flows in the UI:
BasicFileHandlingApplication.png
To follow along with the sample commands in this section, create a similar application and set up the necessary User Input.
View CLI Execution and System Logs
The following files log CLI activity:
  • Execution-oriented logs: RA_AGENTHOME\logs\nolio_action_exe.log
  • System detail logs: RA_AGENTHOME\logs\nolio_all.log
  • High-level logs: RA_CLIHOME\nolio_app_all.log