View source | Discuss this page | Page history | Printable version   

Release Management/rPath Management Console Development

Release Management/Internal

Index


Contents

Introduction

Openbravo ERP Professional Subscription is available with a web based user interface which helps in performing initial configuration and ongoing maintenance of the deployed appliance. This document explains how to setup a development environment, how to develop a new interface and customize it.

Rationale

We use rBuilder, an rPath tool to build appliances which usually include the rPath Appliance Platform Agent (rAPA). Openbravo ERP Professional Subscription is built in it, and rAPA provides an interface to manage the appliance. An interesting feature of rAPA is that it has options to use either its native web interface or its XML-RPC calls to perform the administrative tasks. In terms of rPath this was referred as Plugin Development. Check here for more about Plugins.

rAPA Environment Setup

Prerequisites

rPath offers Application to Appliance Development Image with packages required for developing/reconfiguring rAPA plugin. If you are not using app2app, then

conary update group-rapa=raa.rpath.org@rpath:rapa-3
conary update kid:runtime=conary.rpath.com@rpl:2
conary update xmlto 
export PYTHONPATH=/usr/lib/python2.4/site-packages/raa/vendor
#edit /etc/sudoers
Defaults env_keep="PYTHONPATH" 
#This is necessary because some of the scripts in the rAPA development environment 
attempt to run as root and pass this environment variable through the sudo utility.

Console development directory setup

cd ~/
hg clone http://hg.rpath.com/raa
cd ~/raa
# Update the raa to latest version(you can skip update)
hg update 3.0.2.1
# Run make to generate some file necessary to work out of directory
make
mkdir ~/rapa-devel
cd ~/rapa-devel/
ln -s ../raa/dev.cfg
ln -s ../raa/raa
ln -s ../raa/raaplugins
ln -s ../raa/raa-service
ln -s ../raa/start-raa-service.sh
ln -s ../raa/start-raa-web.sh
ln -s ../raa/raa_service_dev.conf
ln -s ../raa/raa/content content
ln -s ../raa/raa-web
# Create ~/rapa-devel/raa_service.conf
# Add this line 
listenerUser  username 
# Create ~/rapa-devel/custom.cfg
# Add this line 
[global]
server.run_user = 'username'
server.run_group = 'username'
server.lock_path = '.'
cd ~/rapa-devel
su root
../raa/distro/bin/raa-gendummycert.sh $(pwd)/test.key $(pwd)/test.crt
ln -s ../raa/plugingenerator.py && ln -s ../raa/plugintemplate/

You are done with the setup. You must stop the raa service that is running on the system and then start the web and server services from the development directory instead.

 su root
 /sbin/service raa stop
cd ~/rapa-devel
# Start raa-web to launch the web service: 
./start-raa-web.sh
# Open a new session/screen and start raa-service to launch the server service, 
this helps to monitor the  status and error messages
./start-raa-service.sh

Your are now set to go, while the raa services are running rAPA interface can be accessed in a web browser using the following URL https://hostname:8003

Note: Be careful when more than one working on same machine to explore this document, as restarting raa-web, raa-service might mess up the work.

Plugin Creation

generate a template for each plugin you need to develop, use the plugin generator by running the Python script linked in ~/rapa-devel, and fill information as prompted by the script

cd  ~/rapa-devel
python plugingenerator.py

Add more task interfaces to your UI

Customization

Integrate it with Appliance

 cd <appliance-context-path>
 cvc newpkg rapa-plugin-app
 cd rapa-plugin-app
 # copy the files from plugin directory
 cp -r ~/rapa-devel/<plugin_directory> ~/<appliance-contect-path>/rapa-plugin-app/
 # Create and edit rapa-plugin-app.recipe file to incorporate the setup required for rapa-plugin
 # Build the rapa package
 rmake build rapa-plugin-app.recipe
 cd <appliance-context-path>/group-<app>
 vi group-<app>.recipe
 # Add this next to version, this refers from where to pick rapa package for your appliance 
 rapaLabel = 'products.rpath.com@rpath:rapa-3'
 # Add rapa as
 r.add(rapa-plugin-app)
 cvc ci -m "Added rapa-plugin"
 cvc cook {options}
 

References

Retrieved from "http://wiki.openbravo.com/wiki/Release_Management/rPath_Management_Console_Development"

This page has been accessed 5,433 times. This page was last modified on 2 February 2010, at 07:46. Content is available under Creative Commons Attribution-ShareAlike 2.5 Spain License.