You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@felix.apache.org by sam ” <sk...@gmail.com> on 2012/05/21 15:55:41 UTC

can web console RESTful API block until installation has been finished?

Hey,

My deployment script uses curl command:
curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
"bundlefile=@bundle1.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
-F "refreshPackages=true" "http://localhost:4502/system/console/install"
curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
"bundlefile=@bundle2.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
-F "refreshPackages=true" "http://localhost:4502/system/console/install"
...
curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
"bundlefile=@bundle10.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
-F "refreshPackages=true" "http://localhost:4502/system/console/install"


Each curl command returns very fast.  Unless I put  `sleep 10`  between
curl commands,  I have to `kill -9`  felix instance.

Is there a way to configure web console so that it sends out HTTP response
only after the bundle is completely installed? It looks like I am sending
install request for bundle2.jar  while felix has not finished installing
bundle1.jar.

Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi Sam,

This is really serious.

Can you tell us which Framework version you are using ?

Regards
Felix

Am 30.05.2012 um 18:12 schrieb sam ”:

> I tried file install 3.2.0
> 
> And, I did
>    cp bundle1.jar bundle2.jar bundle3.jar /home/sam/workspace/cq-author
> 
> (-Dfelix.fileinstall.poll=/home/sam/workspace/cq-author)
> 
> And, I get...
> 
> 30.05.2012 12:08:57.258 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
> org.apache.felix.fileinstall In main loop, we have serious trouble
> (java.lang.NullPointerException) java.lang.NullPointerException
>    at
> org.apache.felix.framework.resolver.ResolverImpl.calculateExportedPackages(ResolverImpl.java:1196)
>    at
> org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:604)
>    at
> org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:611)
>    at
> org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:90)
>    at
> org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:3996)
>    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3402)
>    at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
>    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
>    at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1232)
>    at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1206)
>    at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1195)
>    at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:486)
>    at
> org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:286)
> 30.05.2012 12:08:57.266 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
> org.apache.felix.fileinstall In main loop, we have serious trouble
> (java.lang.NullPointerException) java.lang.NullPointerException
> 30.05.2012 12:08:57.273 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
> org.apache.felix.fileinstall In main loop, we have serious trouble
> (java.lang.NullPointerException) java.lang.NullPointerException
> 30.05.2012 12:08:57.280 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
> org.apache.felix.fileinstall In main loop, we have serious trouble
> (java.lang.NullPointerException) java.lang.NullPointerException
> ....
> 
> 
> 
> How can I deploy multiple bundles properly?
> 
> 
> 
> 
> 
> On Thu, May 24, 2012 at 7:40 AM, sam ” <sk...@gmail.com> wrote:
> 
>> so, I guess no one has written a multiple bundle deployment script?
>> 
>> why are there so many options?
>> 
>> what's the best way to deploy multiple bundles? of course it'll depend.
>> all different bundle deployment options and ups and downs should be
>> documented on homepage or wiki.
>> 
>> 
>> 
>> 
>> 
>> 
>> On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>> 
>>> Or use the Sling Installer in combination with the Sling file install
>>> bundle, so you can just drop your bundles into a configured dir.
>>> 
>>> Carsten
>>> 
>>> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
>>>> Hi,
>>>> 
>>>> Am 23.05.2012 um 19:06 schrieb sam ”:
>>>> 
>>>>> Ah, thanks.
>>>>> 
>>>>> Meanwhile, is there a better way to deploy 10 or so bundles?
>>>>> I can put sleeps between curl commands.. but I was wondering if
>>> there's a
>>>>> way to take felix down and rsync bundles to some location in the felix
>>>>> server.
>>>> 
>>>> You might leverage the Sling JCR Install functionality.
>>>> 
>>>> Just make sure you store the bundles in a single JCR transaction:
>>>> 
>>>>  Session s = acquireSession();
>>>>  ... store all bundles in /apps/**/install ...
>>>>  s. save();
>>>> 
>>>> Regards
>>>> Felix
>>>> 
>>>>> 
>>>>> 
>>>>> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fmeschbe@adobe.com
>>>> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Am 22.05.2012 um 22:52 schrieb sam ”:
>>>>>> 
>>>>>>> Problem of multiple -Fbundlefile=@bundle1.jar
>>>>>> -Fbundlefile=@bundlefile2.jar
>>>>>>> ....
>>>>>>> 
>>>>>>> is that bundles become Installed  state, not Active state.
>>>>>> 
>>>>>> Hmm, if you supplied the bundlestart parameter, it should start them,
>>> but
>>>>>> ....
>>>>>> 
>>>>>> Unfortunately, this is done completely wrong and I have to come back
>>> to my
>>>>>> earlier remark: The Web Console sould probably implement a proper
>>> queue for
>>>>>> installations. Because currently, even though you can upload multiple
>>>>>> bundles, each bundle will be installed in its own thread thus you are
>>> back
>>>>>> to field one.
>>>>>> 
>>>>>> I have created FELIX-3523 [1] to track that.
>>>>>> 
>>>>>> Regards
>>>>>> Felix
>>>>>> 
>>>>>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
>>> fmeschbe@adobe.com
>>>>>>> wrote:
>>>>>>> 
>>>>>>>> Hi,
>>>>>>>> 
>>>>>>>> No, the console installs the bundles asynchronously.
>>>>>>>> 
>>>>>>>> But you could upload all the bundles with a single curl command
>>> with the
>>>>>>>> bundlefile parameter repeated to list each bundle.
>>>>>>>> 
>>>>>>>> Regards
>>>>>>>> Felix
>>>>>>>> 
>>>>>>>> PS: thinking out loud, the web console could run a single thread for
>>>>>>>> installation and queue such requests ... (You might report an
>>> issue, if
>>>>>> you
>>>>>>>> like the idea ;- )
>>>>>>>> 
>>>>>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>>>>>> 
>>>>>>>>> Hey,
>>>>>>>>> 
>>>>>>>>> My deployment script uses curl command:
>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>>>>>> "bundlestartlevel=20"
>>>>>>>>> -F "refreshPackages=true" "
>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>>>>>> "bundlestartlevel=20"
>>>>>>>>> -F "refreshPackages=true" "
>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>> ...
>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>>>>>> "bundlestartlevel=20"
>>>>>>>>> -F "refreshPackages=true" "
>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
>>> between
>>>>>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>>>>>> 
>>>>>>>>> Is there a way to configure web console so that it sends out HTTP
>>>>>>>> response
>>>>>>>>> only after the bundle is completely installed? It looks like I am
>>>>>> sending
>>>>>>>>> install request for bundle2.jar  while felix has not finished
>>>>>> installing
>>>>>>>>> bundle1.jar.
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>> 
>>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>> 
>>>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Carsten Ziegeler
>>> cziegeler@apache.org
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by sam ” <sk...@gmail.com>.
I tried file install 3.2.0

