Presentation is loading. Please wait.

Presentation is loading. Please wait.

Deployment with Karaf and ACE

Similar presentations


Presentation on theme: "Deployment with Karaf and ACE"— Presentation transcript:

1 Deployment with Karaf and ACE
Jean-Baptiste Onofré, Talend

2 Summary Background Introduction to Karaf Introduction to ACE
ACE and Karaf Use case 1: standalone ACE server and Karaf with ACE agent (demo) Use case 2: Karaf hosting ACE server Roadmap Q&A

3 My Background Jean-Baptiste Onofré Software Architect at Talend
ASF Member PMC for Karaf, ServiceMix Committer for ACE, Camel, Kalumet

4 Introduction to Karaf Lightweight complete OSGi container, abstracting the OSGi framework (Felix or Equinox) Comes from ServiceMix Kernel High adoption (Geronimo, ServiceMix, …)

5 Karaf overview Enterprise (JPA, JNDI, JTA) WebConsole
WebContainer (Pax Web/Jetty) Instances Remote & Management ConfigAdmin Security/JAAS Shell Console Logging Deployers Features Aries Blueprint / Spring OSGi framework (Apache Felix / Eclipse Equinox) JVM

6 Karaf directory structure
/bin: startup scripts /etc: configuration files (ConfigAdmin) /data: working directory /data/cache: OSGi framework bundle cache /data/generated-bundles: temporary folder used by the deployer /data/log: log files /deploy: hot deploy directory /instances: directory containing child instances /lib: contains the bootstrap libraries /lib/ext: directory for JRE extensions /lib/endorsed: directory for endorsed libraries /system: OSGi bundles repository (OBR), laid out as a Maven 2 repository

7 Karaf start/stop Starting Karaf with the shell:
> ./bin/karaf Starting Karaf without shell: > ./bin/karaf server Starting Karaf in background: > ./bin/start Stopping Karaf: osgi:shutdown > ./bin/stop

8 Karaf shell console Complete Unix-like shell environment: completion, grep, more, find, etc Remote using SSH (Karaf uses Mina SSHd) Contextual help on commands: <tab>Display all 182 possibilities? (y or n) *:help addurl admin:change-opts admin:change-rmi-registry-port admin:change-ssh-port admin:connect admin:create admin:destroy admin:list admin:rename admin:start admin:stop bundle-level cancel cat features:list --help

9 Karaf Logging Powerful logging system powered by OPS4J PAX Logging
Supports several logging API: Apache Commons Logging, SLF4J, Apache Log4j, Java Util Logging Karaf provides commands: log:display, log:display-exception, log:set Use of etc/org.ops4j.pax.logging.cfg by default (changes are dynamic)

10 Karaf child instances Karaf supports multiple child instances.
A child instance is a copy that you can launch separately and deploy applications into. An instance is not a full copy of Karaf, but only a copy of the configuration files and data folder which contains all the runtime information, logs and temporary files Instances are managed by the « admin » commands: admin:list, admin:create, admin:start, ... The bin/admin script allows you to manipulate child instances outside a Karaf shell environment Karaf supports multiple child instances. A child instance is a copy that you can launch separately and deploy applications into. An instance is not a full copy of Karaf, but only a copy of the configuration files and data folder which contains all the runtime information, logs and temporary files Instances are managed by the « admin » commands: admin:list, admin:create, admin:start, ... The bin/admin script allows you to manipulate child instances outside a Karaf shell environment

11 Karaf configuration Karaf combines ConfigAdmin and FileInstance to be able to propagate changes on the configuration files to the bundles Files in /etc folder are used to set the startup configuration. For dynamic configuration, Karaf provides commands to administer the OSGi configuration service: config:edit, config:proplist, etc Support of commit and rollback: config:update, config:cancel Provides an MBean dedicated for configuration.

12 Karaf deployers Karaf monitor the deploy folder by default (FileInstall) and delegates the polled files to the deployers A deployer is simply a bundle, easy to create Karaf provides several deployer: Spring, Feature, Kar, War, Wrap

13 Karaf features Karaf provisioning is made by Features
A Karaf feature is a collection of bundles, configuration, and others features forming an application Features are described in a XML features descriptor <features xmlns=' <feature name='my' version='1.0'> <feature>other</feature> <bundle>mvn:...bundleA</bundle> <bundle> <config></config> <configfile></configfile> </feature> </features>

14 Introduction to ACE Handle dependency management Deployment management
Software distribution framework providing Handle dependency management Deployment management Log reporting

15 ACE topology ACE server including repository, distribution, etc
A set of target system where the ACE agent is running A client (browser or REST) to handle the ACE server console

16 ACE logical grouping ACE feature is like a Karaf feature but only handling bundles: it's a group of bundles ACE distribution is a group of features ACE target is where the ACE agent is running: it's where distributions will be deployed

17 ACE and Karaf ACE provides Karaf features
ACE agent easily deployable in Karaf using the ace-agent feature ACE also provides all Karaf features to deploy the ACE server in Karaf

18 Use case 1 Standalone ACE server: Install ACE agent in Karaf:
unzip org.apache.ace.target.devserver*.zip cd ace-devserver ./run.sh Install ACE agent in Karaf: admin:create testing admin:set-opts testing “-Didentification=testing” admin:connect testing features:addurl mvn:org.apache.ace.karaf/apache-ace/0.8.1-incubator-SNAPSHOT/xml/features features:install ace-agent Started management agent. Target ID : testing Server : Sync interval: 2000 ms Unaffected bundles will not be stopped during deployment.

19 Use case 2 ACE server distribution powered by Karaf:
features:addurl mvn:org.apache.ace.karaf/apache-ace/0.8.1-incubator-SNAPSHOT/xml/features features:install ace-server Will be in the ACE provided distributions

20 Roadmap Extend/enhance ACE feature/distribution to be able to directly support Karaf features Leverage Karaf sub-projects in ACE: Karaf Cellar clustering, Karaf Cave OBR Embed ACE in Apache Kalumet to provide a complete deployment platform (OSGi, J2EE, OS, etc)

21 Sources Links http://karaf.apache.org http://incubator.apache.org/ace

22 Contact Jean-Baptiste (JB) Onofré Q&A jbonofre@apache.org
Q&A


Download ppt "Deployment with Karaf and ACE"

Similar presentations


Ads by Google