SlideShare a Scribd company logo
1 of 28
Download to read offline
How to build a custom stack with
WSO2 Carbon
Shameera Ratnayaka
Software Engineer
Manoj Kumara
Software Engineer
150+ globally positioned support
customers
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.
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, ...
WSO2 Carbon based Products
Features
• Service Management Feature
• Proxy Services Features
• Transport Management Feature, etc..
Features in Carbon
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
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).
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
The big picture
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
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
Eclipse p2
● Manages the packaging of OSGi bundles
into features
● Supports deploying, undeploying,
checkpoints
● Advanced features include shared
repositories
p2 in Eclipse
p2 in Carbon
Feature Provisioning
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
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
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
Demo
Create custom component
Acquiring a OSGi service declaratively
/**
* @scr.component name="org.wso2.carbon.student.mgt" immediate="true"
* @scr.reference name="registry.service" interface="org.wso2.carbon.registry.core.service.
RegistryService"
* cardinality="1..1" policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService"
*/
public class StudentRegistryService {
public static RegistryService registryService;
protected void setRegistryService(RegistryService registryService) {
StudentRegistryService.registryService = registryService;
}
protected void unsetRegistryService(RegistryService registryService) {
StudentRegistryService.registryService = null;
}
}
Deployment Synchronization
Clustering
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
Configuration files
- axis2.xml
- carbon.xml
- master-datasources.xml
- authenticators.xml
- registry.xml
- cache.xml
- user-mgt.xml
- log4j.properties
- .......
Add and Edit Configurations
conf
├── axis2
│ ├── axis2_client.xml
│ ├── axis2.xml
│ └── tenant-axis2.xml
├── carbon.xml
├── datasources
│ └── master-datasources.xml
├── etc
│ ├── cache.xml
├── log4j.properties
├── registry.xml
├── security
│ ├── authenticators.xml
├── tomcat
│ ├── carbon
│ │ ├── META-INF
│ │ │ └── context.xml
│ │ └── web.xml
│ ├── catalina-server.xml
│ ├── tomcat-users.xml
│ └── web.xml
└── user-mgt.xml
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

More Related Content

What's hot

Server-side OSGi with Apache Sling (Jazoon 2010)
Server-side OSGi with Apache Sling (Jazoon 2010)Server-side OSGi with Apache Sling (Jazoon 2010)
Server-side OSGi with Apache Sling (Jazoon 2010)Felix Meschberger
 
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...VMware Tanzu
 
Guiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landDariusz Łuksza
 
Webkit/chromium contribution process
Webkit/chromium contribution processWebkit/chromium contribution process
Webkit/chromium contribution processNAVER LABS
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web ConsoleFelix Meschberger
 
Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Manfred Steyer
 

What's hot (8)

Server-side OSGi with Apache Sling (Jazoon 2010)
Server-side OSGi with Apache Sling (Jazoon 2010)Server-side OSGi with Apache Sling (Jazoon 2010)
Server-side OSGi with Apache Sling (Jazoon 2010)
 
Apache Felix Web Console
Apache Felix Web ConsoleApache Felix Web Console
Apache Felix Web Console
 
ASP.NET vNext
ASP.NET vNextASP.NET vNext
ASP.NET vNext
 
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...
PKS Automation Station...All Aboard: Enabling Team Access to PKS with a Conco...
 
Guiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise landGuiding Diffy to the Enterprise land
Guiding Diffy to the Enterprise land
 
Webkit/chromium contribution process
Webkit/chromium contribution processWebkit/chromium contribution process
Webkit/chromium contribution process
 
Managing an OSGi Framework with Apache Felix Web Console
Managing an OSGi Framework with  Apache Felix Web ConsoleManaging an OSGi Framework with  Apache Felix Web Console
Managing an OSGi Framework with Apache Felix Web Console
 
Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2Der neueste neue Router (Version 3) für Angular 2
Der neueste neue Router (Version 3) für Angular 2
 

