Jahia DX 7.2 : Bye bye felix, hello karaf
-
Upload
serge-huber -
Category
Software
-
view
517 -
download
1
Transcript of Jahia DX 7.2 : Bye bye felix, hello karaf
![Page 1: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/1.jpg)
#jahiaXDC 1
Bye bye Felix, Hello Karaf
Serge Huber Jahia CTO & Co-Founder
![Page 2: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/2.jpg)
Title of Presentation I Date of Presentation 2
What is this about ?
![Page 3: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/3.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC
Chronology
Jahia Digital Experience Manager (DX) 7.0 • Introduces OSGi for modules • Implemented using the embedded Apache Felix OSGi
framework implementation
Jahia Digital Experience Manager (DX) 7.1 • No major change in the OSGi framework
Jahia Digital Experience Manager (DX) 7.2 (upcoming) • Replaces the embedded Felix Framework with Apache
Karaf (embedded)
Apache Unomi • Part of Jahia Marketing Factory • Built on top of a standalone Apache Karaf runtime
![Page 4: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/4.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 4
- Open Source OSGi Framework implementation - Implements part of the OSGi Compendium such as :
- HTTP Service - Shell Service (Gogo Shell) - Configuration Admin Service - Event Service
- Provides additional tools such as: - Web Console - iPOJO - uPNP support
![Page 5: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/5.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 5
• “The Tomcat for OSGI”, basically all you will need for a minimal server OSGi runtime (where Felix is not necessarily focused at servers)
• Uses Apache Felix or Eclipse Equinox as the OSGi Framework implementation
• Provides a lot of additional services such as : - Serious logging (Felix is really basic), backed by Log4J - Provisioning (Features) - Advanced remote SSH Shell - Two-way data binding configuration files - JMX support - Diagnostic and developer commands - JAAS support
KarafAPACHE
![Page 6: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/6.jpg)
Title of Presentation I Date of Presentation 6
Comparison
![Page 7: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/7.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 7
Quick comparison
Felix Karaf
OSGi Specification Version supported
R4 R6 (adds enterprise technologies)
Embedded Felix Framework Version
4.2.1 5.4.0
Remote Shell technology Telnet (insecure), deactivated by default
SSH (secure), activated by default
Shell autocompletion no yes
Shell help no yes
Shell history no yes
![Page 8: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/8.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 8
Quick comparison, continued
Supports regions (OSGi subsystems) no yes
Karaf Cellar (clustering) no yes
Karaf Decanter (monitoring) no yes
Karaf Cave (repository) no yes
Karaf Features (bundle packages) (provisioning) no yes
Two-way OSGi configuration sync (file to memory and back) no yes
![Page 9: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/9.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 9
Quick comparison, continued
Deploy bundle/features directly from Maven repository (or Karaf Cave)
no yes
Built-in support from JAR wrapping (dynamic generation of OSGi bundle from non-OSGi jar)
no yes
Built-in features (Spring, Blueprint, Hibernate) no yes
Diagnostic, JMX features no yes
Developer features (bundle:watch) no yes
![Page 10: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/10.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 10
Quick comparison, continued
Paves the way to a standalone runtime
no yes
Enterprise features (JNDI, JDBC, JPA, JTA, CDI, ...)
no yes
Security support (encryption, RBAC, JAAS, …)
no yes
Linux Comparison Similar to Linux Kernel Similar to “Lightweight” Linux Distribution (Debian)
![Page 11: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/11.jpg)
Title of Presentation I Date of Presentation 11
What’s New
![Page 12: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/12.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 12
Apache Karaf Shell
![Page 13: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/13.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 13
Apache Karaf Provisioning Features
A feature describes an application as: • a name • a version • a optional description (eventually with a long description) • a set of bundles • optionally a set configurations or configuration files • optionally a set of dependency features
![Page 14: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/14.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 14
Apache Karaf Features, continued
Karaf Shell - “feature:install feature1” will install all defined bundles for the feature name “feature1”
<features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0"> <feature name="feature1" version="1.0.0"> <bundle>...</bundle> <bundle>...</bundle> </feature> <feature name="feature2" version="1.1.0"> <feature>feature1</feature> <bundle>...</bundle> </feature></features>
![Page 15: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/15.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 15
Apache Features, continued
Dependent features
means that when you install the “my-project” feature, the “other” feature will also get installed if it is not already there.
<feature name="my-project" version="1.0.0"> <feature>other</feature> <bundle start-level="80" start="false">mvn:com.mycompany.myproject/myproject-dao</bundle> <bundle start-level="85" start="false">mvn:com.mycompany.myproject/myproject-service</bundle> </feature>
![Page 16: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/16.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 16
Building your own feature
<project xmlns=“http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=“http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd”> … <packaging>feature</packaging> <dependencies> <dependency> <groupId>org.jahia.modules</groupId> <artifactId>spam-filtering</artifactId> <version>2.0.1-SNAPSHOT</version> </dependency> <dependency> <groupId>org.jahia.modules</groupId> <artifactId>jahia-watcher-backend</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <version>4.0.3</version> <extensions>true</extensions> <configuration> <includeTransitiveDependency>false</includeTransitiveDependency> </configuration> </plugin> </plugins> </build> </project>
![Page 17: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/17.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 17
Building your own feature
mvn clean install
karaf> feature:repo-add mvn:org.jahia.modules/jahia-watcher-backend-karaf-feature/1.0-SNAPSHOT/xml/features karaf> feature:install jahia-watcher-backend-karaf-feature
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <features xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" name="jahia-watcher-backend-karaf-feature"> <feature name="jahia-watcher-backend-karaf-feature" description="Jahia Watcher DX module Apache Karaf Feature" version="1.0.0.SNAPSHOT"> <details>This project packages the backend for the Jahia Watcher mobile application as a Karaf Feature to be deployed in Jahia DX</details> <bundle>mvn:org.jahia.modules/spam-filtering/2.0.1-SNAPSHOT</bundle> <bundle>mvn:org.jahia.modules/jahia-watcher-backend/1.0-SNAPSHOT</bundle> </feature> </features>
![Page 18: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/18.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 18
Apache Features, continued
Features can do a lot more: - Provide embedded configuration properties - Provide configuration files directly - Features repositories (i.e. a <features> XML file) URLs can be added or
removed at any time - Features may specify requirements (using OSGi capabilities) - Features may also be controlled through JMX - Features may be upgraded (by simply installing a new version) - Features also work with Karaf Cellar, making it possible to install features
over a cluster
![Page 19: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/19.jpg)
Title of Presentation I Date of Presentation 19
Jahia DX Integration
![Page 20: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/20.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 20
Features for Jahia Modules
• Features provide a more powerful way to package collection of bundles than our existing (<7.2) MegaJAR technology
• Dependency on other features makes it easier to install more complex applications
• Cluster compatibility (through Karaf Cellar) will also make installation complex installations on a cluster easier
• At Jahia we will probably deprecate MegaJARs at some point once customer have shifted to Features
• Jahia’s other applications (Marketing Factory, Form Factory, Commerce Factory, Workspace Factory), will probably be all delivered as features over time
![Page 21: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/21.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 21
Jahia DX Integration
Migration • For most users, should be transparent, no change needed to modules or
configuration • If you performed modifications to the default felix-framework.properties file
those changes will need to be moved to another file (or removed)
Limitations • Existing features that depends on “web”, “pax-web” or “spring” features will
not work out of the box (because these technologies are exposed by DX’s core)
![Page 22: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/22.jpg)
Title of Presentation I Date of Presentation 22
Karaf Sub-Projects
![Page 23: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/23.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 23
Karaf Cellar
• Brings bundle clustering to Karaf instances
• Karaf itself provides HA (lock) • Karaf Cellar brings cluster:sync
provisioning between Karaf instances • Leverages Hazelcast • Easy to install and use • No single point of failure • Provide DOSGi support
(kind of RMI)
Karaf Node CELLAR
Karaf Node CELLAR
Karaf Node CELLAR
![Page 24: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/24.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 24
Karaf Decanter
• Apache Karaf Decanter, complete monitoring platform for Karaf and related (Camel, ActiveMQ, ...)
• Collectors (JMX, log messages, ...) • Dispatched by OSGi EventAdmin • Appenders (Elasticsearch, log,
JDBC, ...) • Dashboards (Kibana) and SLA
![Page 25: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/25.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 25
Other interesting Karaf projects
Karaf Cave • OSGi Repository implementation Karaf Boot • Get started quickly with a Karaf project, similar to Spring Boot but for OSGi
projects • Very early stages Karaf Maven Plugin • Helps built feature or KAR packages • Generates help for shell commands • Custom Karaf Distributions (for example Apache Unomi)
![Page 26: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/26.jpg)
Title of Presentation I Date of Presentation 26
Demo
![Page 27: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/27.jpg)
Title of Presentation I Date of Presentation 27
Q & A
![Page 28: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/28.jpg)
Title of Presentation I Date of Presentation 28
Thank you !
![Page 29: Jahia DX 7.2 : Bye bye felix, hello karaf](https://reader031.fdocuments.net/reader031/viewer/2022021502/58f0d0811a28aba2588b46ab/html5/thumbnails/29.jpg)
Bye Bye Felix, Hello Karaf I #jahiaXDC 29
Resources
Jahia Digital Experience Manager http://www.jahia.com
Apache Karaf http://karaf.apache.org
Reach me at : [email protected], @sergehuber