Managing Installations and Provisioning of OSGi Applications. Carsten Ziegeler

Similar documents
The State of Apache Sling

Carsten Ziegeler

JCR in Action. Content-based Applications with Apache Jackrabbit. Carsten Ziegeler.

Breaking Apart the Monolith with Modularity and Microservices CON3127

Standards and the Portals Project

Tutorial ipojo. 2. Preparation

The Cocoon Portal. A portal solution and framework. Carsten Ziegeler Competence Center Open Source S&N AG, Germany

Using Apache Felix: OSGi best practices. Marcel Offermans luminis

Adobe Experience Manager

OpenECOMP SDC Developer Guide

Apache Geronimo 3.0 Deep Dive

Under the Paul Fremantle, CTO, WSO2

SOA-14: Continuous Integration in SOA Projects Andreas Gies

OSGi on the Server. Martin Lippert (it-agile GmbH)

AD105 Introduction to Application Development for the IBM Workplace Managed Client

Equinox OSGi: Pervasive Componentization

J2EE Development with Apache Geronimo 1.1. Aaron Mulder CTO, Chariot Solutions Committer, Apache Geronimo

OSGi. Tales from the Trenches. OSGitales from the trenches

Nuxeo Roadmap. From Memphis to Chicago Nuxeo Team

Lotus Exam IBM Websphere Portal 6.1 Application Development Version: 5.0 [ Total Questions: 150 ]

Apache Felix. Richard S. Hall. A Standard Plugin Model for Apache. Atlanta, Georgia U.S.A. November 13th, 2007

Introducing Apache Geronimo 1.1. Aaron Mulder CTO, Chariot Solutions Committer, Apache Geronimo

Modular Java Applications with Spring, dm Server and OSGi

The Actual Real World at EclipseCon/ALM

Struts 2 Maven Archetypes

1.2. Name(s) and address of Document Author(s)/Supplier: Sahoo: 1.3. Date of This Document: 12 July 2008

JBoss DNA. Randall Hauch Principal Software Engineer JBoss Data Services

Create your own Carbon Component. Sameera Jayasoma Technical Lead and Product Manager of WSO2 Carbon

11-15 DECEMBER ANTWERP BELGIUM

Adobe Experience Manager Dev/Ops Engineer Adobe Certified Expert Exam Guide. Exam number: 9A0-397

Sunday, May 1,

JSR 277, 291 and OSGi, Oh My! - OSGi and Java Modularity

Solving Application Installation Issues During Migration

Portal Application Deployment Scripting

CHAPTER 6. Organizing Your Development Project. All right, guys! It s time to clean up this town!

Working with Geronimo Plugins

IBM. IBM WebSphere Application Server Migration Toolkit. WebSphere Application Server. Version 9.0 Release

Orchestrating the Continuous Delivery Process

Sonatype CLM Enforcement Points - Nexus. Sonatype CLM Enforcement Points - Nexus

Setting up a Maven Project

Adobe ColdFusion 11 Enterprise Edition

IBM Rational Software

Oracle Corporation

IBM Workplace Collaboration Services API Toolkit

GlassFish V3. Jerome Dochez. Sun Microsystems, Inc. hk2.dev.java.net, glassfish.dev.java.net. Session ID YOUR LOGO HERE

7.1. RELEASE-NOTES-2.0-M1.TXT

Struts: A Quick Installation Guide

