You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com> on 2015/06/16 12:05:16 UTC
Karaf installation to a read-only directory
Dear Karaf Team,
We would like to install Karaf in a directory which is read-only. By read-only I mean that no directory or file cannot be written at runtime inside the installation directory, so they must be located somewhere else.
What is the most simple way to achieve this?
Regards,
JP
PS: At present time we are using Karaf 3.0.2
[@@ OPEN @@]
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Np, you're welcome ;)
Regards
JB
On 06/16/2015 02:09 PM, CLEMENT Jean-Philippe wrote:
> Great, thank you for your support :)
>
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Envoyé : mardi 16 juin 2015 13:52
> À : user@karaf.apache.org
> Objet : Re: Karaf installation to a read-only directory
>
> By the way, I created the Jira and I gonna fix that (for instances): it will be included in next release cycle.
>
> Regards
> JB
>
> On 06/16/2015 01:47 PM, CLEMENT Jean-Philippe wrote:
>> Ok. So the most simple solution seems to set KARAF_BASE to a r/w directory and to copy the /etc directory (before making it read-only) inside.
>>
>> With that scenario, Karaf only complains about the "instances" directory which cannot be created BUT everything seems to work as expected.
>>
>> Does the "instances" failure can make any trouble?
>>
>> JP
>>
>> [@@ OPEN @@]
>>
>>
>> -----Message d'origine-----
>> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net] Envoyé : mardi 16
>> juin 2015 13:42 À : user@karaf.apache.org Objet : Re: Karaf
>> installation to a read-only directory
>>
>> It's in the way (I created the JIRA for instances location).
>>
>> It's already possible for lock.
>>
>> Regards
>> JB
>>
>> On 06/16/2015 01:18 PM, maggu2810 wrote:
>>> I am using karaf in a read only installation.
>>> - data
>>> - instances
>>> - lock
>>> This directories / file are created.
>>>
>>> It would be nice, if ALL runtime data could be written elsewhere (not
>>> only data, also instances and lock).
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-d
>>> i rectory-tp4040942p4040948.html Sent from the Karaf - User mailing
>>> list archive at Nabble.com.
>>>
>>
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: Karaf installation to a read-only directory
Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
Great, thank you for your support :)
JP
[@@ OPEN @@]
-----Message d'origine-----
De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
Envoyé : mardi 16 juin 2015 13:52
À : user@karaf.apache.org
Objet : Re: Karaf installation to a read-only directory
By the way, I created the Jira and I gonna fix that (for instances): it will be included in next release cycle.
Regards
JB
On 06/16/2015 01:47 PM, CLEMENT Jean-Philippe wrote:
> Ok. So the most simple solution seems to set KARAF_BASE to a r/w directory and to copy the /etc directory (before making it read-only) inside.
>
> With that scenario, Karaf only complains about the "instances" directory which cannot be created BUT everything seems to work as expected.
>
> Does the "instances" failure can make any trouble?
>
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net] Envoyé : mardi 16
> juin 2015 13:42 À : user@karaf.apache.org Objet : Re: Karaf
> installation to a read-only directory
>
> It's in the way (I created the JIRA for instances location).
>
> It's already possible for lock.
>
> Regards
> JB
>
> On 06/16/2015 01:18 PM, maggu2810 wrote:
>> I am using karaf in a read only installation.
>> - data
>> - instances
>> - lock
>> This directories / file are created.
>>
>> It would be nice, if ALL runtime data could be written elsewhere (not
>> only data, also instances and lock).
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-d
>> i rectory-tp4040942p4040948.html Sent from the Karaf - User mailing
>> list archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
By the way, I created the Jira and I gonna fix that (for instances): it
will be included in next release cycle.
Regards
JB
On 06/16/2015 01:47 PM, CLEMENT Jean-Philippe wrote:
> Ok. So the most simple solution seems to set KARAF_BASE to a r/w directory and to copy the /etc directory (before making it read-only) inside.
>
> With that scenario, Karaf only complains about the "instances" directory which cannot be created BUT everything seems to work as expected.
>
> Does the "instances" failure can make any trouble?
>
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Envoyé : mardi 16 juin 2015 13:42
> À : user@karaf.apache.org
> Objet : Re: Karaf installation to a read-only directory
>
> It's in the way (I created the JIRA for instances location).
>
> It's already possible for lock.
>
> Regards
> JB
>
> On 06/16/2015 01:18 PM, maggu2810 wrote:
>> I am using karaf in a read only installation.
>> - data
>> - instances
>> - lock
>> This directories / file are created.
>>
>> It would be nice, if ALL runtime data could be written elsewhere (not
>> only data, also instances and lock).
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-di
>> rectory-tp4040942p4040948.html Sent from the Karaf - User mailing list
>> archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi JP,
correct.
FYI, I introduced KARAF_ETC allowing you to put the etc folder where you
want.
It's not a big deal for instances as soon as you don't use child
instances (created with instance:* commands).
Regards
JB
On 06/16/2015 01:47 PM, CLEMENT Jean-Philippe wrote:
> Ok. So the most simple solution seems to set KARAF_BASE to a r/w directory and to copy the /etc directory (before making it read-only) inside.
>
> With that scenario, Karaf only complains about the "instances" directory which cannot be created BUT everything seems to work as expected.
>
> Does the "instances" failure can make any trouble?
>
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Envoyé : mardi 16 juin 2015 13:42
> À : user@karaf.apache.org
> Objet : Re: Karaf installation to a read-only directory
>
> It's in the way (I created the JIRA for instances location).
>
> It's already possible for lock.
>
> Regards
> JB
>
> On 06/16/2015 01:18 PM, maggu2810 wrote:
>> I am using karaf in a read only installation.
>> - data
>> - instances
>> - lock
>> This directories / file are created.
>>
>> It would be nice, if ALL runtime data could be written elsewhere (not
>> only data, also instances and lock).
>>
>>
>>
>> --
>> View this message in context:
>> http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-di
>> rectory-tp4040942p4040948.html Sent from the Karaf - User mailing list
>> archive at Nabble.com.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: Karaf installation to a read-only directory
Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
Ok. So the most simple solution seems to set KARAF_BASE to a r/w directory and to copy the /etc directory (before making it read-only) inside.
With that scenario, Karaf only complains about the "instances" directory which cannot be created BUT everything seems to work as expected.
Does the "instances" failure can make any trouble?
JP
[@@ OPEN @@]
-----Message d'origine-----
De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
Envoyé : mardi 16 juin 2015 13:42
À : user@karaf.apache.org
Objet : Re: Karaf installation to a read-only directory
It's in the way (I created the JIRA for instances location).
It's already possible for lock.
Regards
JB
On 06/16/2015 01:18 PM, maggu2810 wrote:
> I am using karaf in a read only installation.
> - data
> - instances
> - lock
> This directories / file are created.
>
> It would be nice, if ALL runtime data could be written elsewhere (not
> only data, also instances and lock).
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-di
> rectory-tp4040942p4040948.html Sent from the Karaf - User mailing list
> archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
It's in the way (I created the JIRA for instances location).
It's already possible for lock.
Regards
JB
On 06/16/2015 01:18 PM, maggu2810 wrote:
> I am using karaf in a read only installation.
> - data
> - instances
> - lock
> This directories / file are created.
>
> It would be nice, if ALL runtime data could be written elsewhere (not only
> data, also instances and lock).
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-directory-tp4040942p4040948.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: Karaf installation to a read-only directory
Posted by maggu2810 <ma...@gmail.com>.
I am using karaf in a read only installation.
- data
- instances
- lock
This directories / file are created.
It would be nice, if ALL runtime data could be written elsewhere (not only
data, also instances and lock).
--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-installation-to-a-read-only-directory-tp4040942p4040948.html
Sent from the Karaf - User mailing list archive at Nabble.com.
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Instances will be configurable soon (it's based on KARAF_BASE).
The lock location can be changed using etc/system.properties:
karaf.lock.dir
else it uses KARAF_BASE.
Regards
JB
On 06/16/2015 01:13 PM, CLEMENT Jean-Philippe wrote:
> I found there is a "instances" directory and a "lock" file which are created at runtime. On which base directory/env. variable are they created?
>
> Regards,
> JP
>
> [@@ OPEN @@]
>
>
> -----Message d'origine-----
> De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Envoyé : mardi 16 juin 2015 12:53
> À : user@karaf.apache.org
> Objet : Re: Karaf installation to a read-only directory
>
> Hi JP,
>
> 1/ KARAF_DATA has to be "writable"
> 2/ etc/system.properties has to be "writable" as it's where the shutdown command is added at first startup (it's not fixed in the meaning that it doesn't prevent the bootstrap) 3/ if you want to support update of config file (when using ConfigMBean or config:* commands), KARAF_ETC has to be writable
>
> So, just provide KARAF_DATA variable in bin/karaf to a directory where you can write and it will work (eventually KARAF_ETC too).
>
> Regards
> JB
>
> On 06/16/2015 12:05 PM, CLEMENT Jean-Philippe wrote:
>> Dear Karaf Team,
>>
>> We would like to install Karaf in a directory which is read-only. By read-only I mean that no directory or file cannot be written at runtime inside the installation directory, so they must be located somewhere else.
>>
>> What is the most simple way to achieve this?
>>
>> Regards,
>> JP
>>
>> PS: At present time we are using Karaf 3.0.2
>>
>> [@@ OPEN @@]
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
RE: Karaf installation to a read-only directory
Posted by CLEMENT Jean-Philippe <je...@fr.thalesgroup.com>.
I found there is a "instances" directory and a "lock" file which are created at runtime. On which base directory/env. variable are they created?
Regards,
JP
[@@ OPEN @@]
-----Message d'origine-----
De : Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
Envoyé : mardi 16 juin 2015 12:53
À : user@karaf.apache.org
Objet : Re: Karaf installation to a read-only directory
Hi JP,
1/ KARAF_DATA has to be "writable"
2/ etc/system.properties has to be "writable" as it's where the shutdown command is added at first startup (it's not fixed in the meaning that it doesn't prevent the bootstrap) 3/ if you want to support update of config file (when using ConfigMBean or config:* commands), KARAF_ETC has to be writable
So, just provide KARAF_DATA variable in bin/karaf to a directory where you can write and it will work (eventually KARAF_ETC too).
Regards
JB
On 06/16/2015 12:05 PM, CLEMENT Jean-Philippe wrote:
> Dear Karaf Team,
>
> We would like to install Karaf in a directory which is read-only. By read-only I mean that no directory or file cannot be written at runtime inside the installation directory, so they must be located somewhere else.
>
> What is the most simple way to achieve this?
>
> Regards,
> JP
>
> PS: At present time we are using Karaf 3.0.2
>
> [@@ OPEN @@]
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf installation to a read-only directory
Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi JP,
1/ KARAF_DATA has to be "writable"
2/ etc/system.properties has to be "writable" as it's where the shutdown
command is added at first startup (it's not fixed in the meaning that it
doesn't prevent the bootstrap)
3/ if you want to support update of config file (when using ConfigMBean
or config:* commands), KARAF_ETC has to be writable
So, just provide KARAF_DATA variable in bin/karaf to a directory where
you can write and it will work (eventually KARAF_ETC too).
Regards
JB
On 06/16/2015 12:05 PM, CLEMENT Jean-Philippe wrote:
> Dear Karaf Team,
>
> We would like to install Karaf in a directory which is read-only. By read-only I mean that no directory or file cannot be written at runtime inside the installation directory, so they must be located somewhere else.
>
> What is the most simple way to achieve this?
>
> Regards,
> JP
>
> PS: At present time we are using Karaf 3.0.2
>
> [@@ OPEN @@]
>
--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com
Re: Karaf installation to a read-only directory
Posted by Morgan Hautman <mo...@gmail.com>.
Hi Jean-Philippe,
In the shell/batch scripts located in the /bin folder there is a
variable named %KARAF_DATA% (Windows) or $KARAF_DATA (Linux).
You should change these to change the karaf/data folder.
There is also the /etc folder who can be changed to look for
configuration files.
You will need to change " felix.fileinstall.dir = ${karaf.etc} "
More info about the /etc folder here:
http://karaf.apache.org/manual/latest/users-guide/configuration.html
I don't think there is any other folder that could change.
Regards,
Morgan
On 16/06/2015 12:05, CLEMENT Jean-Philippe wrote:
> Dear Karaf Team,
>
> We would like to install Karaf in a directory which is read-only. By read-only I mean that no directory or file cannot be written at runtime inside the installation directory, so they must be located somewhere else.
>
> What is the most simple way to achieve this?
>
> Regards,
> JP
>
> PS: At present time we are using Karaf 3.0.2
>
> [@@ OPEN @@]