Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] Install features & bundles to separate location than RCP product

Sure... and thanks for the reply.
 
I'm trying to add, update, and remove features/bundles from a base RCP installation. The base RCP installation, which is located on a mounted drive, is effectively read-only, including its configuration, features, plugins, and p2 directories. I don't have any control over the installation since it's streamed to the mounted location by a Citrix process in a virtual desktop.
 
I've already built a "provisioning" plug-in that uses the provisioning APIs to install, uninstall, and update IUs at runtime via commands sent from a help desk portal. For example, if a help desk agent specifies that User A is authorized to use xyz.feature, the provisioning plug-in 1) receives an installation command from the portal, 2) looks up the IProvisioningAgent, 3) gets the default IProfile, 4) creates a ProvisioningSession, and 5) executes an InstallationOperation. In a way, my base RCP app acts like an Apple O/S, except that an external actor (the help desk) decides which "apps" (i.e., features/bundles) get installed and started. And that's the way my customer wants the RCP app to behave: automated provisioning at runtime based on user roles and identity.
 
If I start my RCP from a manually installed, writable location, it works just fine. The bundles install and start as expected. Everything coded so far assumes that the installation's configuration, p2, features, and plugins directories can be modified. Naturally, running the same provisioning operations against the read-only installation doesn't work.
 
At that point I started to explore whether the p2 and installed IUs could be separated from the base RCP installation. The only thing I could find was the -share option of the org.eclipse.equinox.p2.director. At least it showed me that my IUs could be installed separately and still show up in the launched RCP app. However, I'd obviously prefer NOT to execute a command from a separate Java process if the same "share" logic could be executed through the provisioning API instead.
 
I have a script that copies the base p2 directory to a readable location, whereby I can install additional features/bundles via the org.eclipse.equinox.p2.director. To do that, I specify a eclipse.p2.data.area=c:\MyRCPApp\runtime\p2_citrix, set -destination as my base RCP installation, and -share as c:\MyRCPApp\runtime\p2_citrix. After starting the RCP app, the newly provisioned UIs appear show up properly in the plug-in registry. Here's an example of the director command (which is executed from a script via a Citrix process):
 
    d:\Program Files\Citrix\RadeCache\8eb777cc-3...\Scripts>c:\eclipse-3.7\eclipse.exe -application org.eclipse.equinox.p2.director -repository http://some-domain/repo -installIU my.test.thingy.feature.group -tag TestInstall -destination  d:\Program Files\Citrix\RadeCache\8eb777cc-3...\Device\C\MyRCPApp -profile DefaultProfile -shared c:\MyRCPApp\runtime\p2_citrix
 

Now, how might I use the provisioning API to do the same thing (at runtime)?
 
An IProvisioningAgent is based on a specific p2 URL. As it stands now, it just grabs the DefaultProfile, which references the read-only installation. How might I make it reference 2 different installations during an InstallationOperation: one for the read-only installation and the other for the installed IUs?
 
Thanks,
Chip


 
-----Original Message-----
From: Pascal Rapicault <pascal.rapicault@xxxxxxxxxxxx>
To: p2-dev <p2-dev@xxxxxxxxxxx>
Sent: Tue, Apr 16, 2013 12:22 pm
Subject: Re: [p2-dev] Install features & bundles to separate location than RCP product

Hi,
 
When p2 is running in a shared install mode  (which happens when eclipse is installed in a read-only folder), the user can not cause an update of the base (what is read only), so could you explain what it is you are trying to achieve?
 
Thx
 
Pascal
 
 
From: Chip Downs <chipperdowns@xxxxxxx>
Subject: Re: [p2-dev] Install features & bundles to separate location than RCP product
Date: 15 April, 2013 10:59:44 AM EDT
Reply-To: P2 developer discussions <p2-dev@xxxxxxxxxxx>
 
After experimentation using the director, I need to rephrase my question: What is the equivalent way, if any, of specifying the -destination and -shared values through the programmatic API (for an InstallationOperation) that would otherwise be specified through a command-line execution of org.eclipse.equinox.p2.director?
 
Anybody know?

Thanks,
Chip

 
-----Original Message-----
From: Chip Downs <chipperdowns@xxxxxxx>
To: p2-dev <p2-dev@xxxxxxxxxxx>
Sent: Fri, Apr 12, 2013 12:03 pm
Subject: Install features & bundles to separate location than RCP product
Hi,
 
I have an RCP product that installs and uninstalls features/bundles just fine when running from a traditional, Eclipse-like installation. Using logic similar to the following article, it headlessly performs updates from a repo site, modifies the product's "p2", "features", and "plugins" directories accordingly, and starts the installed bundles (as applicable):
 
 
The problem is that the product also needs to perform the provisioning operations from a read-only installation on a shared network folder. For many of its users, the installed product doesn't have the luxury of writing to its "p2", "features", and "plugins" directories.
 
Handling the p2 directory seems easy enough. All I need is a script that copies the p2 directory from the read-only installation to a writable local path and specifies the new location via eclipse.p2.data.area property.
 
The other directories are a different issue, however. Install operations fail because they're trying to write to the read-only installation's features and plugins directories. I can't seem to find another configuration property to specify an alternate location for the installed features and plugins. Although a number of articles and blogs entries about shared locations and bundle pooling seemed promising, they appeared to deal with the command-line director application.
 
Again, my product's installations are performed programmically via InstallOperations and ProvisioningJobs in conjunction with the simple configurator. I'd think that there were some simple configuration property to point them at an alternate installation path. I certainly hope that it doesn't require Java code changes and/or a different product build.
 
Thanks!
Chip
 
P.S. This problem appears to be similar to the one described here: http://stackoverflow.com/questions/11666907/p2-self-provisioning-rcp-vs-windows-uac
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev
 
_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

Back to the top