This document discusses how to build custom products using the WSO2 Carbon platform. It covers key Carbon concepts like features and components, and how to develop a custom component, create a corresponding feature, and install it into a Carbon-based product. It provides steps for building the backend and frontend of a component using Maven, as well as configuring deployment, clustering, and more.
4. Topics
● The feature/component concept in the WSO2 Carbon
platform.
● Installing features using the Feature Manager.
● How to create your custom products for cluster wide
deployment.
● Scripting feature installations for automation.
● Configuring logs/adding configs/etc.
5. What is Carbon
Carbon is a modular server runtime based on OSGi
Built on top of Carbon are a set of middleware
servers (App Server, ESB, Identity, API Manager, etc)
Re-configurable
» Install new features, uninstall, revert
Carbon includes a set of re-usable core components
● Clustering, User Management, Logging, JMX, ...
6. WSO2 Carbon based Products
Features
• Service Management Feature
• Proxy Services Features
• Transport Management Feature, etc..
8. What is a Feature
In Eclipse world
– Feature is a grouping of set of logically related plug-ins/ OSGi bundles
– Feature can be installed into Eclipse platform using its Update Manager
In Carbon world
– Feature can be thought of as an installable form of one or more logically
related Carbon component
• Service Management Component
– What you develop
• Service Management Feature
– What you install
– Feature is a grouping of one or more logically related Carbon components
– Features can be installed into Carbon based product using Feature Manager
9. Features
Allows you to specify pre-requisites of your Carbon
component.
– Other dependent features, bundles.
– Dependency Management.
• Are installable Units which can be installed into any
Carbon based product.
• Can be installed using the WSO2 Carbon Feature
Manager or by using a script
• Can be shared with others by packaging features as a
Repository (Update Site in eclipse terms).
10. What is a Carbon Component
● A set of OSGi Bundles.
● Lives in the Carbon Framework. Hence should conform to rules define
in the Carbon Framework.
● Uses Core Carbon Services
○ Via OSGI service registry
e.g. Registry Service, UserManager Service, etc
● Two aspects/ BE-FE Separation
○ Every component has a core runtime, a clean SOA management interface, a
well-defined front-end console component
○ Back-end Runtime
○ Front-end Console
12. Equinox P2
● A provision platform for OSGi based systems.
● p2 stands for “Provisioning Platform”
● Provides a well defined model for provisioning OSGi
bundles
● p2 allows us to manage components in a controlled
manner
● Install, Uninstall, Revert
● Based on a web or file based repository
○ Can be hosted internally for an organization
● Three approaches:
○ Command line
○ Web console
○ Secure remote API
13. Carbon Component: Development
Process
1. Develop the Carbon component
○ Back-end component (BE OSGi bundles)
○ Front-end component (FE OSGi bundles)
○ Common bundles, if any
2. Develop the corresponding feature
○ BE/Server Feature
○ FE/UI Feature
○ Composite Feature
3. Install into a Carbon based product
○ By integrating with the product build system
○ By developing a feature repository and installing using Feature
Manage
14. Eclipse p2
● Manages the packaging of OSGi bundles
into features
● Supports deploying, undeploying,
checkpoints
● Advanced features include shared
repositories
18. Student Manager Component
Lets develop a sample Carbon component to understand
the development process as well as the build process.
• Student Manager component
○ Consists of a BE runtime which exposes a Web services to
• Add new students
• Get the list of students
○ Consist of a FE console which displays the available student
information on the Carbon management console.
• Student Manager Feature
○ org.wso2.carbon.student.mgt.server.feature
○ org.wso2.carbon.student.mgt.ui.feature
○ org.wso2.carbon.student.mgt.feature
19. Developing the BE Component
● Some actual server logic plus an admin
service to manage it
● Add some special sauce into the services.
xml to let us know it’s an admin service
● component.xml configures permissions
20. We use Maven as our build tool.
• Building Carbon components/OSGi bundles
– Use Maven Bundle plugin to build OSGi bundles
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.1.0/core/org.
wso2.carbon.core/4.1.0/pom.xml
• Building Features
– Use Maven P2 Feature plugin (Developed at WSO2)
– Use p2-feature-gen goal
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.1.0
/features/org.wso2.carbon.core.feature/4.1.0/pom.xml
• Building a Repository
– Use Maven P2 plugin
– P2-repo-generator goal
https://svn.wso2.org/repos/wso2/carbon/kernel/branches/4.1.0
/features/pom.xml
Carbon Component: Build Process
25. Install features in build time
- Why?
- can we do this with feature manager UI?
- Then how we do that?
- Carbon-p2 maven plugin
- Generate p2 repository
- Install feature
28. Engage with WSO2
Helping you get the most out of your deployments
From project evaluation and inception to development and
going into production, WSO2 is your partner in ensuring
100% project success