And, I did
    cp bundle1.jar bundle2.jar bundle3.jar /home/sam/workspace/cq-author

(-Dfelix.fileinstall.poll=/home/sam/workspace/cq-author)

And, I get...

30.05.2012 12:08:57.258 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
org.apache.felix.fileinstall In main loop, we have serious trouble
(java.lang.NullPointerException) java.lang.NullPointerException
    at
org.apache.felix.framework.resolver.ResolverImpl.calculateExportedPackages(ResolverImpl.java:1196)
    at
org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:604)
    at
org.apache.felix.framework.resolver.ResolverImpl.calculatePackageSpaces(ResolverImpl.java:611)
    at
org.apache.felix.framework.resolver.ResolverImpl.resolve(ResolverImpl.java:90)
    at
org.apache.felix.framework.Felix$FelixResolver.resolve(Felix.java:3996)
    at org.apache.felix.framework.Felix.resolveBundle(Felix.java:3402)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:1719)
    at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:922)
    at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundle(DirectoryWatcher.java:1232)
    at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startBundles(DirectoryWatcher.java:1206)
    at
org.apache.felix.fileinstall.internal.DirectoryWatcher.startAllBundles(DirectoryWatcher.java:1195)
    at
org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:486)
    at
org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:286)
30.05.2012 12:08:57.266 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
org.apache.felix.fileinstall In main loop, we have serious trouble
(java.lang.NullPointerException) java.lang.NullPointerException
30.05.2012 12:08:57.273 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
org.apache.felix.fileinstall In main loop, we have serious trouble
(java.lang.NullPointerException) java.lang.NullPointerException
30.05.2012 12:08:57.280 *ERROR* [fileinstall-/home/sam/workspace/cq-author]
org.apache.felix.fileinstall In main loop, we have serious trouble
(java.lang.NullPointerException) java.lang.NullPointerException
....



How can I deploy multiple bundles properly?





On Thu, May 24, 2012 at 7:40 AM, sam ” <sk...@gmail.com> wrote:

> so, I guess no one has written a multiple bundle deployment script?
>
> why are there so many options?
>
> what's the best way to deploy multiple bundles? of course it'll depend.
> all different bundle deployment options and ups and downs should be
> documented on homepage or wiki.
>
>
>
>
>
>
> On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cz...@apache.org>wrote:
>
>> Or use the Sling Installer in combination with the Sling file install
>> bundle, so you can just drop your bundles into a configured dir.
>>
>> Carsten
>>
>> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
>> > Hi,
>> >
>> > Am 23.05.2012 um 19:06 schrieb sam ”:
>> >
>> >> Ah, thanks.
>> >>
>> >> Meanwhile, is there a better way to deploy 10 or so bundles?
>> >> I can put sleeps between curl commands.. but I was wondering if
>> there's a
>> >> way to take felix down and rsync bundles to some location in the felix
>> >> server.
>> >
>> > You might leverage the Sling JCR Install functionality.
>> >
>> > Just make sure you store the bundles in a single JCR transaction:
>> >
>> >   Session s = acquireSession();
>> >   ... store all bundles in /apps/**/install ...
>> >   s. save();
>> >
>> > Regards
>> > Felix
>> >
>> >>
>> >>
>> >> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fmeschbe@adobe.com
>> >wrote:
>> >>
>> >>> Hi,
>> >>>
>> >>> Am 22.05.2012 um 22:52 schrieb sam ”:
>> >>>
>> >>>> Problem of multiple -Fbundlefile=@bundle1.jar
>> >>> -Fbundlefile=@bundlefile2.jar
>> >>>> ....
>> >>>>
>> >>>> is that bundles become Installed  state, not Active state.
>> >>>
>> >>> Hmm, if you supplied the bundlestart parameter, it should start them,
>> but
>> >>> ....
>> >>>
>> >>> Unfortunately, this is done completely wrong and I have to come back
>> to my
>> >>> earlier remark: The Web Console sould probably implement a proper
>> queue for
>> >>> installations. Because currently, even though you can upload multiple
>> >>> bundles, each bundle will be installed in its own thread thus you are
>> back
>> >>> to field one.
>> >>>
>> >>> I have created FELIX-3523 [1] to track that.
>> >>>
>> >>> Regards
>> >>> Felix
>> >>>
>> >>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>> >>>
>> >>>>
>> >>>>
>> >>>>
>> >>>>
>> >>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
>> fmeschbe@adobe.com
>> >>>> wrote:
>> >>>>
>> >>>>> Hi,
>> >>>>>
>> >>>>> No, the console installs the bundles asynchronously.
>> >>>>>
>> >>>>> But you could upload all the bundles with a single curl command
>> with the
>> >>>>> bundlefile parameter repeated to list each bundle.
>> >>>>>
>> >>>>> Regards
>> >>>>> Felix
>> >>>>>
>> >>>>> PS: thinking out loud, the web console could run a single thread for
>> >>>>> installation and queue such requests ... (You might report an
>> issue, if
>> >>> you
>> >>>>> like the idea ;- )
>> >>>>>
>> >>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>> >>>>>
>> >>>>>> Hey,
>> >>>>>>
>> >>>>>> My deployment script uses curl command:
>> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>> >>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>> >>> "bundlestartlevel=20"
>> >>>>>> -F "refreshPackages=true" "
>> >>> http://localhost:4502/system/console/install"
>> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>> >>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>> >>> "bundlestartlevel=20"
>> >>>>>> -F "refreshPackages=true" "
>> >>> http://localhost:4502/system/console/install"
>> >>>>>> ...
>> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>> >>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>> >>>>> "bundlestartlevel=20"
>> >>>>>> -F "refreshPackages=true" "
>> >>> http://localhost:4502/system/console/install"
>> >>>>>>
>> >>>>>>
>> >>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
>>  between
>> >>>>>> curl commands,  I have to `kill -9`  felix instance.
>> >>>>>>
>> >>>>>> Is there a way to configure web console so that it sends out HTTP
>> >>>>> response
>> >>>>>> only after the bundle is completely installed? It looks like I am
>> >>> sending
>> >>>>>> install request for bundle2.jar  while felix has not finished
>> >>> installing
>> >>>>>> bundle1.jar.
>> >>>>>
>> >>>>>
>> >>>>>
>> ---------------------------------------------------------------------
>> >>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>>>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>>>
>> >>>>>
>> >>>
>> >>>
>> >>> ---------------------------------------------------------------------
>> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> >>> For additional commands, e-mail: users-help@felix.apache.org
>> >>>
>> >>>
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> > For additional commands, e-mail: users-help@felix.apache.org
>> >
>>
>>
>>
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>
>

Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi

