Staging Script Bundles on Devices
Junos Space Network Management Platform allows you to stage
script bundles on devices. During script bundle staging, op scripts
and commit scripts in the script bundle are copied to the
/var/db/scripts/op directory on the device. When
you stage script bundles on dual Routing Engines, the script bundles
are copied to both Routing Engines, and in case of Virtual Chassis,
the script bundles are copied to all the FPCs.
To stage script bundles on devices:
- On the Junos Space Platform UI, select Images and
Scripts > Script Bundles.
The Script Bundles page appears, displaying all Junos Space Platform script bundles.
- Select the script bundles that you want to stage on devices.
- Select Stage Script Bundle on Devices from
the Actions menu.
The Stage Script Bundle On Device(s) dialog box appears.
- Keep the Enable Scripts on Devices check box
selected if you want the scripts to be enabled and ready to be executed
when you stage them from Junos Space Platform.
If you want the scripts to be disabled while staging them on the devices, clear this check box. However, before you run the script bundle make sure that the scripts are enabled.
- Select the Show existing Staged Devices check box to display the devices on which the scripts are staged. When this check box is selected, the Select Devices section displays the devices on which the scripts are staged along with the devices on which the scripts are not staged.
- Select the devices on which you want to stage the script
You can select devices by using one of the following selection modes—manually, on the basis of tags, or by using the comma-separated values (CSV) file. These options are mutually exclusive. If you select one, the others are disabled.
By default, the Select Device Manually option is selected and the list of devices on which the script bundle is not staged is displayed.
To select devices manually:
Click the Select Device Manually option and select the devices on which you want to stage the script bundle. The Select Devices status bar shows the total number of devices that you have selected; the status bar is dynamically updated as you select the devices.
To select all the devices, select the check box in the column header next to Host Name.
To select devices on the basis of tags:
- Click the Select by Tags option.
The Select by tags list is activated.
- Click the arrow on the Select by Tags list.
A list of tags defined on devices in Junos Space Platform appears, displaying two categories of tags—Public and Private.
If no tags are displayed, then it means that none of the devices is associated with any tag. You need to tag the devices on the Device Management page before you can use the Select by Tags option.
- To select tags, perform one of the following actions :
Select the check boxes next to the tag names to select the desired tags and click OK.
To search for a specific tag, enter the first few letters of the tag name in the Select by Tags field to the left of the OK button. If a match is found, a suggestion is made. Select the suggested match and click OK.
As you select the tags, the total number of devices associated with the selected tags appears just above the device display table. For example, if there are six devices associated with the selected tags, then 6 items selected is displayed.
The selected tags appear next to the Tags Selected label. An [X] icon appears after each tag name. You can click the [X] icon to clear any tag from the list. The device count decrements accordingly.
The device display table displays the devices associated with the selected tags.
- Click the Select by Tags option.
To select devices by using a CSV file:
- Select the Select by CSV option.
- Click Browse to navigate to the file location
on your computer and select the CSV file containing the list of devices
on which you want to stage the script bundle.
For a sample CSV file, click the Sample CSV link. You are prompted to save the file. Save the file to your computer and open it by using an application such as Microsoft Excel.
- Click Upload to upload the CSV file.
From Release 17.1R1 onward, when you upload a CSV file to select devices from, Junos Space Platform verifies the devices in the CSV file. If the CSV file contains devices to which the changes do not apply, a warning message appears which says "Few devices are not selected due to precondition failure. Please click "View inapplicable devices" for more details.” You can click the View inapplicable devices link to review the list of devices that are excluded from the update.
- (Optional) To schedule a time for staging the script bundles, select the Schedule a later time check box and use the calendar icon and drop-down list respectively to specify the date and time when you want the script bundles to be staged.
- Click Stage.
The selected script bundles are staged and a Jobs dialog box appears displaying a job ID link. Perform one of the following actions in the Jobs dialog box:
Click the job ID link to view the status of the staging operation on the Job Management page. If the staging of the script bundles fails, you can identify the reason for failure by double-clicking the job on the Job Management page. The Job Details page appears and displays the reason for failure in the Description column. The Job Details page supports sorting of data in all columns in ascending or descending order.
Click OK to return to the Script Bundles page.
To return to the Script Bundles page from anywhere on the Junos Space Platform UI, select Images and Scripts > Script Bundles on the left pane of the UI.