1 Murthy Esakonu June 3rd, 2009 Shenzhen China OpenSAF Developer Days 2009 Writing First OpenSAF Application Session OpenSAF Developer Days 2009 Writing First OpenSAF Application Session 03-04
2 Presentation Outline OpenSAF architecture How to Get OpenSAF Building OpenSAF Writing your Application Component OpenSAF Application configuration Running your application Running your application in cluster_uml Application porting from OpenSAF3.0 to 4.0 References
3 OpenSAF Architecture System Controller (active) System Controller (standby) OpenSAF Node Directors Application Process OpenSAF Agents Application Process OpenSAF Agents Application Process OpenSAF Agents OpenSAF Node Directors OpenSAF Node Directors Node Control OpenSAF Directors OpenSAF Servers System Description OpenSAF Directors OpenSAF Servers System Description Centralized System Control Node a Node b Node c Directors/servers have cluster wide view Work in conjunction with node directors OpenSAF configuration is stored here Node directors process all events that can be managed at node scope Node c
4 How to Get OpenSAF OpenSAF advertises releases on OpenSAF mailing reflectors (info, users, announce, devel). You can subscribe to the mailing lists by visiting the following link. The advertised releases are hosted in below location. The development source tree is hosted on mercurial server. You can access the repository from
5 Building OpenSAF INSTALL and README file is authentic reference located in opensaf directory in your source. Follows standard open source build instructions –./configure –make –make install (for host installation) –make rpm (to create rpms) If you are doing the compilation for different target, use the appropriate cross compile tool chain with following options to configure --build=TYPE(CPU-COMPANY-SYSTEM) --host=‘TYPE’
6 Writing Your Component Determine AMF system model –Determine the component type SA-Aware component Non-SA-Aware component –Local components –External Proxied components –Local Proxied components –Develop the component –Provide the Life cycle management scripts. –Decide on component grouping in a Service Unit –Decide on Redundancy model –Create Service groups to manage multiple redundant service units and components with in Service groups. – Do the Workload management by assigning Service instance to SUs. For complete information Please refer to AMF specification.
7 OpenSAF Application configuration Application information should be captured in AppConfig.xml located in etc/opensaf
8 OpenSAF Application configuration Component prototype CSI prototype SU prototype Node Prototype SI descriptor SG descriptor Node Instance
9 Building Component Prototype /opt/aishello/etc/cstart instantiate aishello /opt/aishello/etc/cstart terminate aishello /opt/aishello/etc/cstart cleanup aishello safCsi=CsiT_aishello 1_ACTIVE_OR_1_STANDBY Component Life Cycle Component Capability
10 Building SU Prototype safComp=CompT_aishello Component Prototypes in SU
11 Service Instance Configuration safCsi=CsiT_aishello
12 Service Group Configuration safSi=Si_aishello_1 Specify the Redundancy Models
13 Service Instance Configuration safSu=SuT_aishello safNode=NodeT_Payload Complete list of SU prototypes
14 Running your application Place the modified Appconfig.xml in /etc/opensaf Place the component CLC scripts in as per the paths mentioned in the Appconfig.xml Modify slot_id : slot_id in the cluster node_init.conf: configure Ethernet port for TIPC communication rde_conf: configure the peer controller IP address file Start the OpenSAF cluster by executing –/etc/init.d/opensafd start You can determine the status of the OpenSAF cluster by running –/etc/init.d/opensafd status You can determine the status of the application by looking at the logs of Availability node director or by doing MiB get on AMF MIB object
15 Running your application in cluster_uml Cluster_uml is a utlity to simulate OpenSAF cluster in a single PC using UML (User Mode Linux) This is part of the OpenSAF distribution and located in opensaf/tools/cluster_sim_uml Invoke./build_uml to build the cluster. Once the build is successful, start the cluster by./opensaf start That brings up one xterm window for each node, and active system controller spawns opensaf infrastructure and application components.
16 Application porting from OpenSAF3.0 to OpenSAF4.0 OpenSAF AMF is going to be integrated with IMM in OpenSAF4.0 Release Applications are going to be binary compatible. Application configuration needs to be represented in the IMM xml model instead of OpenSAF XML.
17 References OpenSAF System Description Programmer’s reference SAF AIS Application Management Framework Specification (SAI-AIS-AMF-B.01.01) OpenSAF INSTALL and README file OpenSAF cluster_sim_uml README
Thank You!