Am 31.05.2012 um 16:06 schrieb sam ”:

> I'm using:
> System Bundle org.apache.felix.framework 3.0.7

Ok. So you might be hitting FELIX-2741 and/or FELIX-2822.

You might want to update the framework to 3.0.9 or newer.

> 
> It's part of CQ 5.4

If you are using CQ you might want to use the Sling JCR Install feature available with and deploy a CRX content package with your bundles, which you can also do using a cURL request.

Regards
Felix

> 
> On Thu, May 31, 2012 at 2:43 AM, Felix Meschberger <fm...@adobe.com>wrote:
> 
>> Hi,
>> 
>> Am 24.05.2012 um 13:40 schrieb sam ”:
>> 
>>> so, I guess no one has written a multiple bundle deployment script?
>>> 
>>> why are there so many options?
>> 
>> Because there are so many needs and there just are so many options. The
>> right one always depends on your requirements.
>> 
>> Regards
>> Felix
>> 
>>> 
>>> what's the best way to deploy multiple bundles? of course it'll depend.
>> all
>>> different bundle deployment options and ups and downs should be
>> documented
>>> on homepage or wiki.
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cziegeler@apache.org
>>> wrote:
>>> 
>>>> Or use the Sling Installer in combination with the Sling file install
>>>> bundle, so you can just drop your bundles into a configured dir.
>>>> 
>>>> Carsten
>>>> 
>>>> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
>>>>> Hi,
>>>>> 
>>>>> Am 23.05.2012 um 19:06 schrieb sam ”:
>>>>> 
>>>>>> Ah, thanks.
>>>>>> 
>>>>>> Meanwhile, is there a better way to deploy 10 or so bundles?
>>>>>> I can put sleeps between curl commands.. but I was wondering if
>> there's
>>>> a
>>>>>> way to take felix down and rsync bundles to some location in the felix
>>>>>> server.
>>>>> 
>>>>> You might leverage the Sling JCR Install functionality.
>>>>> 
>>>>> Just make sure you store the bundles in a single JCR transaction:
>>>>> 
>>>>> Session s = acquireSession();
>>>>> ... store all bundles in /apps/**/install ...
>>>>> s. save();
>>>>> 
>>>>> Regards
>>>>> Felix
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <
>> fmeschbe@adobe.com
>>>>> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> Am 22.05.2012 um 22:52 schrieb sam ”:
>>>>>>> 
>>>>>>>> Problem of multiple -Fbundlefile=@bundle1.jar
>>>>>>> -Fbundlefile=@bundlefile2.jar
>>>>>>>> ....
>>>>>>>> 
>>>>>>>> is that bundles become Installed  state, not Active state.
>>>>>>> 
>>>>>>> Hmm, if you supplied the bundlestart parameter, it should start them,
>>>> but
>>>>>>> ....
>>>>>>> 
>>>>>>> Unfortunately, this is done completely wrong and I have to come back
>>>> to my
>>>>>>> earlier remark: The Web Console sould probably implement a proper
>>>> queue for
>>>>>>> installations. Because currently, even though you can upload multiple
>>>>>>> bundles, each bundle will be installed in its own thread thus you are
>>>> back
>>>>>>> to field one.
>>>>>>> 
>>>>>>> I have created FELIX-3523 [1] to track that.
>>>>>>> 
>>>>>>> Regards
>>>>>>> Felix
>>>>>>> 
>>>>>>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
>>>> fmeschbe@adobe.com
>>>>>>>> wrote:
>>>>>>>> 
>>>>>>>>> Hi,
>>>>>>>>> 
>>>>>>>>> No, the console installs the bundles asynchronously.
>>>>>>>>> 
>>>>>>>>> But you could upload all the bundles with a single curl command
>> with
>>>> the
>>>>>>>>> bundlefile parameter repeated to list each bundle.
>>>>>>>>> 
>>>>>>>>> Regards
>>>>>>>>> Felix
>>>>>>>>> 
>>>>>>>>> PS: thinking out loud, the web console could run a single thread
>> for
>>>>>>>>> installation and queue such requests ... (You might report an
>> issue,
>>>> if
>>>>>>> you
>>>>>>>>> like the idea ;- )
>>>>>>>>> 
>>>>>>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>>>>>>> 
>>>>>>>>>> Hey,
>>>>>>>>>> 
>>>>>>>>>> My deployment script uses curl command:
>>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
>> -F
>>>>>>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>>>>>>> "bundlestartlevel=20"
>>>>>>>>>> -F "refreshPackages=true" "
>>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
>> -F
>>>>>>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>>>>>>> "bundlestartlevel=20"
>>>>>>>>>> -F "refreshPackages=true" "
>>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>>> ...
>>>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
>> -F
>>>>>>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>>>>>>> "bundlestartlevel=20"
>>>>>>>>>> -F "refreshPackages=true" "
>>>>>>> http://localhost:4502/system/console/install"
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
>>>> between
>>>>>>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>>>>>>> 
>>>>>>>>>> Is there a way to configure web console so that it sends out HTTP
>>>>>>>>> response
>>>>>>>>>> only after the bundle is completely installed? It looks like I am
>>>>>>> sending
>>>>>>>>>> install request for bundle2.jar  while felix has not finished
>>>>>>> installing
>>>>>>>>>> bundle1.jar.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> 
>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>>>> 
>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> Carsten Ziegeler
>>>> cziegeler@apache.org
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by sam ” <sk...@gmail.com>.
 I'm using:
System Bundle org.apache.felix.framework 3.0.7

It's part of CQ 5.4

