You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Gary Hodgson <ga...@gmail.com> on 2015/08/16 16:32:41 UTC
Custom distribution with child instances?
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
Re: Custom distribution with child instances?
Posted by garyhodgson <co...@garyhodgson.com>.
Hi guys,
Thanks for the replies, particularly your simplified installation steps
Paul! I'll get on with defining a similar deployment mechanism.
Thanks,
Gary
--
View this message in context: http://karaf.922171.n3.nabble.com/Custom-distribution-with-child-instances-tp4041884p4041893.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Custom distribution with child instances?
Posted by Paul Spencer <pa...@apache.org>.
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 <ga...@gmail.com> 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
Re: Custom distribution with child instances?
Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi Gary,
sounds like you'll need some custom maven assembly here.
regards, Achim
2015-08-16 16:32 GMT+02:00 Gary Hodgson <ga...@gmail.com>:
> 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
>
--
Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>
Software Architect / Project Manager / Scrum Master