Gary,
I use Features and the Karaf Maven plugin[1] to create a distribution 
containing all necessary bundles that will be used by the child instances. My 
Karaf parent and child instances are installed on servers without an internet 
connection.  What is not propagated to the child instance is the custom content 
of /etc from the parent instances.  As an example, the I set the maven 
repository list in src/main/repository/etc/org.ops4j.pax.url.mvn.cfg of the 
custom distribute project, which is placed in /etc of the parent instance but 
not the child instance. 

***
* Below is a simplified version of my installation process is a target server:
***
- Expand the custom distribution
- Start the parent instance using bin/start
- Create child instances using the instance:create command 
     instance:create --location ${user.home}/child_1 --ssh-port 8103 child_1
     instance:create --location ${user.home}/child_2 --ssh-port 8104 child_2
- Update instance specific files in /etc
- Connect to the parent instance with bin/child -u karaf
- For each child instance
   - Start and connect to the instance
       instance:start --wait  child_n
       instance:connect -u karaf -p karaf child_n 
   - Customize child instance specific properties
       config:edit org.ops4j.pax.web
       config:property-set org.osgi.service.http.port 8183
       config:property-list 
       config:update
   - Add feature repositories
       feature:repo-add mvn:org.apache.cxf.karaf/apache-cxf/3.0.2/xml/features
       feature:repo-add mvn:com.foo/my-karaf-feature/1.2.0/xml/features  
   - Install features
       feature:install transaction/1.1.1
       feature:install my-production-server

I have also created a simple Maven repository using an Apache web server to 
simplify the installation of installing and updating bundles.

Paul Spencer 

[1] 
http://karaf.apache.org/manual/latest-3.0.x/developers-guide/custom-distribution.html

> On Aug 16, 2015, at 10:32 AM, Gary Hodgson <[email protected]> wrote:
> 
> Hi,
> 
> Is there a way to create a custom distribution which contains a set of 
> pre-configured child instances? Or is this something that would require some 
> custom maven assembly work?
> 
> Thanks,
> Gary

Reply via email to