On Thu, May 31, 2012 at 2:43 AM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> Am 24.05.2012 um 13:40 schrieb sam ”:
>
> > so, I guess no one has written a multiple bundle deployment script?
> >
> > why are there so many options?
>
> Because there are so many needs and there just are so many options. The
> right one always depends on your requirements.
>
> Regards
> Felix
>
> >
> > what's the best way to deploy multiple bundles? of course it'll depend.
> all
> > different bundle deployment options and ups and downs should be
> documented
> > on homepage or wiki.
> >
> >
> >
> >
> >
> > On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cziegeler@apache.org
> >wrote:
> >
> >> Or use the Sling Installer in combination with the Sling file install
> >> bundle, so you can just drop your bundles into a configured dir.
> >>
> >> Carsten
> >>
> >> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
> >>> Hi,
> >>>
> >>> Am 23.05.2012 um 19:06 schrieb sam ”:
> >>>
> >>>> Ah, thanks.
> >>>>
> >>>> Meanwhile, is there a better way to deploy 10 or so bundles?
> >>>> I can put sleeps between curl commands.. but I was wondering if
> there's
> >> a
> >>>> way to take felix down and rsync bundles to some location in the felix
> >>>> server.
> >>>
> >>> You might leverage the Sling JCR Install functionality.
> >>>
> >>> Just make sure you store the bundles in a single JCR transaction:
> >>>
> >>>  Session s = acquireSession();
> >>>  ... store all bundles in /apps/**/install ...
> >>>  s. save();
> >>>
> >>> Regards
> >>> Felix
> >>>
> >>>>
> >>>>
> >>>> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <
> fmeschbe@adobe.com
> >>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> Am 22.05.2012 um 22:52 schrieb sam ”:
> >>>>>
> >>>>>> Problem of multiple -Fbundlefile=@bundle1.jar
> >>>>> -Fbundlefile=@bundlefile2.jar
> >>>>>> ....
> >>>>>>
> >>>>>> is that bundles become Installed  state, not Active state.
> >>>>>
> >>>>> Hmm, if you supplied the bundlestart parameter, it should start them,
> >> but
> >>>>> ....
> >>>>>
> >>>>> Unfortunately, this is done completely wrong and I have to come back
> >> to my
> >>>>> earlier remark: The Web Console sould probably implement a proper
> >> queue for
> >>>>> installations. Because currently, even though you can upload multiple
> >>>>> bundles, each bundle will be installed in its own thread thus you are
> >> back
> >>>>> to field one.
> >>>>>
> >>>>> I have created FELIX-3523 [1] to track that.
> >>>>>
> >>>>> Regards
> >>>>> Felix
> >>>>>
> >>>>> [1] https://issues.apache.org/jira/browse/FELIX-3523
> >>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>>
> >>>>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
> >> fmeschbe@adobe.com
> >>>>>> wrote:
> >>>>>>
> >>>>>>> Hi,
> >>>>>>>
> >>>>>>> No, the console installs the bundles asynchronously.
> >>>>>>>
> >>>>>>> But you could upload all the bundles with a single curl command
> with
> >> the
> >>>>>>> bundlefile parameter repeated to list each bundle.
> >>>>>>>
> >>>>>>> Regards
> >>>>>>> Felix
> >>>>>>>
> >>>>>>> PS: thinking out loud, the web console could run a single thread
> for
> >>>>>>> installation and queue such requests ... (You might report an
> issue,
> >> if
> >>>>> you
> >>>>>>> like the idea ;- )
> >>>>>>>
> >>>>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
> >>>>>>>
> >>>>>>>> Hey,
> >>>>>>>>
> >>>>>>>> My deployment script uses curl command:
> >>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
> -F
> >>>>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
> >>>>> "bundlestartlevel=20"
> >>>>>>>> -F "refreshPackages=true" "
> >>>>> http://localhost:4502/system/console/install"
> >>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
> -F
> >>>>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
> >>>>> "bundlestartlevel=20"
> >>>>>>>> -F "refreshPackages=true" "
> >>>>> http://localhost:4502/system/console/install"
> >>>>>>>> ...
> >>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_"
> -F
> >>>>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
> >>>>>>> "bundlestartlevel=20"
> >>>>>>>> -F "refreshPackages=true" "
> >>>>> http://localhost:4502/system/console/install"
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
> >> between
> >>>>>>>> curl commands,  I have to `kill -9`  felix instance.
> >>>>>>>>
> >>>>>>>> Is there a way to configure web console so that it sends out HTTP
> >>>>>>> response
> >>>>>>>> only after the bundle is completely installed? It looks like I am
> >>>>> sending
> >>>>>>>> install request for bundle2.jar  while felix has not finished
> >>>>> installing
> >>>>>>>> bundle1.jar.
> >>>>>>>
> >>>>>>>
> >>>>>>>
> ---------------------------------------------------------------------
> >>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>>>
> >>>>>>>
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>
> >>>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Carsten Ziegeler
> >> cziegeler@apache.org
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 24.05.2012 um 13:40 schrieb sam ”:

> so, I guess no one has written a multiple bundle deployment script?
> 
> why are there so many options?

Because there are so many needs and there just are so many options. The right one always depends on your requirements.

Regards
Felix

> 
> what's the best way to deploy multiple bundles? of course it'll depend. all
> different bundle deployment options and ups and downs should be documented
> on homepage or wiki.
> 
> 
> 
> 
> 
> On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cz...@apache.org>wrote:
> 
>> Or use the Sling Installer in combination with the Sling file install
>> bundle, so you can just drop your bundles into a configured dir.
>> 
>> Carsten
>> 
>> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
>>> Hi,
>>> 
>>> Am 23.05.2012 um 19:06 schrieb sam ”:
>>> 
>>>> Ah, thanks.
>>>> 
>>>> Meanwhile, is there a better way to deploy 10 or so bundles?
>>>> I can put sleeps between curl commands.. but I was wondering if there's
>> a
>>>> way to take felix down and rsync bundles to some location in the felix
>>>> server.
>>> 
>>> You might leverage the Sling JCR Install functionality.
>>> 
>>> Just make sure you store the bundles in a single JCR transaction:
>>> 
>>>  Session s = acquireSession();
>>>  ... store all bundles in /apps/**/install ...
>>>  s. save();
>>> 
>>> Regards
>>> Felix
>>> 
>>>> 
>>>> 
>>>> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fmeschbe@adobe.com
>>> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Am 22.05.2012 um 22:52 schrieb sam ”:
>>>>> 
>>>>>> Problem of multiple -Fbundlefile=@bundle1.jar
>>>>> -Fbundlefile=@bundlefile2.jar
>>>>>> ....
>>>>>> 
>>>>>> is that bundles become Installed  state, not Active state.
>>>>> 
>>>>> Hmm, if you supplied the bundlestart parameter, it should start them,
>> but
>>>>> ....
>>>>> 
>>>>> Unfortunately, this is done completely wrong and I have to come back
>> to my
>>>>> earlier remark: The Web Console sould probably implement a proper
>> queue for
>>>>> installations. Because currently, even though you can upload multiple
>>>>> bundles, each bundle will be installed in its own thread thus you are
>> back
>>>>> to field one.
>>>>> 
>>>>> I have created FELIX-3523 [1] to track that.
>>>>> 
>>>>> Regards
>>>>> Felix
>>>>> 
>>>>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
>> fmeschbe@adobe.com
>>>>>> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> No, the console installs the bundles asynchronously.
>>>>>>> 
>>>>>>> But you could upload all the bundles with a single curl command with
>> the
>>>>>>> bundlefile parameter repeated to list each bundle.
>>>>>>> 
>>>>>>> Regards
>>>>>>> Felix
>>>>>>> 
>>>>>>> PS: thinking out loud, the web console could run a single thread for
>>>>>>> installation and queue such requests ... (You might report an issue,
>> if
>>>>> you
>>>>>>> like the idea ;- )
>>>>>>> 
>>>>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>>>>> 
>>>>>>>> Hey,
>>>>>>>> 
>>>>>>>> My deployment script uses curl command:
>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>>>>> "bundlestartlevel=20"
>>>>>>>> -F "refreshPackages=true" "
>>>>> http://localhost:4502/system/console/install"
>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>>>>> "bundlestartlevel=20"
>>>>>>>> -F "refreshPackages=true" "
>>>>> http://localhost:4502/system/console/install"
>>>>>>>> ...
>>>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>>>>> "bundlestartlevel=20"
>>>>>>>> -F "refreshPackages=true" "
>>>>> http://localhost:4502/system/console/install"
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
>> between
>>>>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>>>>> 
>>>>>>>> Is there a way to configure web console so that it sends out HTTP
>>>>>>> response
>>>>>>>> only after the bundle is completely installed? It looks like I am
>>>>> sending
>>>>>>>> install request for bundle2.jar  while felix has not finished
>>>>> installing
>>>>>>>> bundle1.jar.
>>>>>>> 
>>>>>>> 
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>>> 
>>>>>>> 
>>>>> 
>>>>> 
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>> 
>>>>> 
>>> 
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>> 
>> 
>> 
>> 
>> --
>> Carsten Ziegeler
>> cziegeler@apache.org
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by sam ” <sk...@gmail.com>.
so, I guess no one has written a multiple bundle deployment script?

