« Back to Technical Questions

Questions about building a packaging an application for AXP

Combination View Flat View Tree View
Hi all,
 
i am new to the AXP and i really dun have a clear concept about it. please clarify if i have sth wrong in the following questions? Thanks. =)
 
i would like to follow the sample in the development guide to create a hello world package and then install it to the AXP
 
Question 1:
so first i need to have a fedora to packaging. is Fedora 8 ok?
 
Question 2:
according to the development guide
Step 1 Run the SDK packaging tool pkg_build.sh, which is located in directory axp-sdk.<version>/tools
Specify parameters to the packaging tool interactively or in batch mode (in a file).

 
so how can i found the pkg_build.sh?
 
Question 3:
i have installed some add on package in AXP
AXP302# show software packages

Installed Packages:

 - Installer (Installer application) (1.1.1.0)
 - Global (Global manifest) (1.1.1)
 - Bootloader (Primary) (Service Engine Bootloader) (1.0.2)
 - AXP (Virtual Server Development System) (1.1.1)
 - Infrastructure (Service Engine Infrastructure) (2.5.0.1)
 - guest_os (AXP Guest OS Add-on Package) (1.1.1)
 - Bootloader (Secondary) (Service Engine Bootloader) (1.0.2.0)
 - Core (Service Engine OS Core) (2.5.0.1)
 - GPL Infrastructure (Service Engine GPL Infrastructure) (2.3.0.1)

Installed Plug-ins:

 - VSERIAL (Javelin Virtual Serial Device support) (1.1.1)
 - minicom (None) (1.0)
 - HelloWorld (None) (1.1)
 - helloworldapp (None) (1.1)
 - iosapi (IOS Config Service API) (1.1.1)
 - cli_plugin (CLI Plugin bundle to allow custom CLI plugin) (1.1.1)
 - Tomcat (Apache Foundation Tomcat Servlet Container) (5.5.20)

 - app_ssh (Application SSH Add-on Package) (1.1.1)
 - app_dev (Application Debugging Add-on Package) (1.1.1)
 - tmpalarm (None) (1.1)

 
i would like to include the tomcat, ssh into the package such that i can ssh to the guest OS after creating the virtual instance.
how can i do that?
 
Question 4:
if finally i can ssh to the guest OS, can i transfer file to the guest OS by sftp? if no, any way to achieve that?
 
Question 5:
if i can transfer files to the guest OS, then i can install other softwares to it, is that true?
 
Thanks for your help.
 
Regards,
Kit

Question 1:
so first i need to have a fedora to packaging. is Fedora 8 ok?
>>> Jasmine >>> Any Linux environment would be fine, so Fedora 8 is OK.

Question 2:
according to the development guide
Step 1 Run the SDK packaging tool pkg_build.sh, which is located in directory axp-sdk.<version>/tools
Specify parameters to the packaging tool interactively or in batch mode (in a file).

so how can i found the pkg_build.sh?

>>> Jasmine >>> Please download the SDK from CCO, extract it and you will find pkg_build.sh under tools folder. Find below the CCO location for 1.1.1 SDK.
http://www.cisco.com/cgi-bin/Software/Tablebuild/doftp.pl?ftpfile=/cisco/crypto/3DES/access/AXP/1.1.1/sdk-addons/axp-sdk.1.1.1.tar.gz
 
Question 3:
i have installed some add on package in AXP
AXP302# show software packages

Installed Packages:

 - Installer (Installer application) (1.1.1.0)
 - Global (Global manifest) (1.1.1)
 - Bootloader (Primary) (Service Engine Bootloader) (1.0.2)
 - AXP (Virtual Server Development System) (1.1.1)
 - Infrastructure (Service Engine Infrastructure) (2.5.0.1)
 - guest_os (AXP Guest OS Add-on Package) (1.1.1)
 - Bootloader (Secondary) (Service Engine Bootloader) (1.0.2.0)
 - Core (Service Engine OS Core) (2.5.0.1)
 - GPL Infrastructure (Service Engine GPL Infrastructure) (2.3.0.1)

Installed Plug-ins:

 - VSERIAL (Javelin Virtual Serial Device support) (1.1.1)
 - minicom (None) (1.0)
 - HelloWorld (None) (1.1)
 - helloworldapp (None) (1.1)
 - iosapi (IOS Config Service API) (1.1.1)
 - cli_plugin (CLI Plugin bundle to allow custom CLI plugin) (1.1.1)
 - Tomcat (Apache Foundation Tomcat Servlet Container) (5.5.20)

 - app_ssh (Application SSH Add-on Package) (1.1.1)
 - app_dev (Application Debugging Add-on Package) (1.1.1)
 - tmpalarm (None) (1.1)

 
i would like to include the tomcat, ssh into the package such that i can ssh to the guest OS after creating the virtual instance.
how can i do that?
 
