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

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: [email protected]
For additional commands, e-mail: [email protected]

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.



23 May 2012 09:06
Hi,

Am 22.05.2012 um 22:52 schrieb sam ”:

Problem of multiple [email protected] [email protected]
....

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 <[email protected]>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="" -F "_noredir_=_noredir_" -F
"[email protected]" -F "bundlestart=start" -F "bundlestartlevel=20"
-F "refreshPackages=true" "http://localhost:4502/system/console/install"
curl -u admin:admin -F "action="" -F "_noredir_=_noredir_" -F
"[email protected]" -F "bundlestart=start" -F "bundlestartlevel=20"
-F "refreshPackages=true" "http://localhost:4502/system/console/install"
...
curl -u admin:admin -F "action="" -F "_noredir_=_noredir_" -F
"[email protected]" -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: [email protected]
For additional commands, e-mail: [email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

22 May 2012 21:52
Problem of multiple [email protected] [email protected]
....

is that bundles become Installed state, not Active state.





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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to