the sling feature model -revealed! - eclipsecon europe 2019 · © 2019 adobe. all rights reserved....
TRANSCRIPT
![Page 1: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/1.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
The Sling Feature Model - Revealed!Karl Pauls and David Bosschaert
![Page 2: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/2.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Agenda
§ What is the Sling Feature Model 1.x§ Tools§ Practical Applications § Demo§ @OSGi
2 D
![Page 3: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/3.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
The Sling OSGi Feature Model
3 D
Bundle
Metadata
Config
BundleBundle
BundleBundle
Config
Bundle
![Page 4: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/4.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Reusing Features
4
Aggregate
MavenRepository
Analyzers
D
![Page 5: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/5.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Running Features
5 D
Launcher
My Runtime
-V dbhost=10.23.1.197-V apikey=ADH67HH988765BCA100BBAA
Late bound configs
Additional features
![Page 6: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/6.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Feature Model 1.x world
6 D
Feature Model
Main Model API
Feature I/O
JSON Serialization
Feature Analyzers
Analyzers
Feature Launcher
Launch feature Runtimes
slingfeature-maven-plugin
Maven Tooling
Main Components
Feature ModelConverter
Conversion to Provisioning Model
Feature ModelInventoryPrinter
Web Console Integration
API Regions Runtime
API Regions Runtime Enforcement
Content Extension
Handles Content Packages and RepoInit
API Regions Extension
API Regions Resource Generation
API Regions Model
API Regions Resource Generation
Feature Diff
Diff Features
Runtime to Feature
Generate Feature representing the Runtime
Additional Components
Karaf Conversion
Convert intoKaraf Feature
![Page 7: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/7.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Example Model{
"id": "org.foo.bar:osgi-http:1.0.2","variables": {
"http.port":"8080"},"bundles": [
"org.apache.felix:org.apache.felix.http.servlet-api:1.1.2","org.apache.felix:org.apache.felix.http.jetty:4.0.0"
],"configurations": {
"org.apache.felix.http": {"org.osgi.service.http.port": "${http.port}”,"org.apache.felix.https.enable”, true
}}
}
7 D
![Page 8: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/8.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Maven Tooling: slingfeature-maven-plugin
§ Aggregation§ Assemble a larger feature from others§ Create runnable, self-contained features§ Merge custom extensions
§ Analyzers§ Bundle Imports and Exports§ Requirements and Capabilities§ OSGi Connect checker§ API Region based
§ Create a repo of all artifacts§ Docker images without dependencies
8 D
![Page 9: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/9.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Launcher
Simple Java CLI for§ Framework selection§ Variables and Framework properties§ Merging of features§ Artifact handling§ Extensions
§ Launcher Extension§ Extensions
§ Merge Extensions
§ Launch Extensions
9 K
![Page 10: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/10.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Use It! Practical Applications
![Page 11: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/11.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
In practice
§ Use the maven plugin to create repository§ Include framework, extensions
§ Create docker image§ Based on java11
§ Optional: based on alpine§ Optional: jlink/jdeps base modules
§ Use launcher § Optional:
§ Merging of scripts§ Configadmin in memory§ Extension
§ Layering of images § add repositories,§ add features
11 K
![Page 12: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/12.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Demo
https://github.com/apache/sling-whiteboard/tree/master/it-is-cloudy-here
![Page 13: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/13.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Feature Model @ OSGi
![Page 14: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/14.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
The Feature Model is proposed as OSGi specification
§ Feature model RFP 188 accepted§ Going through the specification process
§ Currently under discussion
§ Feature model RFC 241 is in github here:https://github.com/osgi/design/tree/master/rfcs/rfc0241
14 D
![Page 15: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/15.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Get Involved!
§ Feature Model component in Sling§ https://github.com/apache/sling-org-apache-sling-feature
§ OSGi RFP in https://github.com/osgi/design§ OSGi feedback channels
§ Directly at OSGi
Q & A15 D
![Page 16: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/16.jpg)
© 2019 Adobe. All Rights Reserved. Adobe Confidential.
Picture acknowledgements
§ Holiday Bow: https://www.maxpixel.net/Bow-Holiday-Bow-Seasonal-Gift-Red-Bow-Ribbon-665067 (CC0 Public Domain)
16
![Page 17: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/17.jpg)
![Page 18: The Sling Feature Model -Revealed! - EclipseCon Europe 2019 · © 2019 Adobe. All Rights Reserved. Adobe Confidential. Agenda §What is the Sling Feature Model 1.x §Tools §Practical](https://reader033.vdocuments.net/reader033/viewer/2022042222/5ec82a593d01be4e095091d1/html5/thumbnails/18.jpg)