Viewers also liked

Viewers also liked (11)

la gerencia
la gerenciala gerencia
la gerencia
 
Manual zanussi lavadora zwf71040w
Manual zanussi   lavadora zwf71040wManual zanussi   lavadora zwf71040w
Manual zanussi lavadora zwf71040w
 
ISGN_Servicing_Infographic
ISGN_Servicing_InfographicISGN_Servicing_Infographic
ISGN_Servicing_Infographic
 
Manual zanussi horno zob25602xk
Manual zanussi   horno zob25602xkManual zanussi   horno zob25602xk
Manual zanussi horno zob25602xk
 
ApoorvJoshi_Resume
ApoorvJoshi_ResumeApoorvJoshi_Resume
ApoorvJoshi_Resume
 
Lavadora Bosch WOT24254EE
Lavadora Bosch WOT24254EELavadora Bosch WOT24254EE
Lavadora Bosch WOT24254EE
 
organizacion de eventos. Esquema
organizacion de eventos. Esquemaorganizacion de eventos. Esquema
organizacion de eventos. Esquema
 
Origen de la relaciones públicas
Origen de la relaciones públicasOrigen de la relaciones públicas
Origen de la relaciones públicas
 
4 figure grid refrences
4 figure grid refrences 4 figure grid refrences
4 figure grid refrences
 
Microondas Zanussi ZBM26542XA
Microondas Zanussi ZBM26542XAMicroondas Zanussi ZBM26542XA
Microondas Zanussi ZBM26542XA
 
Miguel pato 28 oct2013
Miguel pato 28 oct2013Miguel pato 28 oct2013
Miguel pato 28 oct2013
 

Similar to How to build a custom stack with wso2 carbon

Carbon: Towards a Server Building Framework for SOA Platform
Carbon: Towards a Server Building Framework for SOA PlatformCarbon: Towards a Server Building Framework for SOA Platform
Carbon: Towards a Server Building Framework for SOA PlatformSrinath Perera
 
Using the Carbon Architecture to Build a Fit-for-Purpose Platform
Using the Carbon Architecture to Build a Fit-for-Purpose PlatformUsing the Carbon Architecture to Build a Fit-for-Purpose Platform
Using the Carbon Architecture to Build a Fit-for-Purpose PlatformSameera Jayasoma
 
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...WSO2
 
The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10RightScale
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os giDileepa Jayakody
 
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...mfrancis
 
Building a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGiBuilding a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGiDileepa Jayakody
 
Introduction to the wso2 carbon platform webinar
Introduction to the wso2 carbon platform   webinarIntroduction to the wso2 carbon platform   webinar
Introduction to the wso2 carbon platform webinarWSO2
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinsonmfrancis
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haulIan Robinson
 
Why Does Modular Middleware Matters
Why Does Modular Middleware MattersWhy Does Modular Middleware Matters
Why Does Modular Middleware MattersWSO2
 
Wso2 product release webinar wso2 carbon 4.3
Wso2 product release webinar   wso2 carbon 4.3Wso2 product release webinar   wso2 carbon 4.3
Wso2 product release webinar wso2 carbon 4.3WSO2
 
WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5Vinayak Tavargeri
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01Scott Miao
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Movel
 
Pivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleasePivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleaseVMware Tanzu
 
414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integrationTrevor Dolby
 

Similar to How to build a custom stack with wso2 carbon (20)

Carbon: Towards a Server Building Framework for SOA Platform
Carbon: Towards a Server Building Framework for SOA PlatformCarbon: Towards a Server Building Framework for SOA Platform
Carbon: Towards a Server Building Framework for SOA Platform
 
Using the Carbon Architecture to Build a Fit-for-Purpose Platform
Using the Carbon Architecture to Build a Fit-for-Purpose PlatformUsing the Carbon Architecture to Build a Fit-for-Purpose Platform
Using the Carbon Architecture to Build a Fit-for-Purpose Platform
 
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...
WSO2Con US 2013 - Using the Carbon Architecture To Build a Fit-for-Purpose Pl...
 