>>> Jasmine >>> You can pkg_info.sh shell script in the SDK, run that with the tomcat and ssh package, get the SSID and use that with "--deps" parameter while packaging. For ex,

--deps '8cec8ee5-54c3-4667-b62e-d4a31805d44a,all:5d9267f0-f9c2-11db-8f0d-001635a94464,all'

For more than one package dependencies, you have to use : to indicate different packages SSID. Please go through the developer guide for more info on pkg_build.sh and pkg_info.sh.
 
Question 4:
if finally i can ssh to the guest OS, can i transfer file to the guest OS by sftp? if no, any way to achieve that?

>>> Jasmine >>> You can use scp to copy files from Linux workstation to guest OS and vice versa.


Question 5:
if i can transfer files to the guest OS, then i can install other softwares to it, is that true?
 
>>> Jasmine >>> Yes, You can scp executables and run it from the guest OS. What other softwares you exactly mean?

Thanks for your answer, i will try them next week.
 
In response to Question 5:
Actually i want run an web application and test its performance in the ISR. the web application is a JAR file which will deploy the java web app into the tomcat. but it also needs to work with database like postgresql. so probably i would want to install sth into the virtual instance.
 
Please let me know if u think the approach i described above has problems. =)
 
Thanks again ^^
 
Regards,
Kit

Yes, it is possible. You can find similar queries in forum related to this. Look out the knowledge database to too for sample programs which would be helpful for you.

Hi Jasmine,
 
i can successfully build the sample helloworld package which is downloaded from the Cisco Knowledge Base -> Sample Applications. but i cannot find the tomcat and ssh service in the app-service helloworld after installation
 
here are the details during the build
-------------------------------------------------------
as i want to install with the tomcat and ssh service, so i put the following files in the /home/fedora/Documents/helloworld_app/package/pkg
 
1. axp-ssh-4.6p1-k9.nme.1.1.1.pkg
2. axp-ssh-4.6p1-k9.nme.1.1.1.prt1
3. axp-tomcat5.nme.1.1.1.pkg
4. axp-tomcat5.nme.1.1.1.prt1
 
and here is my build script
./pkg_build.sh
--project-dir           '/home/fedora/Documents/helloworld_app/package'
--auth-bundle        '/home/fedora/Documents/cert/auth_bundle.sig'
--private-key         '/home/fedora/Documents/cert/private.key'
--name                 'helloworld'
--version               '1.0'
--description          'Create a virtual instance with ssh and tomcat add-on'
--deps                  'f463dc25-4749-48bd-b08c-25d8939c068b,all:55afcb57-65b1-4aca-aaff-cdb0fdf88df3,all'
--source-dir           '/home/fedora/Documents/helloworld_app/build'
--disk-limit            '100M'
--memory-limit      '128M'
--cpu-limit             '1000'
--postinstall           'bin/post-install.sh'
 
the f463dc25-4749-48bd-b08c-25d8939c068b and 55afcb57-65b1-4aca-aaff-cdb0fdf88df3 are the ssid of tomcat and ssh

these 2 packages have already been installed in the AXP so i didn't bundle them together with the built helloworld package.
 
 
after the build, i install the package in the axp by the following command
software install add url ftp://10.10.10.2/ username <ftp username> password <ftp password>
 
then i get into the guest os by connect console. but i dun know where is the tomcat and ssh folder where i can start the service.
i wonder whether i have made any mistake during the build
 
Thanks very much for your help.
 
Regards,
Kit

Hi Kit,
You don't need to have tomcat and ssh packages put in the package location, as you have already copied it to the AXP blade. What you have done with the packaging is correct, giving out the SSID of both the packages. Once you install the package these services would be started automatically. You can see that Tomcat is started in the below files,
console-2.05b# ls -l /etc/rc.d/init.d
-rwxr-xr-x  2 51477     25   958 Aug 25 18:47 tomcat_service
console-2.05b# ls -l /etc/rc.d/rc3.d/
lrwxrwxrwx  2 51477     25 24 Feb 17 14:38 S15tomcat_service ->../init.d/tomcat_service
console-2.05b# ls -l /etc/rc.d/rc6.d/
lrwxrwxrwx  2 51477     25 24 Feb 17 14:38 K85tomcat_service ->../init.d/tomcat_service
 
To test out the service, you can put some JSP file in the Tomcat install directory, /opt/tomcat/webapps/ROOT and from the browser type "[url=http://<ip>/filename]http://<ip>/filename.
 
To SSH into the guest OS, you have tunnel user and tunnel root accounts. Please go through the Developer guide to explore it. Here is a snip of what you can do to enable SSH for guest OS,
se-10-76-104-137(config-c_app)> ip ssh server
se-10-76-104-137(config-c_app)> ip ssh username ?
  tunnel_root  SSH Tunnel Root User
  tunnel_user  SSH Tunnel Root User
 

Hi jasmine,
 
thanks very much~. it works now =)
 
Regards,
Kit