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.

AI-Scripts Install Package Versioning

The format of AI-Scripts install packages version is:

jais-m.nZx.x--signed.tgz where

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:

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:

  1. Using a Web browser, go to https://www.juniper.net/support/products/serviceautomation/ .
  2. 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 .

  3. Download the AI-Scripts install package.

AI-Scripts Install Locations on Devices

AI-Scripts are installed in the following locations of a device:

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 always points to the correct scripts directory.

Automatically Installing AI-Scripts

Automatically installing AI-Scripts bundles 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.

Manually Configuring and Installing AI-Scripts on Devices

To manually configure and install AI-Scripts on devices, follow these steps:

  1. Download AI-Scripts install packages. See “Downloading AI-Scripts Install Packages” on page 33
  2. To configure the device and activate AI-Scripts, do the following:
    • Enter the device CLI configuration mode. Type the configure command or the edit command in 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 and the group destination name juniper-aim are 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 and the group destination name juniper-aim are 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 always points to the right scripts directory.

  3. Verify that the syntax of a configuration is correct by using the configuration mode commit check command:
    [edit]user@host# commit checkconfiguration check succeeds
  4. 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# commit commitcommit complete
  5. 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;}}}}}}
  6. If you have not moved AI-Scripts to the device, do so now. See “Downloading AI-Scripts Install Packages” on page 33.
  7. Install the AI-Scripts package using the following command (see “AI-Scripts Commands” on page 39):

    user@host# request system scripts add <package name>

  8. 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.

Related Documentation