Learning Apache Karaf

Book description

Everything you need to get started with installing, configuring, and administering Apache Karaf is contained in this book. All that’s required is some basic Java and you’re set to go and start developing applications using the OSGi container.

  • Understand Apache Karaf's commands and control capabilities
  • Gain familiarity with its provisioning features
  • Explore various application deployments targets experientially

In Detail

Apache Karaf is more than just an OSGi-based runtime container; it’s an ecosystem of open source technologies that makes operating and managing applications easier. Karaf supports hot deployment of OSGi bundles by monitoring jar files inside the [home]/deploy directory. Each time a jar is copied in this folder, it will be installed inside the runtime. You can then update or delete it, and changes will be handled automatically. In addition, Karaf also supports exploded bundles and custom deployers.

Learning Apache Karaf will introduce developers and administrators alike to the OSGi-based container, and impart best practices by example. The book shows you how to set up an Apache Karaf distribution, and how to arrive at a production-ready deployment. Learning Apache Karaf teaches you everything you need to install, configure, and administer Apache Karaf.

Learning Apache Karaf will help guide you through the complexity of an OSGi container using sample code and configuration snippets to demonstrate the important aspects of managing and running a Karaf instance.

Learning to install and command the runtime is just the beginning; deploying and provisioning applications is just as important to the successful implementation of a stable and scalable architecture. You will discover how to monitor runtime environments using remote access, logging, and JMX, and you will also develop production-level architectures with high availability and security.

Table of contents

  1. Learning Apache Karaf
    1. Table of Contents
    2. Learning Apache Karaf
    3. Credits
    4. About the Authors
    5. About the Reviewers
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Installing Apache Karaf
      1. Prerequisites
      2. Obtaining Apache Karaf distribution
      3. Installing Apache Karaf
      4. First boot!
      5. Summary
    9. 2. Commanding the Runtime
      1. Command Review
        1. Common commands
      2. Remote console access
        1. Apache Karaf client – a closer look
      3. Custom command creation
        1. Karaf-command-archetype
          1. Karaf custom command project
      4. JMX console
      5. Optional web console
        1. How to install and start the web console
      6. Summary
    10. 3. System Configuration and Tuning
      1. Startup properties – remote access
      2. Logging properties
        1. File logging
        2. Console logging
      3. System properties
        1. Configuring Karaf
        2. Setting environment variables
        3. Configuring hot deployment
        4. Console configuration commands
        5. Web console
        6. Failover configuration
      4. Startup properties
      5. Summary
    11. 4. Provisioning
      1. Apache Maven repositories
        1. The Karaf system repository
        2. Apache Karaf features
          1. Additional "features"
      2. Summary
    12. 5. Deploying Applications
      1. Deploying bundles
        1. Building a bundle
        2. Deploying the bundle using Maven
        3. Deploying a bundle using the file handler
        4. Deploying a bundle using HTTP
        5. Deploying a bundle using hot deployments
      2. Deploying feature descriptors
      3. Deploying non-OSGi JARs (wrap)
      4. Deploying WAR
      5. Deploying Spring/Blueprint
      6. Creating and deploying a Karaf Archive
      7. Summary
    13. 6. Deploying Production-grade Apache Karaf
      1. Offline repositories
        1. How to build an offline repository
      2. Improving application logging
      3. High availability / failover
        1. Installing Karaf as a service
        2. Master-slave failover
        3. Child instances
      4. Basic security configuration
        1. Managing roles
          1. Password encryption
        2. Locking down JMX access
      5. Summary
    14. 7. Apache Karaf Cellar
      1. Getting started
      2. Node discovery
      3. Cluster groups
      4. Cloud discovery
      5. Summary
    15. 8. Our Final Programming Project
      1. Our application
      2. A Maven build
      3. Java and OSGi code
      4. Apache Aries Blueprint
        1. Extending Apache Karaf's command system
        2. Deployment descriptors and features
      5. Summary
    16. A. Apache Karaf Commands
    17. Index

Product information

  • Title: Learning Apache Karaf
  • Author(s):
  • Release date: October 2013
  • Publisher(s): Packt Publishing
  • ISBN: 9781782172048