Cisco Cisco Application Extension Platform for SRE

Page of 26
Cisco Application eXtension Platform 1.0 Quick Start Guide
Packaging Applications on Cisco AXP
10
Cisco Application eXtension Platform 1.0 Quick Start Guide
OL-15669-01
You can run the tool from within the /opt/axp-sdk.1.0.1/tools/ directory or
from outside this directory by preceding “pkg_build.sh” with the directory path name. 
Example 1. (Invoke tool from outside the directory.)
[root@fedora /]# /opt/axp-sdk.1.0.1/tools/pkg_build.sh <enter>
Example 2. (Invoke tool from within the /opt/axp-sdk.1.0.1/tools/ directory.)
[root@fedora /]# pkg_build.sh <enter>
The package builder executes interactively, creating the package files for installation. 
Step 8
Create a manifest file, by copying the output from step 7 (displayed on the screen after the words 
“Resulting CLI command”), and pasting the output into a file for future use as a script file. 
In future, you can use the script file to supply the arguments to the package builder instead of running 
the tool interactively. This also has the advantage of being able to run the script after you have modified 
the settings in the file.
Preparing an Application with RPMs
An RPM tool is not supported directly in the Cisco AXP vserver environment by default. To install 
RPMs as part of your application, you must extract the RPMs in the development environment and then 
integrate the RPMs with the application before running the packaging utility. 
Preparing an Application: Example
Step 1
Navigate to the tools directory in your Cisco AXP SDK by typing the following: 
[root@fedora /]# cd /opt/axp-sdk.1.0.1/tools <enter>
[root@fedora tools]# pwd <enter>
/opt/axp_#/tools
[root@fedora tools]# ls <enter>
custom_cli  gen_auth.sh  pkg_build.sh  pkg_bundle.sh  pkg_check.sh  pkg_info.sh  
rpm_extractor.sh
[root@fedora tools]# 
Step 2
The rpm_extractor.sh tool which exists in the /opt/axp-sdk.1.0.1/tools directory, helps you to quickly 
extract an RPM into a project source root directory, examine any dependencies the RPM requires, and 
view any pre/post install/uninstall scripts contained in the RPM. 
Here is the command line format for rpm_extractor.sh: 
rpm_extractor.sh --proj 
project-directory [--output] [--scripts] [--deps] RPM-files
Required argument: 
proj project-directory 
Location of project directory. The rpm_extractor.sh tool creates a sub-directory structure under 
the project-directory as follows: 
/project-directory/
rpm_extractor/
output/
scripts/
deps/ 
a.
The rpm_extractor.sh tool places extracted RPM files in the output/ directory.