Use this procedure to automatically deploy and activate third-party Python scripts through App Manager, including scheduler status checks and script execution for router automation.
NCS 1001 provides CLI commands to perform configurations and operations on the optical devices. If you want to automate the NCS 1001 node operations, you can run third party scripts through App manager. See Automatically deploy and activate third party script.
Follow these steps to deploy and activate third party script manually.
Procedure
| 1. | Use the show script status command to check the list of the OPS scripts that are in-built in XR. Example:This command lists the status of xr_script_scheduler script. Ready status in the output means that the script checksum is verified and is ready to run.
|
|
| 2. | Use the appmgr to run the XR scheduler script. XR scheduler script contains the necessary Example:
|
|
| 3. | Check for available process scripts in app manager. Example:
|
|
| 4. | Activate the available process script. You can start executing a process script only after it is activated. Example:
(Optional) Verify the status of the process script. This example shows the process script xr_script_scheduler is Activated.
|
|
| 5. | Use the appmgr process-script start command to start the available process script. Example:xr_script_scheduler is the only available process script. This command starts the process script xr_script_scheduler.
(Optional) Verify the status of the process script after activation. This example shows the process script xr_script_scheduler is Activated and Started.
|
|
| 6. | Verify the scheduler script is running. |
|
| 7. | Copy the third party RPM files to the NCS 1001 node. |
|
| 8. | Install the third party RPM files to use the required debug and monitoring python scripts. The third party RPM files have the customized scripts to be executed. The third-party RPM contains two types of files:
Example:This is an example xr_script_scheduler.json file. Customize this file as per your requirements.
Example:
Use the
appmgr package install rpm <full RPM file path> command to install the third-party RPMs.
After the scripts and the run parameters file become ready, build the RPM and configure the RPM to install files at <default exr appmgr rpm install path>/ops-script-repo/exec/<rpm name>/. RPM build tool for TPA is available at RPM Build Tool.
|
|
| 9. | Use the show script status command to verify that the scripts and the run parameter files contained in the RPM are all installed successfully and added to the script management repository. Example:This output shows the status that two scripts (monitor_int_xr_cntr.py and monitor_int_rx_cntr2.py) and a run parameter file (xr_script_scheduler.json) file were installed in the third-party RPM named “nms”.
After the scripts are installed, the scheduler script starts reading the run parameter JSON file and executes the required debug and monitoring scripts. The logs generated by the scripts are available in the directory /harddisk\:/mirror/script-mgmt/logs/. |
|
| 10. | Verify that the debug and monitoring scripts are running. Example:Use the show script execution command to verify that the scripts are running.
(Optional) Use the show script execution[ namescript-namedetail [output][error]] |
|
| 11. | Verify all the active packages are installed. Example:
|
|
| 12. | (Optional) Use the appmgr process-script stop command to stop the process script. Example:
(Optional) Verify the status of the process script after stopping it. This example shows the process script xr_script_scheduler is Activated and Stopped.
|