Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » How to add a mirror to Oomph?
How to add a mirror to Oomph? [message #1725969] Tue, 08 March 2016 16:50 Go to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
I have a P2 mirror provided by Nexus (in-house) for some update sites such as http://download.eclipse.org/eclipse/releases/mars.

I was able to force Oomph to use this P2 mirror by adding directly the Nexus URLs to the setup file: org.eclipse.products.setup

However this will cause the installation to fail if this mirror is not accessible,
Can I simply add multiple URLs in the same setup file where some URLs are mirror from other ones? And if yes, how does Oomph prioritizes which URL to use?
And doesn't it make the installation slower if I add more URLs since it has more URLs to contact?

I was expecting a different configuration, where I could explicitly add mirror URLs and Oomph would decide if it should use the mirror or the eclipse download site.

[Updated on: Tue, 08 March 2016 16:50]

Report message to a moderator

Re: How to add a mirror to Oomph? [message #1725989 is a reply to message #1725969] Tue, 08 March 2016 20:55 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31014
Registered: July 2009
Senior Member
Silvestre,

Comments below.

On 08.03.2016 17:50, Silvestre Martins wrote:
> I have a P2 mirror provided by Nexus for some update sites such as
> http://download.eclipse.org/eclipse/releases/mars.
>
> I was able to force Oomph to use this P2 mirror by adding directly the
> Nexus URLs to the setup file: org.eclipse.products.setup
You can also use a Redirection Task or use
-Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars->http://foo/bar

>
> However this will cause the installation to fail if this mirror is not
> accessible,
Yes, all approaches I can think of are like that. A proper "mirror" is
something specified by the repository itself. In this case the Mars
repository does specify a mirror request to Eclipse.org which returns a
list of mirrors which are then used (and can be broken without causing
an overall failure).
> Can I simply add multiple URLs in the same setup file where some URLs
> are mirror from other ones?
Yes.
> And if yes, how does Oomph prioritizes which URL to use?
Oomph, doesn't. P2 will use them all and I don't know if there is any
intelligence in which it chooses to use in the end.
> And doesn't it make the installation slower if I add more URLs since
> it has more URLs to contact?
Yes, that's a problem too.
>
> I was expecting a different configuration, where I could explicitly
> add mirror URLs and Oomph would decide if it should use the mirror or
> the eclipse download site.
That would be nice, but it's not how p2 works. In principle we could
augment p2 to add "externally specified" mirrors rather then the
built-in p2 approach where the update site itself must specify its mirrors
Re: How to add a mirror to Oomph? [message #1725991 is a reply to message #1725989] Tue, 08 March 2016 21:41 Go to previous messageGo to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
Thanks Ed.

Quote:
> I have a P2 mirror provided by Nexus for some update sites such as
> http://download.eclipse.org/eclipse/releases/mars.
>
> I was able to force Oomph to use this P2 mirror by adding directly the
> Nexus URLs to the setup file: org.eclipse.products.setup
You can also use a Redirection Task or use
-Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars->http://foo/bar

Sorry, but I don't understand the syntax of:
-Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars-http://foo/bar

what does "foo" refer to? can it be any name? how does Oomph uses that "foo" token? Does it have any relationship with the "target URL" or can I have this actually in the file:
-Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars-http://intra.my-company.com/nexus/repository/mars ?

Quote:

> I was expecting a different configuration, where I could explicitly
> add mirror URLs and Oomph would decide if it should use the mirror or
> the eclipse download site.
That would be nice, but it's not how p2 works. In principle we could
augment p2 to add "externally specified" mirrors rather then the
built-in p2 approach where the update site itself must specify its mirrors

Do you think it makes sense to submit a request for this?
Re: How to add a mirror to Oomph? [message #1726078 is a reply to message #1725991] Wed, 09 March 2016 12:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31014
Registered: July 2009
Senior Member
Silvestre,

Comments below.

On 08.03.2016 22:41, Silvestre Martins wrote:
> Thanks Ed.
>
> Quote:
>> > I have a P2 mirror provided by Nexus for some update sites such as
>> > http://download.eclipse.org/eclipse/releases/mars.
>> >
>> > I was able to force Oomph to use this P2 mirror by adding directly
>> the > Nexus URLs to the setup file: org.eclipse.products.setup
>> You can also use a Redirection Task or use
>> -Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars->http://foo/bar
>
> Sorry, but I don't understand the syntax of:
> -Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars-http://foo/bar
>
The "pattern" is
-Doomph.redirection.{any-name}={any-uri}->{any-other-uri} to define
what's essentially a rewrite rule to redirect any URI to any other URI.
It uses a EMF's URIMap and so "folder" redirections are possible as
well, e.g.,
-Doomph.redirection.eclipse.download=http://download.eclipse.org/->http://my.com/downloads/
will redirect all p2 sites hosted by Eclipse.org to the my.com domain's
downloads area.
> what does "foo" refer to? can it be any name? how does Oomph uses that
> "foo" token? Does it have any relationship with the "target URL" or
> can I have this actually in the file:
> -Doomph.redirection.foo=http://download.eclipse.org/eclipse/releases/mars-http://intra.my-company.com/nexus/repository/mars
> ?
Yes, like that only with -> to separate the two URIs.
>
> Quote:
>> > I was expecting a different configuration, where I could explicitly
>> > add mirror URLs and Oomph would decide if it should use the mirror
>> or > the eclipse download site.
>> That would be nice, but it's not how p2 works. In principle we could
>> augment p2 to add "externally specified" mirrors rather then the
>> built-in p2 approach where the update site itself must specify its
>> mirrors
>
> Do you think it makes sense to submit a request for this?
Yes, I think so. I think it's very common for companies to host mirrors
inside their firewall, so p2's ability to use mirrors is badly limited
by requiring the original p2 host repository to specify a way to
determine all appropriate mirrors.
Re: How to add a mirror to Oomph? [message #1726085 is a reply to message #1726078] Wed, 09 March 2016 13:48 Go to previous messageGo to next message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
Ed Merks wrote on Wed, 09 March 2016 07:52
Silvestre,
>> > I was expecting a different configuration, where I could explicitly
>> > add mirror URLs and Oomph would decide if it should use the mirror
>> or > the eclipse download site.
>> That would be nice, but it's not how p2 works. In principle we could
>> augment p2 to add "externally specified" mirrors rather then the
>> built-in p2 approach where the update site itself must specify its
>> mirrors
>
> Do you think it makes sense to submit a request for this?
Yes, I think so. I think it's very common for companies to host mirrors
inside their firewall, so p2's ability to use mirrors is badly limited
by requiring the original p2 host repository to specify a way to
determine all appropriate mirrors.

Should it be an enhancement for the p2 component or specific for Oomph configuration?
Re: How to add a mirror to Oomph? [message #1726122 is a reply to message #1726085] Wed, 09 March 2016 20:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31014
Registered: July 2009
Senior Member
Silvestre,

It's not likely p2 will implement any new features so the p2 component
of the Oomph product would be the bugzilla target.


On 09.03.2016 14:48, Silvestre Martins wrote:
> Ed Merks wrote on Wed, 09 March 2016 07:52
>> Silvestre,
>> >> > I was expecting a different configuration, where I could
>> explicitly >> > add mirror URLs and Oomph would decide if it should
>> use the mirror >> or > the eclipse download site.
>> >> That would be nice, but it's not how p2 works. In principle we
>> could >> augment p2 to add "externally specified" mirrors rather then
>> the >> built-in p2 approach where the update site itself must specify
>> its >> mirrors
>> >
>> > Do you think it makes sense to submit a request for this? Yes, I
>> think so. I think it's very common for companies to host mirrors
>> inside their firewall, so p2's ability to use mirrors is badly
>> limited by requiring the original p2 host repository to specify a way
>> to determine all appropriate mirrors.
>
> Should it be an enhancement for the p2 component or specific for Oomph
> configuration?
>
Re: How to add a mirror to Oomph? [message #1726128 is a reply to message #1726122] Wed, 09 March 2016 22:13 Go to previous message
Silvestre Martins is currently offline Silvestre MartinsFriend
Messages: 84
Registered: July 2009
Member
Request created:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=489322
Previous Topic:Redirecting nested projects in the catalog?
Next Topic:CDT cannot complete install
Goto Forum:
  


Current Time: Thu Apr 02 10:49:43 GMT 2020

Powered by FUDForum. Page generated in 0.03309 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top