The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10The Future of Cloud Computing Today with Ubuntu 10.10
The Future of Cloud Computing Today with Ubuntu 10.10
 
Building a server platform with os gi
Building a server platform with os giBuilding a server platform with os gi
Building a server platform with os gi
 
Carbon and OSGi Deep Dive
Carbon and OSGi Deep DiveCarbon and OSGi Deep Dive
Carbon and OSGi Deep Dive
 
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
Building a Modular Server Platform with OSGi - Harshana Eranga Martin, Dileep...
 
Building a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGiBuilding a Modular Server Platform with OSGi
Building a Modular Server Platform with OSGi
 
Introduction to the wso2 carbon platform webinar
Introduction to the wso2 carbon platform   webinarIntroduction to the wso2 carbon platform   webinar
Introduction to the wso2 carbon platform webinar
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haul
 
Why Does Modular Middleware Matters
Why Does Modular Middleware MattersWhy Does Modular Middleware Matters
Why Does Modular Middleware Matters
 
Wso2 product release webinar wso2 carbon 4.3
Wso2 product release webinar   wso2 carbon 4.3Wso2 product release webinar   wso2 carbon 4.3
Wso2 product release webinar wso2 carbon 4.3
 
WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3 WSO2 Product Release webinar - WSO2 Carbon 4.3
WSO2 Product Release webinar - WSO2 Carbon 4.3
 
What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5What's new in Portal and WCM 8.5
What's new in Portal and WCM 8.5
 
What's new in p2 (2009)?
What's new in p2 (2009)?What's new in p2 (2009)?
What's new in p2 (2009)?
 
20171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v0120171122 aws usergrp_coretech-spn-cicd-aws-v01
20171122 aws usergrp_coretech-spn-cicd-aws-v01
 
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
Scaling AngularJS: Enterprise SOA on the MEAN Stack (Responsive Web & Mobile)
 
Pivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October ReleasePivotal Platform: A First Look at the October Release
Pivotal Platform: A First Look at the October Release
 
414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration414: Build an agile CI/CD Pipeline for application integration
414: Build an agile CI/CD Pipeline for application integration
 

Recently uploaded

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 

Recently uploaded (20)

Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 

How to build a custom stack with wso2 carbon

  • 1. How to build a custom stack with WSO2 Carbon Shameera Ratnayaka Software Engineer Manoj Kumara Software Engineer
  • 2.
  • 3. 150+ globally positioned support customers
  • 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
  • 22. Acquiring a OSGi service declaratively /** * @scr.component name="org.wso2.carbon.student.mgt" immediate="true" * @scr.reference name="registry.service" interface="org.wso2.carbon.registry.core.service. RegistryService" * cardinality="1..1" policy="dynamic" bind="setRegistryService" unbind="unsetRegistryService" */ public class StudentRegistryService { public static RegistryService registryService; protected void setRegistryService(RegistryService registryService) { StudentRegistryService.registryService = registryService; } protected void unsetRegistryService(RegistryService registryService) { StudentRegistryService.registryService = null; } }
  • 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
  • 26. Configuration files - axis2.xml - carbon.xml - master-datasources.xml - authenticators.xml - registry.xml - cache.xml - user-mgt.xml - log4j.properties - .......
  • 27. Add and Edit Configurations conf ├── axis2 │ ├── axis2_client.xml │ ├── axis2.xml │ └── tenant-axis2.xml ├── carbon.xml ├── datasources │ └── master-datasources.xml ├── etc │ ├── cache.xml ├── log4j.properties ├── registry.xml ├── security │ ├── authenticators.xml ├── tomcat │ ├── carbon │ │ ├── META-INF │ │ │ └── context.xml │ │ └── web.xml │ ├── catalina-server.xml │ ├── tomcat-users.xml │ └── web.xml └── user-mgt.xml
  • 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