Installing AI-Scripts
![]() | Warning: We recommend that you install AI-Scripts during planned or scheduled maintenance time frames. Some devices may experience high CPU utilization during the installation process that can take several minutes. |
![]() | Note: Refer to the AIS Quick Setup Checklist in the AIS User Guide for the sequential installation of all AIS components. |
- AI-Scripts Install Package Versioning
- AI-Scripts Installation Methods
- Downloading AI-Scripts Install Packages
- AI-Scripts Install Locations on Devices
- Automatically Installing AI-Scripts
- Manually Configuring and Installing AI-Scripts on Devices
AI-Scripts Install Package Versioning
The format of AI-Scripts install packages version is:
jais-m.nZx.x--signed.tgz wherè
- m and n are two integers that represent the software release number; m denotes the major release number; n denotes the minor release number.
- Z in upper case indicates the type of software release. In most of the cases, it is specified asR to indicate that it is a released software. If you are involved in testing a pre-released software, this letter will be specified as B (for beta-level software).
- x.x is the software build number and spin number.
An example of AI-Scripts install packages version: jais-2.4R1.5-signed.tgz.
The AI-Scripts files in the install package are compressed into a tgz tarball file. Each AI-Scripts install package supports the Junos OS releases of the previous three years.
The show version CLI operational command displays the version of the AI-Scripts install package that is installed on a device.
The JMB contains the output of the show version CLI command to indicate the version of the AI-Scripts install package installed on a device.
AI-Scripts Installation Methods
There are two ways to install AI-Scripts:
- Automatic installation- The Junos Space Service Now allows to automatically install AI-Scripts in multiple devices simultaneously. For more information about automatically installing AI-Scripts, see section Automatically Installing AI-Scripts.
- Manual installation- Manually install AI-Scripts on one device at a time. For more information about manually installing AI-Scripts on devices, see section Manually Configuring and Installing AI-Scripts on Devices.
Downloading AI-Scripts Install Packages
AI-Scripts are released in AI-Scripts install packages. AI-Scripts install packages are available for download in the AIS download site. Also, download the AI-Scripts Release Notes.
The procedure for downloading the AI-Scripts install package is as follows:
- Using a Web browser, go to https://www.juniper.net/support/products/serviceautomation/.
- Log in to the Juniper Networks authentication system with
the username and password provided by Juniper Networks.
To download the software, you need a service contract and an access account. If you do not have an access account, fill up the registration form at https://www.juniper.net/registration/Register.jsp.
- Download the AI-Scripts install package.
AI-Scripts Install Locations on Devices
AI-Scripts are installed in the following locations of a device:
- Hard disk location - /var/db/scripts/
- Flash drive location - /config/scripts
![]() | Note: If you configure the load-scripts-from-flash option, the system reads AI-Scripts from the /config/scripts/ directory; otherwise, the system reads AI-Scripts from the /var/db/scripts/ directory. The /var/run/scripts directory will always point to the correct scripts directory. |
Automatically Installing AI-Scripts
Automatically installing AI-Scripts install packages in one or more devices involve Junos Space - Service Now. For information on using Junos Space - Service Now to automatically install AI-Scripts on a Junos device, refer to the corresponding release document of Junos Space Service Now at Service Automation Index Page.
In the Junos Space Service Now document, navigate to Managing Devices > Organizations, and AI-Scripts > Configuration (tab) > Devices > Installing an Event Profile on Devices Using Service Now.
Manually Configuring and Installing AI-Scripts on Devices
To manually configure and install AI-Scripts on devices, follow these steps:
- Download AI-Scripts install packages. See “Downloading AI-Scripts Install Packages” on page 33
- Configure the device configuration as follows to activate
AI-Scripts:
- Enter the device CLI configuration mode. Type the configure command or the edit command from the CLI operation mode. The CLI prompt changes from user@host> to user@host# and a banner appears to indicate the hierarchy level.
- For non–Junos Space devices only: Configure an AIS
destination under group juniper-ais:
user@host# set groups juniper-ais event-options destination juniper-aim {…}
This sets the AIS archive location where JMBs are deposited for a device. The group name juniper-ais is mandatory. The group destination name juniper-aim is mandatory.
- For Junos Space devices only: Set the local host address
and configure an AIS destination under group juniper-ais:
user@host# set groups juniper-ais interfaces lo0 unit 0 family inet address 127.0.0.1/32
This sets the local host address 127.0.0.1 to the device loopback address. It is used with the next command to ensure that JMBs can be sent to and retrieved from the local device.
user@host# set groups juniper-ais event-options destination juniper-aim archive-sites "scp://<user>@127.0.0.1://var/tmp" password<password for user>
Configure this line exactly as shown, substituting <user> and <password for user> with the Service Now user name and password required for accessing the device. This configuration ensures the JMBs generated by AI-Scripts are sent to and from the /var/tmp directory of the device, using the correct permissions for the device. The group name juniper-ais is mandatory. The group destination name juniper-aim is mandatory.
- Configure the commit script:
user@host# set groups juniper-ais system scripts commit file jais-activate-scripts.slax optional
The AI-Scripts installer creates this script to activate AI-Scripts on the device. The optional setting is required to prevent the configuration from committing if the jais-activate-scripts.slax file is not present. That file is not present until the scripts bundle is installed.
- Configure the allow-transients option to allow transient
changes:
user@host#set groups juniper-ais system scripts commit allow-transients
Transient changes are configuration changes made by commit scripts that do not appear in the configuration (except with a special command).
- Apply the juniper-ais group:
user@host#set apply-groups juniper-ais
- (Optional) Configure the load-scripts-from-flash option:
user@host#set groups juniper-ais system scripts load-scripts-from-flash
Note: If you configure the load-scripts-from-flash option, the system reads AI-Scripts from the /config/scripts/ directory; otherwise, the system reads AI-Scripts from the /var/db/scripts/ directory. The /var/run/scripts directory will always point to the right scripts directory.
- Verify that the syntax of a configuration is correct by
using the configuration mode commit check command:[edit]user@host# commit checkconfiguration check succeeds
- Commit the configuration. To save software configuration
changes to the configuration database and activate the configuration
on the router, use the commit configuration mode command. You can
issue the commit command from any hierarchy level.[edit]user@host# commitcommit complete
- View the configuration:
Example Configuration for Junos Space/Service Now 2.0 and later:
groups {juniper-ais {system {scripts {commit {allow-transients;file jais-activate-scripts.slax {optional;}}}}event-options {destinations {juniper-aim {archive-sites {/var/tmp;}}}}}} - If you have not moved AI-Scripts to the device, do so now. See “Downloading AI-Scripts Install Packages” on page 33.
- Install the AI-Scripts package using the following command
(see “AI-Scripts Commands” on page 39):
user@host# request system scripts add <package name>
- Verify that AI-Scripts are activated:
user@host# show groups juniper-ais | display commit-scripts
system {scripts {commit {allow-transients;file jais-activate-scripts.slax {optional;}}}}event-options {event script {file problem-event-pfecrash.slax;file problem-event-dcrash.slax;file intelligence-event-main.slax;file SPD_EVLIB_CREATE_FAILURE.slax;file SPD_DAEMONIZE_FAILED.slax;file RPD_TASK_FORK.slax;...}destinations {juniper-aim {archive-sites {"ftp://anonymous@10.7.0.124/aidemo";}}}}Note: If you are manually installing to a device that communicates with Junos Space or Service Now, your login credentials must allow discovery of devices in Junos Space. This procedure includes the configuration differences required for configuring the location for JMBs on a Junos Space device.