karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Johnson" <bradj...@redhat.com>
Subject RE: Levels of Containerization - focus on Docker and Karaf
Date Thu, 12 Jan 2017 17:31:26 GMT
That's pretty much it except it doesn't use the Kar file.  It pulls a distribution of Karaf
that has been slimmed down, installs all the bundles, configuration files, and then zips up
the entire Karaf instance with all its dependencies.  Unzip it, go to the bin directory, and
run the Karaf container.  So it may be easy to put that in a Docker container as it is generic
from the perspective of Docker and doesn't have any specific requirements - just general ones
like a JVM, a mechanism to unzip the Karaf container with dependencies, and a way to run it

All the required dependencies to run your application are in the Karaf/system folder.  Because
the dynamic install mechanisms have been removed the container is quite small.

-----Original Message-----
From: CodeCola [mailto:prasenjit@rogers.com] 
Sent: Thursday, January 12, 2017 11:01 AM
To: user@karaf.apache.org
Subject: Re: Levels of Containerization - focus on Docker and Karaf

Thanks for a great discussion especially the insights from real world deployments. This is
what I understand:

*"Static" Karaf Profiles*

Docker images should be based on a "static distribution" of Karaf generated from Profiles.
Starting from Profiles, one can generate a docker image and push it to a registry.  The image
would contain all the needed bundles and would not have to be further "provisioned".  This
resembles the "static container" idea which is the basis for Docker application packaging.

In principle, you want to have the following steps:
•	Create a Karaf feature from your application 
•	Assemble it to a kar file (a custom Karaf distribution)
•	Deploy the new Karaf package to Docker

fabric8 has a maven-plugin for doing this which is well documented.


Can be done by using the karaf maven plugin and configuring startupFeatures and referencing
the static kar, as shown in:

Karaf section about custom assembly builds https://karaf.apache.org/manual/latest/#_custom_distributions

*Naming and Packaging*
Docker will likely influence how you package and provision your Karaf distributions. For instance,
you will eventually have to provide a Docker image with a pre-configured Karaf, KAR files
in deployment folder, etc. so that your Kubernetes container may bootstrap everything on boot.
Cellar Kubernetes discovery service is a great complement to the Karaf docker.io feature (allowing
you to easily create and manage docker.io images in and for Karaf). To install the Kubernetes
discovery service, simply install cellar-kubernetes feature.
	karaf@root()> feature:install cellar-kubernetes

Question -* What is Karaf Boot?*
Could only find: https://github.com/jbonofre/karaf-boot

There isn't enough documentation!

View this message in context: http://karaf.922171.n3.nabble.com/Levels-of-Containerization-focus-on-Docker-and-Karaf-tp4049162p4049188.html
Sent from the Karaf - User mailing list archive at Nabble.com.

View raw message