set configuration at start up

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

set configuration at start up


I am fairly new to Karaf and have a question regarding setting properties at start up(boils down to, is this possible and how).

My goal is to have a deployed vanilla karaf setup that when it starts up i can pass in parameter(s) or change something that karaf can use in setting its configuration so that it is unique.  What I am trying to achieve is that each instance can have its own unique configuration.  

I  was thinking that either I could pass in each parameter
I pass in a parameter to point to a different file dir for /etc and just have a couple versions available

does this make sense?

In the first case I was thinking something like:

bin/karaf  testFile

testFile containing the following:

JAVA_OPTS="-Dorg.apache.karaf.features.featuresRepositories=file:../com.service.karaf/features/standard-features.xml,file:../com.service.karaf/features/more.xml  -Dorg.apache.karaf.features.featuresBoot=config,ssh,management,kar,http,http-whiteboard,jetty,more"
export JAVA_OPTS

Am I way off base with this? is there a more direct way to achieve what i am looking for?  Am I on the right path?
I am stuck using v 2.2.7 for now  if that has any impact at all.

Thanks in advance for you time.