why are there so many options?

what's the best way to deploy multiple bundles? of course it'll depend. all
different bundle deployment options and ups and downs should be documented
on homepage or wiki.





On Thu, May 24, 2012 at 5:22 AM, Carsten Ziegeler <cz...@apache.org>wrote:

> Or use the Sling Installer in combination with the Sling file install
> bundle, so you can just drop your bundles into a configured dir.
>
> Carsten
>
> 2012/5/24 Felix Meschberger <fm...@adobe.com>:
> > Hi,
> >
> > Am 23.05.2012 um 19:06 schrieb sam ”:
> >
> >> Ah, thanks.
> >>
> >> Meanwhile, is there a better way to deploy 10 or so bundles?
> >> I can put sleeps between curl commands.. but I was wondering if there's
> a
> >> way to take felix down and rsync bundles to some location in the felix
> >> server.
> >
> > You might leverage the Sling JCR Install functionality.
> >
> > Just make sure you store the bundles in a single JCR transaction:
> >
> >   Session s = acquireSession();
> >   ... store all bundles in /apps/**/install ...
> >   s. save();
> >
> > Regards
> > Felix
> >
> >>
> >>
> >> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fmeschbe@adobe.com
> >wrote:
> >>
> >>> Hi,
> >>>
> >>> Am 22.05.2012 um 22:52 schrieb sam ”:
> >>>
> >>>> Problem of multiple -Fbundlefile=@bundle1.jar
> >>> -Fbundlefile=@bundlefile2.jar
> >>>> ....
> >>>>
> >>>> is that bundles become Installed  state, not Active state.
> >>>
> >>> Hmm, if you supplied the bundlestart parameter, it should start them,
> but
> >>> ....
> >>>
> >>> Unfortunately, this is done completely wrong and I have to come back
> to my
> >>> earlier remark: The Web Console sould probably implement a proper
> queue for
> >>> installations. Because currently, even though you can upload multiple
> >>> bundles, each bundle will be installed in its own thread thus you are
> back
> >>> to field one.
> >>>
> >>> I have created FELIX-3523 [1] to track that.
> >>>
> >>> Regards
> >>> Felix
> >>>
> >>> [1] https://issues.apache.org/jira/browse/FELIX-3523
> >>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <
> fmeschbe@adobe.com
> >>>> wrote:
> >>>>
> >>>>> Hi,
> >>>>>
> >>>>> No, the console installs the bundles asynchronously.
> >>>>>
> >>>>> But you could upload all the bundles with a single curl command with
> the
> >>>>> bundlefile parameter repeated to list each bundle.
> >>>>>
> >>>>> Regards
> >>>>> Felix
> >>>>>
> >>>>> PS: thinking out loud, the web console could run a single thread for
> >>>>> installation and queue such requests ... (You might report an issue,
> if
> >>> you
> >>>>> like the idea ;- )
> >>>>>
> >>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
> >>>>>
> >>>>>> Hey,
> >>>>>>
> >>>>>> My deployment script uses curl command:
> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
> >>> "bundlestartlevel=20"
> >>>>>> -F "refreshPackages=true" "
> >>> http://localhost:4502/system/console/install"
> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
> >>> "bundlestartlevel=20"
> >>>>>> -F "refreshPackages=true" "
> >>> http://localhost:4502/system/console/install"
> >>>>>> ...
> >>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
> >>>>> "bundlestartlevel=20"
> >>>>>> -F "refreshPackages=true" "
> >>> http://localhost:4502/system/console/install"
> >>>>>>
> >>>>>>
> >>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`
>  between
> >>>>>> curl commands,  I have to `kill -9`  felix instance.
> >>>>>>
> >>>>>> Is there a way to configure web console so that it sends out HTTP
> >>>>> response
> >>>>>> only after the bundle is completely installed? It looks like I am
> >>> sending
> >>>>>> install request for bundle2.jar  while felix has not finished
> >>> installing
> >>>>>> bundle1.jar.
> >>>>>
> >>>>>
> >>>>> ---------------------------------------------------------------------
> >>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>>>> For additional commands, e-mail: users-help@felix.apache.org
> >>>>>
> >>>>>
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >>> For additional commands, e-mail: users-help@felix.apache.org
> >>>
> >>>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> > For additional commands, e-mail: users-help@felix.apache.org
> >
>
>
>
> --
> Carsten Ziegeler
> cziegeler@apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: can web console RESTful API block until installation has been finished?

Posted by Carsten Ziegeler <cz...@apache.org>.
Or use the Sling Installer in combination with the Sling file install
bundle, so you can just drop your bundles into a configured dir.

Carsten

2012/5/24 Felix Meschberger <fm...@adobe.com>:
> Hi,
>
> Am 23.05.2012 um 19:06 schrieb sam ”:
>
>> Ah, thanks.
>>
>> Meanwhile, is there a better way to deploy 10 or so bundles?
>> I can put sleeps between curl commands.. but I was wondering if there's a
>> way to take felix down and rsync bundles to some location in the felix
>> server.
>
> You might leverage the Sling JCR Install functionality.
>
> Just make sure you store the bundles in a single JCR transaction:
>
>   Session s = acquireSession();
>   ... store all bundles in /apps/**/install ...
>   s. save();
>
> Regards
> Felix
>
>>
>>
>> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fm...@adobe.com>wrote:
>>
>>> Hi,
>>>
>>> Am 22.05.2012 um 22:52 schrieb sam ”:
>>>
>>>> Problem of multiple -Fbundlefile=@bundle1.jar
>>> -Fbundlefile=@bundlefile2.jar
>>>> ....
>>>>
>>>> is that bundles become Installed  state, not Active state.
>>>
>>> Hmm, if you supplied the bundlestart parameter, it should start them, but
>>> ....
>>>
>>> Unfortunately, this is done completely wrong and I have to come back to my
>>> earlier remark: The Web Console sould probably implement a proper queue for
>>> installations. Because currently, even though you can upload multiple
>>> bundles, each bundle will be installed in its own thread thus you are back
>>> to field one.
>>>
>>> I have created FELIX-3523 [1] to track that.
>>>
>>> Regards
>>> Felix
>>>
>>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <fmeschbe@adobe.com
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> No, the console installs the bundles asynchronously.
>>>>>
>>>>> But you could upload all the bundles with a single curl command with the
>>>>> bundlefile parameter repeated to list each bundle.
>>>>>
>>>>> Regards
>>>>> Felix
>>>>>
>>>>> PS: thinking out loud, the web console could run a single thread for
>>>>> installation and queue such requests ... (You might report an issue, if
>>> you
>>>>> like the idea ;- )
>>>>>
>>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>>>
>>>>>> Hey,
>>>>>>
>>>>>> My deployment script uses curl command:
>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>>> "bundlestartlevel=20"
>>>>>> -F "refreshPackages=true" "
>>> http://localhost:4502/system/console/install"
>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>>> "bundlestartlevel=20"
>>>>>> -F "refreshPackages=true" "
>>> http://localhost:4502/system/console/install"
>>>>>> ...
>>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>>> "bundlestartlevel=20"
>>>>>> -F "refreshPackages=true" "
>>> http://localhost:4502/system/console/install"
>>>>>>
>>>>>>
>>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
>>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>>>
>>>>>> Is there a way to configure web console so that it sends out HTTP
>>>>> response
>>>>>> only after the bundle is completely installed? It looks like I am
>>> sending
>>>>>> install request for bundle2.jar  while felix has not finished
>>> installing
>>>>>> bundle1.jar.
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>>
>>>>>
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>



-- 
Carsten Ziegeler
cziegeler@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 23.05.2012 um 19:06 schrieb sam ”:

> Ah, thanks.
> 
> Meanwhile, is there a better way to deploy 10 or so bundles?
> I can put sleeps between curl commands.. but I was wondering if there's a
> way to take felix down and rsync bundles to some location in the felix
> server.

You might leverage the Sling JCR Install functionality.

Just make sure you store the bundles in a single JCR transaction:

   Session s = acquireSession();
   ... store all bundles in /apps/**/install ...
   s. save();

Regards
Felix

> 
> 
> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fm...@adobe.com>wrote:
> 
>> Hi,
>> 
>> Am 22.05.2012 um 22:52 schrieb sam ”:
>> 
>>> Problem of multiple -Fbundlefile=@bundle1.jar
>> -Fbundlefile=@bundlefile2.jar
>>> ....
>>> 
>>> is that bundles become Installed  state, not Active state.
>> 
>> Hmm, if you supplied the bundlestart parameter, it should start them, but
>> ....
>> 
>> Unfortunately, this is done completely wrong and I have to come back to my
>> earlier remark: The Web Console sould probably implement a proper queue for
>> installations. Because currently, even though you can upload multiple
>> bundles, each bundle will be installed in its own thread thus you are back
>> to field one.
>> 
>> I have created FELIX-3523 [1] to track that.
>> 
>> Regards
>> Felix
>> 
>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>> 
>>> 
>>> 
>>> 
>>> 
>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <fmeschbe@adobe.com
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> No, the console installs the bundles asynchronously.
>>>> 
>>>> But you could upload all the bundles with a single curl command with the
>>>> bundlefile parameter repeated to list each bundle.
>>>> 
>>>> Regards
>>>> Felix
>>>> 
>>>> PS: thinking out loud, the web console could run a single thread for
>>>> installation and queue such requests ... (You might report an issue, if
>> you
>>>> like the idea ;- )
>>>> 
>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>> 
>>>>> Hey,
>>>>> 
>>>>> My deployment script uses curl command:
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>> ...
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>> 
>>>>> 
>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>> 
>>>>> Is there a way to configure web console so that it sends out HTTP
>>>> response
>>>>> only after the bundle is completely installed? It looks like I am
>> sending
>>>>> install request for bundle2.jar  while felix has not finished
>> installing
>>>>> bundle1.jar.
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>> 
>>>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by Marcel Offermans <ma...@luminis.nl>.
On May 23, 2012, at 19:49 , Neil Bartlett wrote:

> 2) Allow the REST interface to receive a zip of bundles; it would install and then start all of the enclosed bundles as a unit.

Or take a look at DeploymentAdmin and use that to install and update collections of bundles in a single transaction. This also has the benefit of being able to roll it back if anything fails halfway.

3) Receive all the JARs and cache them on disk or in memory on the server, and feed all of them to some kind of SerialExecutor that ensures they all get processed serially.

Greetings, Marcel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by Neil Bartlett <nj...@gmail.com>.
I don't believe FileInstall is a solution, since it also installs and 
starts bundles individually rather than in bulk.

To do this properly you need a server side solution, possibly an 
enhancement to the existing REST interface. I would propose one of the 
following:

1) Make the install operation (which presumably is modelled as an HTTP 
POST) return the bundle ID of each bundle it installs. Then create a 
second operation that starts a bundle based on its ID; probably this 
would be a subsequent PUT.

2) Allow the REST interface to receive a zip of bundles; it would 
install and then start all of the enclosed bundles as a unit.

Regards
Neil

> Ali Naddaf <ma...@gmail.com>
> 23 May 2012 18:09
> If you want to go that route, you can use something like the 
> FileInstall 
> (http://felix.apache.org/site/apache-felix-file-install.html) bundle 
> and copy your stuff over to the directory that this bundle watches...
> HTH,
> Ali.
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
> sam ” <ma...@gmail.com>
> 23 May 2012 18:06
> Ah, thanks.
>
> Meanwhile, is there a better way to deploy 10 or so bundles?
> I can put sleeps between curl commands.. but I was wondering if there's a
> way to take felix down and rsync bundles to some location in the felix
> server.
>
>
>
> Felix Meschberger <ma...@adobe.com>
> 23 May 2012 09:06
> Hi,
>
> Am 22.05.2012 um 22:52 schrieb sam ”:
>
>> Problem of multiple -Fbundlefile=@bundle1.jar -Fbundlefile=@bundlefile2.jar
>> ....
>>
>> is that bundles become Installed  state, not Active state.
>
> Hmm, if you supplied the bundlestart parameter, it should start them, but ....
>
> Unfortunately, this is done completely wrong and I have to come back to my earlier remark: The Web Console sould probably implement a proper queue for installations. Because currently, even though you can upload multiple bundles, each bundle will be installed in its own thread thus you are back to field one.
>
> I have created FELIX-3523 [1] to track that.
>
> Regards
> Felix
>
> [1] https://issues.apache.org/jira/browse/FELIX-3523
>
>>
>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger<fm...@adobe.com>wrote:
>>
>>> Hi,
>>>
>>> No, the console installs the bundles asynchronously.
>>>
>>> But you could upload all the bundles with a single curl command with the
>>> bundlefile parameter repeated to list each bundle.
>>>
>>> Regards
>>> Felix
>>>
>>> PS: thinking out loud, the web console could run a single thread for
>>> installation and queue such requests ... (You might report an issue, if you
>>> like the idea ;- )
>>>
>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>
>>>> Hey,
>>>>
>>>> My deployment script uses curl command:
>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
>>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
>>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>>> ...
>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>> "bundlestartlevel=20"
>>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>>>
>>>>
>>>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>
>>>> Is there a way to configure web console so that it sends out HTTP
>>> response
>>>> only after the bundle is completely installed? It looks like I am sending
>>>> install request for bundle2.jar  while felix has not finished installing
>>>> bundle1.jar.
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>> For additional commands, e-mail: users-help@felix.apache.org
>>>
>>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
> sam ” <ma...@gmail.com>
> 22 May 2012 21:52
> Problem of multiple -Fbundlefile=@bundle1.jar 
> -Fbundlefile=@bundlefile2.jar
> ....
>
> is that bundles become Installed state, not Active state.
>
>
>
>
>
> Felix Meschberger <ma...@adobe.com>
> 21 May 2012 15:06
> Hi,
>
> No, the console installs the bundles asynchronously.
>
> But you could upload all the bundles with a single curl command with 
> the bundlefile parameter repeated to list each bundle.
>
> Regards
> Felix
>
> PS: thinking out loud, the web console could run a single thread for 
> installation and queue such requests ... (You might report an issue, 
> if you like the idea ;- )
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>

Re: can web console RESTful API block until installation has been finished?

Posted by Ali Naddaf <al...@gmail.com>.
If you want to go that route, you can use something like the FileInstall 
(http://felix.apache.org/site/apache-felix-file-install.html) bundle and 
copy your stuff over to the directory that this bundle watches...
HTH,
Ali.

On 05/23/2012 12:06 PM, sam ” wrote:
> Ah, thanks.
>
> Meanwhile, is there a better way to deploy 10 or so bundles?
> I can put sleeps between curl commands.. but I was wondering if there's a
> way to take felix down and rsync bundles to some location in the felix
> server.
>
>
> On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger<fm...@adobe.com>wrote:
>
>> Hi,
>>
>> Am 22.05.2012 um 22:52 schrieb sam ”:
>>
>>> Problem of multiple -Fbundlefile=@bundle1.jar
>> -Fbundlefile=@bundlefile2.jar
>>> ....
>>>
>>> is that bundles become Installed  state, not Active state.
>> Hmm, if you supplied the bundlestart parameter, it should start them, but
>> ....
>>
>> Unfortunately, this is done completely wrong and I have to come back to my
>> earlier remark: The Web Console sould probably implement a proper queue for
>> installations. Because currently, even though you can upload multiple
>> bundles, each bundle will be installed in its own thread thus you are back
>> to field one.
>>
>> I have created FELIX-3523 [1] to track that.
>>
>> Regards
>> Felix
>>
>> [1] https://issues.apache.org/jira/browse/FELIX-3523
>>
>>>
>>>
>>>
>>> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger<fmeschbe@adobe.com
>>> wrote:
>>>
>>>> Hi,
>>>>
>>>> No, the console installs the bundles asynchronously.
>>>>
>>>> But you could upload all the bundles with a single curl command with the
>>>> bundlefile parameter repeated to list each bundle.
>>>>
>>>> Regards
>>>> Felix
>>>>
>>>> PS: thinking out loud, the web console could run a single thread for
>>>> installation and queue such requests ... (You might report an issue, if
>> you
>>>> like the idea ;- )
>>>>
>>>> Am 21.05.2012 um 15:55 schrieb sam ”:
>>>>
>>>>> Hey,
>>>>>
>>>>> My deployment script uses curl command:
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>> ...
>>>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>>>> "bundlestartlevel=20"
>>>>> -F "refreshPackages=true" "
>> http://localhost:4502/system/console/install"
>>>>>
>>>>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
>>>>> curl commands,  I have to `kill -9`  felix instance.
>>>>>
>>>>> Is there a way to configure web console so that it sends out HTTP
>>>> response
>>>>> only after the bundle is completely installed? It looks like I am
>> sending
>>>>> install request for bundle2.jar  while felix has not finished
>> installing
>>>>> bundle1.jar.
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>>>> For additional commands, e-mail: users-help@felix.apache.org
>>>>
>>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>>
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by sam ” <sk...@gmail.com>.
Ah, thanks.

Meanwhile, is there a better way to deploy 10 or so bundles?
I can put sleeps between curl commands.. but I was wondering if there's a
way to take felix down and rsync bundles to some location in the felix
server.


On Wed, May 23, 2012 at 4:06 AM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> Am 22.05.2012 um 22:52 schrieb sam ”:
>
> > Problem of multiple -Fbundlefile=@bundle1.jar
> -Fbundlefile=@bundlefile2.jar
> > ....
> >
> > is that bundles become Installed  state, not Active state.
>
> Hmm, if you supplied the bundlestart parameter, it should start them, but
> ....
>
> Unfortunately, this is done completely wrong and I have to come back to my
> earlier remark: The Web Console sould probably implement a proper queue for
> installations. Because currently, even though you can upload multiple
> bundles, each bundle will be installed in its own thread thus you are back
> to field one.
>
> I have created FELIX-3523 [1] to track that.
>
> Regards
> Felix
>
> [1] https://issues.apache.org/jira/browse/FELIX-3523
>
> >
> >
> >
> >
> > On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <fmeschbe@adobe.com
> >wrote:
> >
> >> Hi,
> >>
> >> No, the console installs the bundles asynchronously.
> >>
> >> But you could upload all the bundles with a single curl command with the
> >> bundlefile parameter repeated to list each bundle.
> >>
> >> Regards
> >> Felix
> >>
> >> PS: thinking out loud, the web console could run a single thread for
> >> installation and queue such requests ... (You might report an issue, if
> you
> >> like the idea ;- )
> >>
> >> Am 21.05.2012 um 15:55 schrieb sam ”:
> >>
> >>> Hey,
> >>>
> >>> My deployment script uses curl command:
> >>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F
> "bundlestartlevel=20"
> >>> -F "refreshPackages=true" "
> http://localhost:4502/system/console/install"
> >>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F
> "bundlestartlevel=20"
> >>> -F "refreshPackages=true" "
> http://localhost:4502/system/console/install"
> >>> ...
> >>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> >>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
> >> "bundlestartlevel=20"
> >>> -F "refreshPackages=true" "
> http://localhost:4502/system/console/install"
> >>>
> >>>
> >>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
> >>> curl commands,  I have to `kill -9`  felix instance.
> >>>
> >>> Is there a way to configure web console so that it sends out HTTP
> >> response
> >>> only after the bundle is completely installed? It looks like I am
> sending
> >>> install request for bundle2.jar  while felix has not finished
> installing
> >>> bundle1.jar.
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> >> For additional commands, e-mail: users-help@felix.apache.org
> >>
> >>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

Am 22.05.2012 um 22:52 schrieb sam ”:

> Problem of multiple -Fbundlefile=@bundle1.jar -Fbundlefile=@bundlefile2.jar
> ....
> 
> is that bundles become Installed  state, not Active state.

Hmm, if you supplied the bundlestart parameter, it should start them, but ....

Unfortunately, this is done completely wrong and I have to come back to my earlier remark: The Web Console sould probably implement a proper queue for installations. Because currently, even though you can upload multiple bundles, each bundle will be installed in its own thread thus you are back to field one.

I have created FELIX-3523 [1] to track that.

Regards
Felix

[1] https://issues.apache.org/jira/browse/FELIX-3523

> 
> 
> 
> 
> On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <fm...@adobe.com>wrote:
> 
>> Hi,
>> 
>> No, the console installs the bundles asynchronously.
>> 
>> But you could upload all the bundles with a single curl command with the
>> bundlefile parameter repeated to list each bundle.
>> 
>> Regards
>> Felix
>> 
>> PS: thinking out loud, the web console could run a single thread for
>> installation and queue such requests ... (You might report an issue, if you
>> like the idea ;- )
>> 
>> Am 21.05.2012 um 15:55 schrieb sam ”:
>> 
>>> Hey,
>>> 
>>> My deployment script uses curl command:
>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>> ...
>>> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
>>> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
>> "bundlestartlevel=20"
>>> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
>>> 
>>> 
>>> Each curl command returns very fast.  Unless I put  `sleep 10`  between
>>> curl commands,  I have to `kill -9`  felix instance.
>>> 
>>> Is there a way to configure web console so that it sends out HTTP
>> response
>>> only after the bundle is completely installed? It looks like I am sending
>>> install request for bundle2.jar  while felix has not finished installing
>>> bundle1.jar.
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
>> For additional commands, e-mail: users-help@felix.apache.org
>> 
>> 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org


Re: can web console RESTful API block until installation has been finished?

Posted by sam ” <sk...@gmail.com>.
Problem of multiple -Fbundlefile=@bundle1.jar -Fbundlefile=@bundlefile2.jar
....

is that bundles become Installed  state, not Active state.




On Mon, May 21, 2012 at 10:06 AM, Felix Meschberger <fm...@adobe.com>wrote:

> Hi,
>
> No, the console installs the bundles asynchronously.
>
> But you could upload all the bundles with a single curl command with the
> bundlefile parameter repeated to list each bundle.
>
> Regards
> Felix
>
> PS: thinking out loud, the web console could run a single thread for
> installation and queue such requests ... (You might report an issue, if you
> like the idea ;- )
>
> Am 21.05.2012 um 15:55 schrieb sam ”:
>
> > Hey,
> >
> > My deployment script uses curl command:
> > curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> > "bundlefile=@bundle1.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
> > -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> > curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> > "bundlefile=@bundle2.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
> > -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> > ...
> > curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> > "bundlefile=@bundle10.jar" -F "bundlestart=start" -F
> "bundlestartlevel=20"
> > -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> >
> >
> > Each curl command returns very fast.  Unless I put  `sleep 10`  between
> > curl commands,  I have to `kill -9`  felix instance.
> >
> > Is there a way to configure web console so that it sends out HTTP
> response
> > only after the bundle is completely installed? It looks like I am sending
> > install request for bundle2.jar  while felix has not finished installing
> > bundle1.jar.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
> For additional commands, e-mail: users-help@felix.apache.org
>
>

Re: can web console RESTful API block until installation has been finished?

Posted by Felix Meschberger <fm...@adobe.com>.
Hi,

No, the console installs the bundles asynchronously.

But you could upload all the bundles with a single curl command with the bundlefile parameter repeated to list each bundle.

Regards
Felix

PS: thinking out loud, the web console could run a single thread for installation and queue such requests ... (You might report an issue, if you like the idea ;- )

Am 21.05.2012 um 15:55 schrieb sam ”:

> Hey,
> 
> My deployment script uses curl command:
> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> "bundlefile=@bundle1.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> "bundlefile=@bundle2.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> ...
> curl -u admin:admin -F "action=install" -F "_noredir_=_noredir_" -F
> "bundlefile=@bundle10.jar" -F "bundlestart=start" -F "bundlestartlevel=20"
> -F "refreshPackages=true" "http://localhost:4502/system/console/install"
> 
> 
> Each curl command returns very fast.  Unless I put  `sleep 10`  between
> curl commands,  I have to `kill -9`  felix instance.
> 
> Is there a way to configure web console so that it sends out HTTP response
> only after the bundle is completely installed? It looks like I am sending
> install request for bundle2.jar  while felix has not finished installing
> bundle1.jar.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@felix.apache.org
For additional commands, e-mail: users-help@felix.apache.org