Hey Xilian, I'm really sorry to say this, but I don't think that there will be an easy way to do a delta-update without an explicit Karaf Feature doing this (hey, btw, wouldn't this be an idea for gsoc?). Such a feature could extract the current state of the system, download the new version, starts an external script, replaces/deletes the old files, applies the "old" state, and starts up again. This might be even kind of OK if we can always ask a user what/how he wants to do some merges. For now you don't have many options...
Basically you should always start with a new karaf instance only porting the old one to the new one... for your point 3.: use a tool like kompare or winmerge to find out how the folders had been changed and apply the correct parts for your point 2.: simple copy the deploy folder for your point 1.: only solution which jumps into my mind here is: convince your customers to write rather karaf scripts instead of direct karaf commands. That way you can simply patch-apply the install/start logic on a new server from those scripts. Not perfect, but till the -p option for *:install I don't really see another option. Kind regards, Andreas On Tue, Feb 21, 2012 at 09:44, Jean-Baptiste Onofré <j...@nanthrax.net> wrote: > Hi Xilai, > > we planned to add a -p (persistent) option to bundle:install, > feature:install, kar:install, etc, in order to store the feature/bundle in > the system folder in addition of the data folder. > > It's planned for Karaf 3.0. > > Regards > JB > > > On 02/21/2012 09:24 AM, XiLai Dai wrote: > >> Hi, Andreas, >> >> Thanks for you reply! Actually , we want to cover all the artifacts >> installation behavior from customer: >> >> 1.features/bundles which installed from console command; >> >> 2.kar (or bundle) files which deployed into deploy/ >> >> 3.configuration files (new added or modified ) in etc/ >> >> >> we want to do a delta update to upgrade the old karaf container, keeping >> all of already installed features/bundles/kar/config files be there and >> ready to work. >> >> Now the main problem is : How to recognize/reserve the customer >> installed artifacts in the data/ ? which means only clear the karaf >> system level artifacts from data/ . >> >> Thanks. >> >> Xilai >> >> *From:*Andreas Pieber [mailto:anpie...@gmail.com] >> *Sent:* Thursday, February 16, 2012 5:03 PM >> *To:* user@karaf.apache.org >> *Subject:* Re: About karaf upgrade >> >> >> OK, currently there is nothing available. And it's also quite dangerous >> to do so. I think the better approach would be to create your own >> distribution, upgrade there and produce a completely new rollout package. >> >> Still, of cause you can do as you like and it heavily depends on what >> you do. E.g. how do you deploy your artifacts? Do you have a kar >> package? Do you install those files one after the other? What you can do >> depends heavily on your setup. Basically, assume that you change nothing >> to the original karaf files the following procedure should do: >> >> a) stop karaf >> b) extract the new karaf version >> c) merge the old system & deploy dir into the new one >> d) remove the old karaf dir >> e) move the new one to the place where the old had been. >> >> Though, pls keep in mind that all bundles you've started with "start ID" >> wont start up automatically again (because you've deleted the data dir). >> Only bundles in the deploy dir will be started again. But tbh I don't >> know what exactly you would win by this approach. >> >> Maybe you can describe how you're using Karaf (and what you modify in >> the distribution for your setup) a little bin in more detail? >> >> Kind regards, >> Andreas >> >> On 02/16/2012 08:39 AM, XiLai Dai wrote: >> >> Hello, >> >> Just a question from user/production point of view, what is a better way >> to get karaf container upgrade to a new version with all of the >> features/bundles/config files existing in the old version karaf >> container? E.g. from karaf 2.2.2 -> karaf 2.2.5. it’s really boring to >> redeploy these user artifacts again manually L, are there some approach >> or tools/scripts or something else can make this process more >> “automatically”? or is it possible to have a script to upgrade existing >> karaf container which replace the system artifacts which within the >> lib/, system/ directory to the new version artifacts? Thanks! >> >> Regard >> >> Xilai >> >> > -- > Jean-Baptiste Onofré > jbono...@apache.org > http://blog.nanthrax.net > Talend - http://www.talend.com >