Tutorial: Automated approach to upload OS images
Automated approach to upload OS images
Uploading of OS images/firmware is one of the commonest operations performed by the administrators. DeviceExpert provides a simple, automated approach to do this. The 'Advanced Script Execution' feature, which helps in executing a series of inter-connected commands on a device in command line, can be used to automate the uploading of OS images. The image files can be transferred via TFTP.
Following are the steps involved in automating the OS images upload:
Step 1: Create the template
1. Go to "Admin" >> "Device Management" >> "Custom Templates" and click "New Template"
2. In the UI that opens, provide a name for the template in the text field for 'Name'. In the text field for 'Description', provide details about the new template (for easy reference in future). Select the mode in which you wish to upload the configuration to the device. To upload OS images, you need to select the 'Advanced Script Execution Mode'.
3. In the text field 'Template Content', enter the configuration commands that are required to achieve the OS image upload task. It involves the following tasks:
* Copy the IOS image to TFTP server
* Provide the command for copying the image
* Provide TFTP server IP
* Provide the source filename to copy the file to flash
* Provide the destination filename where it has to be copied
The above sequence of command execution could be transformed into an advanced script as below:
<command prompt=']?'>copy tftp: flash:</command>
<command prompt=']?'>%TFTP_SERVER_IP%</command>
<command prompt=']?'>%SOURCE_FILE_NAME%</command>
<command prompt='confirm'>%DESTINATION_FILE_NAME%</command>
<command timeout='120' suffix='$NO_ENTER'>y</command>
In the above example, placeholders have been used for Source File Name, TFTP Server IP and Destination File Name. At the time of executing this advanced script, values could be provided for these placeholders. The script could be used for many devices at one go.
4. The value for the 'Template Variable' can be specified when the template is uploaded to the device
5. Click 'Save'. The required new template is created
Step 2 - Execute the template
To upload the template to device,
1. Go to "Admin" >> "Device Management" >> "Custom Templates" and click the 'Upload' link present under the "Action" column corresponding to the template
2. In the UI that opens, you will see the list of 'Template Variables', if a variable has been created/defined in the template. Enter the desired value for the respective template variables. For example, for '%COMMUNITY%', you can provide 'public' as the value. After entering the values(s), you can preview the actual configuration with full configuration commands and value for community variable(s). To preview the configuration, click 'Preview'
3. To apply changes only to specific devices, click the radio button 'Select Specific Device'. The list of devices are also listed in a box. You can choose any number of devices from that list. [To apply changes to a group of devices, click 'Select Device Group'. You can select the desired group in the drop-down. If you choose this option, the template would be uploaded to all the devices of the selected group]
4. By default, DeviceExpert triggers configuration backup before and after the execution of the custom temple. You have the option to enable/disable the configuration backup on need basis. In certain cases like firmware upgrade, after the execution of the command, device will go out of network briefly. In such a situation, DeviceExpert will not be able to trigger configuration backup. The custom template execution will also fail. To avoid this kind of scenario, you can disable configuration backup while creating the custom template
5. Click 'Execute'. The configuration as defined in the template will be uploaded to the selected devices
Bala
- - - - - - - - - - - - - - - - - - - -
ManageEngine DeviceExpert Technical Support
Toll Free: +1 888 720 9500
DeviceExpert - Network Change and Configuration Management Software
www.deviceexpert.com
- - - - - - - - - - - - - - - - - - - -
New to ADSelfService Plus?