Installing Third-Party Applications from the SMI Server
The Cisco Edge 300 series switch supports the installation of third-party applications from the Smart Install (SMI) server.
The original Cisco Edge 300 series switch package released by Cisco contains a default third-party application package, which includes Open Office and Chrome browser. You can modify the third-party application contents and repackage it, so that you can install partner applications into Cisco Edge 300 from the SMI server.
Third-Party Software Image Requirements
These are the requirements for third-party application images to run on the Cisco Edge 300 series switch:
- The image must be a single package in the form of a *delivery.tar.gz file.
- The image must contain a header file that is placed in a separate header directory. The name of the header file must describe the image.
- The name of the header file must also be the name of the image file. For example, if the header file for the third-party application is 3rd-app-edge300-0.2.5.0-delivery.header, the name of the third-party application image file must be 3rd-app-edge300-0.2.5.0-delivery.tar.gz.
This figure shows the directory structure on the TFTP server after the image package has been unzipped and placed in the /opt/Tftproot/image directory. The bold text parts must match:
| | |-- os-edge300-0.2.5.0-delivery.tar.gz
| | |-- header/os-edge300-0.2.5.0-delivery.header
| | |-- root-edge300-0.2.5.0.tar.gz
| | |-- bzImage-21official-beta0.1
| | |-- cisco-app-edge300-0.2.5.0-delivery.tar.gz
| | |-- header/cisco-app-edge300-0.2.5.0-delivery.header
| | |-- cisco-app-edge300-0.2.5.0.tar.gz
| | |-- 3rd-app-edge300-0.2.5.0-delivery.tar.gz
| | |-- header/3rd-app-edge300-0.2.5.0-delivery.header
| | |-- 3rd-app-edge300-0.2.5.0.tar.gz
- The header file must specify these fields, and the IMAGE_TYPE, CPU_TYPE and VIDEO_OUT fields must contain the information that is shown after the equal (=) sign:
This is an example of a header file:
IMAGE_NAME=3rd-app-edge300-0.2.5.0-delivery.tar.gz
Installing a Third-Party Application Package
To generate the SMI third-party application package, following these steps.
Step 1 Use the following contents to create a header file under ${RELEASE_DEST} for the third-party application, with the file name 3rd.header :
Note ${RELEASE_DEST} could be any place that you have write permission on the Linux machine.
IMAGE_VERSION=RELEASEVERSION
IMAGE_NAME=image/Partner/3rd-app-sunbird-RELEASEVERSION.tar.gz
Step 2 Use the command tar -zcvf 3rd-app.tar.gz to create a 3rd-app.tar.gz file under ${RELEASE_DEST} from Cisco-provided SDK. This file contains the applications to be installed.
You also need two scripts, pre_install.sh and startup.sh, which are optional files with execution permission.
a. When SMI downloads a third-party application, it executes pre_install.sh first, by which the tasks drafted in the script, such as configuring application environment and deleting old files, can be done before package extraction.
b. SMI extracts the package to the target path.
c. SMI executes post_install.sh to wrap the package off. You add commands that can clean up temporary files or create desktop icon in this script.
You need a pre_install.sh script for each third-party application package, and a startup.sh script for each application folder in it. The package structure of a third-party application looks like:
Step 3 Use the following script to generate a 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz file.
RELEASE_VERSION=1.5.1 #<-- please change the version as you wish, 1.5.1 Here is an example.
APP_SIZE=`du -k 3rd-app.tar.gz | awk '{print $1}'`
mv 3rd-app.tar.gz 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz
#Generate 3rd-app md5 checksum
openssl dgst -md5 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz > header/md5.txt
#Generate a header file according to template, version and size info.
APP_RELEASE_HEADER=3rd-app-sunbird-${RELEASE_VERSION}-delivery.header
cp 3rd.header header/3rd-app-sunbird-${RELEASE_VERSION}-delivery.header
sed -i "s@RELEASEVERSION@${RELEASE_VERSION}@g" ${APP_RELEASE_HEADER}
sed -i "s@RELEASESIZE@${APP_SIZE}@g" ${APP_RELEASE_HEADER}
#Generate needed 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz file
tar czvf 3rd-app-sunbird-${RELEASE_VERSION}-delivery.tar.gz 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz header/${APP_RELEASE_HEADER} header/md5.txt
rm -rf header 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz
Step 4 Put the 3rd-app-sunbird-${RELEASE_VERSION}.tar.gz file into the tftproot directory of the SMI server and install it. For detailed steps of the installation, see Chapter2, “Configuring the Smart Install Network” The destination directory is /opt/Tftproot/image/Partner of the TFTP server.