OSGi in Action. RICHARD S. HALL KARL PAULS STUART McCULLOCH DAVID SAVAGE CREATING MODULAR APPLICATIONS IN JAVA MANNING. Greenwich (74 w. long.

Perceptive Connect Runtime

Modular Java EE in the cloud

Lab 03 Finish and Deploy an Application. Lab 3-1: Add DELETE to the Spring Boot REST Application

mimacom & LiferayDXP Campaign

Understanding ClassLoaders WebSphere 5.1, 6.0 and 6.1

Liberate your components with OSGi services

Tutorial: Developing a Simple Hello World Portlet

IKAN ALM Architecture. Closing the Gap Enterprise-wide Application Lifecycle Management

Class Dependency Analyzer CDA Developer Guide

AppDev StudioTM 3.2 SAS. Migration Guide

The Next Generation. Prabhat Jha Principal Engineer

SDD Proposal to COSMOS

Google Plugin for Eclipse

Java Development and Grid Computing with the Globus Toolkit Version 3

Using SAS Enterprise Guide with the WIK

Checking Out and Building Felix with NetBeans

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

AutoVue Integration SDK & Sample Integration for Filesys DMS

Orchestrate JBoss Middleware with Ansible Tower Red Hat Summit San Francisco

Manually Uninstall Websphere Application Server 7 Linux Installation Guide

Enterprise Development

Eclipse Day at GooglePlex 2009 Joep Rottinghuis Productivity Tools Architect, ebay Inc. August 27, 2009

2017, IBM Corporation Liberty z/os Good Practices. WebSphere Liberty z/os Applications and Application Deployment

Apache Karaf in the enterprise. JB

Tuscany: Applying OSGi modularity after the fact

Expeditor Client for Desktop. Web Container and Web Applications

Coherence Managed Servers

Patterns and Best Practices for Dynamic OSGi Applications

Apache Geronimo: A Peek Under the Hood

Distributed CI: Scaling Jenkins on Mesos and Marathon. Roger Ignazio Puppet Labs, Inc. MesosCon 2015 Seattle, WA

Tuesday, April 26, 2011

DevOps and Maven. Eamonn de Leastar Dr. Siobhán Drohan Produced by:

Patterns and Best Practices for dynamic OSGi Applications

IBM WebSphere Application Server 8. Java EE 6 Feature Packs

Deploying Cisco Nexus Data Broker

Building LinkedIn's Next Generation Architecture with OSGI

Eclipse Lyo Overview. Michael Fiedler, Eclipse Lyo committer IBM Corporation

OSGi. Building LinkedIn's Next Generation Architecture with OSGI

GlassFish 3.1 Admin Console Modules

Fusion Registry 9 SDMX Data and Metadata Management System

Java Platform, Enterprise Edition 6 with Extensible GlassFish Application Server v3

Distributing JavaFX Applications with Java WebStart and Artifactory

MAVEN MOCK TEST MAVEN MOCK TEST I

Topics covered. Introduction to Maven Maven for Dependency Management Maven Lifecycles and Plugins Hands on session. Maven 2

SpringSource Tool Suite 2.7.1

wcm.io Context-Aware Configuration

SOA Software Policy Manager Agent v6.1 for WebSphere Application Server Installation Guide

TM DevOps Use Case. 2017TechMinfy All Rights Reserved

Accelerate innovation around your banking services

Administration Console Extension Developer's Guide

ArcGIS for Server: Administration and Security. Amr Wahba

KS CM 2.0 Implementation and Deployment Guide

Transcription:

Managing Installations and Provisioning of OSGi Applications Carsten Ziegeler cziegeler@apache.org

About Member of the ASF Current PMC Chair of Apache Sling Apache Sling, Felix, ACE, Portals (Incubator, Cocoon, Excalibur, Commons) RnD Team at Adobe Research Switzerland Article/Book Author, Conference Speaker Technical Reviewer JSR 286 Spec Group (Portlet API 2.0) 2

Agenda 1 Motivation 2 Apache Sling Launchpad 3 Apache Sling OSGi Installer 4 Apache Sling Maven Launchpad Plugin 5 Needful Things 6 Summary 7 The End 3

Example Application

Motivation I Modularity is key Manage growing complexity Support dynamic extensibility Embrace change Embrace OSGi Only a few concepts easy to get started Minor overhead High coherence Loose Coupling Modules and Services 5

Motivation II OSGi is everywhere! State of the Art solution for modularity in Java Ongoing and evolving development Cloud, Enterprise etc. Modules are fine, but what about? Assembling an application Deployment Provisioning (Development) 6

Apache Sling Secret Facts Apache Sling provides ecosystem Launchpad Launchpad Maven Plugin Partial Bundle Lists OSGi Installer Installer Providers Installer Factories And more 7

Example Application 8

Old Fashioned: I Have a Bunch of JARs WE R H IR I N G JO B S- BA S EL @AD OBE 9

Standalone App or Webapp - Main class - Classpath: - Web application archive - web-inf/lib: WE R H IR WE R H IR I N G JO B I N G JO B S- BA S EL @AD OBE S- BA S EL @AD OBE 10

I Have OSGi Bundles and now? WE R H IR I N G JO B S- BA S EL @AD OBE 11

OSGi Standalone App or OSGi Webapp - Main class starts OSGi framework and deploys bundles - Classpath: - OSGi framework - Bootstrap code - Web application archive - Servlet starts OSGi framework and deploys bundles - web-inf/lib contains - OSGi framework - Bootstrap code Bundles: WE R H IR I N G JO B S- BA S EL @AD OBE 12

Apache Sling Launchpad Bootstrap code Launch an OSGi framework Standalone jar with http service As a web application with http bridge Includes Apache Felix Handles framework updates Deploy packaged bundles Configurable sling.properties (system properties / servlet parameters) 13

OSGi Standalone App or OSGi Webapp with Launchpad JAR File Launchpad Main Bootstrap Code OSGi Framewok OSGi HTTP Service sling.properties Deployable Artifacts WAR File Launchpad Servlet Bootstrap Code OSGi Framewok HTTP Bridge sling.properties Deployable Artifacts WE R H IR WE R H IR I N G JO B I N G JO B S- BA S EL @AD OBE S- BA S EL @AD OBE 14

Apache Sling Properties Central configuration file OSGi framework configuration System packages Framework Start level Bootstrap logging Configurations which should be there before the configuration admin is available 15

Packaged Artifacts Bootstrap bundles Directly installed by the Sling Launchpad E.g. logging, Apache Sling OSGi installer etc. Start levels can be used Advice: only bootstrapping bundles! Optional Bootstrap command file Uninstalling bundles for upgrades 16

Example Sling Launchpad JAR Created by the launchpad maven plugin: > jar tf launchpad-sample.jar org/apache/sling/launchpad/app/main.class org/apache/sling/launchpad/base/shared/launcher.class resources/bundles/1/org.apache.sling.commons.log-3.0.0.jar resources/bundles/1/slf4j-api-1.6.4.jar resources/bundles/1/org.apache.sling.installer.core-3.4.0.jar resources/org.apache.sling.launchpad.base.jar 17

Example Application 18

Apache Sling OSGi Installer Bundled service for Install Update Uninstall Of Bundles Configurations Custom artifacts 19

Apache Sling OSGi Installer Providers File Provider Launchpad Provider Add/Remove Update State & Artifact DB OSGi Installer Artifact Transformers and Task Factories Config Admin Transf ormed Artifact JCR Provider Artifact Bundles 20

Installer Providers Just provide artifacts or inform about removal Don t need knowledge about artifacts Simple trackers 21

Apache Sling Installer File Provider Service for monitoring directories in the file system Configurable through sling.properties (and system properties) Informs the OSGi Installer about Add Update Delete Of artifacts Like Apache Felix FileInstall but delegates work! 22

Apache Sling Installer JCR Provider Support for Java Content Repository (Apache Jackrabbit) Service for monitoring nodes in the JCR Configurable through Config Admin Informs the OSGi Installer about Add Update Delete Of artifacts 23

Transformers Transformers inspect artifacts Detect artifact type Bundle, configuration etc. Might transform artifact Provide unique id Symbolic name + version Configuration PID 24

Installer Task Factories Register for artifact types Get transformed artifacts or removal event Perform their task OSGi Installer manages retry and failure A task might add another task Like bundle refresh after all installs etc. 25

Advantages of the OSGi Installer Family Pluggable and highly customizable New artifact types: transformer + task factory New artifact sources: provider Retry mechanism in the OSGi core State management in the OSGi core 26

Example I Always Install Highest Version Install directory: - Bundle A, version 1.0 - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.2 Install directory: Installed Bundle: Time - Bundle A, version 1.2 - Bundle A, version 1.2 Install directory: - Bundle A, version 1.0 - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.2 Install directory: - Bundle A, version 1.0 Installed Bundle: - Bundle A, version 1.0 27

Example II State Management Install directory: - Bundle A, version 1.0 - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.2 Time User Installs through Web Console: - Bundle A, version 1.4 Installed Bundle: - Bundle A, version 1.4 Install directory: - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.4 Install directory: - Bundle A, version 1.0 Installed Bundle: - Bundle A, version 1.4 28

Example III State Management + Highest Version Install directory: - Bundle A, version 1.0 - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.2 Time User Installs through Web Console: - Bundle A, version 1.1 Installed Bundle: - Bundle A, version 1.1 Install directory: Installed Bundle: - Bundle A, version 1.1 Install directory: - Bundle A, version 1.2 Installed Bundle: - Bundle A, version 1.2 29

Change Notification Many different tools for managing bundles and configurations OSGi Installer, shell, web console etc. OSGi Installer checks for changes from other sources When getting changes from a provider Supports write back of external changes: Currently configurations only Provider might support write back of changes File and JCR provider do! 30

Apache Sling OSGi Installer Central mechanism for handling Install Update Delete No dependencies except OSGi framework Triggered by various providers Highly customizable through transformers and task factories 31

Apache Sling Installer Launchpad Provider Informs the OSGi Installer about Artifacts bundled with the launchpad Scans predefined directories inside launchpad Supports start level Very handy for provisioning in combination with the Maven Launchpad Plugin 32

Example Application 33

Contents of a Deliverable A deliverable / distribution consists of Apache Sling Launchpad OSGi framework Bootstrap bundles Infrastructure bundles Application bundles Configurations (Custom artifacts) 34

Apache Sling Maven Launchpad Plugin Creates two artifacts for a Maven project Standalone jar Web application Use Apache Sling Launchpad Base Module Launchpad Code OSGi framework Predefined sling.properties 35

Bundle List XML Configuration for the Maven plugin Contains list of bundles with their start levels boot : bootstrap bundles handled by Launchpad N : Bundle with start level N handled by OSGi installer and Launchpad Provider 0 : Bundle with default framework start level Bundle list can contain other artifact types! 36

Bundle List Example <?xml version="1.0"?> <bundles> <startlevel level="boot"> <bundle> <groupid>org.apache.sling</groupid> <artifactid>org.apache.sling.commons.log</artifactid> <version>2.1.2</version> </bundle> <startlevel level="9"> <bundle> <groupid>org.apache.felix</groupid> <artifactid>org.apache.felix.eventadmin</artifactid> <version>1.3.2</version> </bundle> <startlevel level="0"> <bundle> <groupid>org.some.company</groupid> <artifactid>a.strange.artifact</artifactid> <version>1.2.0</version> <type>zip</zip> </bundle> 37

OSGi Standalone App or OSGi Webapp with Launchpad JAR File Launchpad Main Bootstrap Code OSGi Framewok OSGi HTTP Service sling.properties Bootstrap Bundles: Logging, OSGi Installer Launchpad Installer Provider Launchpad Installer Artifacts: Infrastructure bundles Application bundles Configurations (Custom Artifacts) WAR File Launchpad Servlet Bootstrap Code OSGi Framewok HTTP Bridge sling.properties Bootstrap Bundles: Logging, OSGi Installer Launchpad Installer Provider Launchpad Installer Artifacts: Infrastructure bundles Application bundles Configurations (Custom Artifacts) 38

Partial Bundle List aka Feature List Maven artifact for A bundle list Configurations Additional sling.properties Additional bootstrap commands Final deliverable can aggregate partial bundle lists 39

Apache Sling Maven Launchpad Plugin Configurated with Launchpad base artifact Bundle list (+ partial bundle lists) OSGi configurations Additional sling.properties Common, standalone, webapp Bootstrap command file Common, standalone, webapp Creates the deliverable 40

Example Application 41

Apache Sling Settings Service Unique instance id : Sling ID Created on first installation Run mode support Can be used for different setups like Prod, dev, test etc. Supported by the OSGi installer providers Sling home directory If something needs to be stored outside bundle data 42

Launchpad Features Startup mode detection First install, restart, update Start level handling for install/restart Start level is increased one by one Waits for OSGi installer to finish on each level Reports startup progress 43

Example Application 44

Apache Sling OSGi Installer + Launchpad Creating a distribution is easy Standalone jar files Web application Bootstrap bundles get packaged into launchpad Including OSGi installer and friends Leveraging JCR Installer (or others) Maven Launchpad Plugin Define your deliverable as a package list OSGi Installer can be used without Launchpad Launchpad does not need OSGi Installer 45

The End 46