Bug 1331656 - [DOCS] No mention of proxy settings for Maven
Summary: [DOCS] No mention of proxy settings for Maven
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Documentation
Version: 3.1.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
: ---
Assignee: brice
QA Contact: Tomas Schlosser
Vikram Goyal
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-29 07:34 UTC by Jaspreet Kaur
Modified: 2021-08-30 11:50 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-11 03:23:53 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 1758313 0 None None None 2016-04-29 07:34:42 UTC

Description Jaspreet Kaur 2016-04-29 07:34:10 UTC
Document URL: https://access.redhat.com/documentation/en/openshift-enterprise/version-3.1/installation-and-configuration/#working-with-http-proxies

Section Number and Name: Chapter 15. Working with HTTP Proxies

Describe the issue: There is no mention of configuring proxies when maven downloads the dependencies. If no proxy is configured users will fail with below errors :

Connection to https://repo1.maven.org refused

or  

Connection to http://maven.repository.redhat.com refused: Connection timed out

Suggestions for improvement: Please provide the correct steps for maven proxy configuration in Openbshift  3

Additional information: 

A related might help - https://access.redhat.com/solutions/1758313

Comment 1 brice 2016-07-12 06:24:59 UTC
I've created a PR for this:

https://github.com/openshift/openshift-docs/pull/2491

Meng Bo, as this is a new procedure to the docs, can I ask for a QA test please? I hope there's enough information to test this out and hopefully pass. If you need more information please let me know.

Thanks!

Comment 2 Wang Haoran 2016-07-12 07:58:05 UTC
Hi, Tomas, could you please help verify this ?

Comment 3 Tomas Schlosser 2016-07-13 06:17:58 UTC
Hello,
I would recommend other possibilities then what is documented:
1) provide $HTTP_PROXY_HOST and $HTTP_PROXY_PORT environment variables in .s2i/environment or in the BuildConfig
  - this will generate the settings.xml for the user
  - optionally, you can use other environment variables $HTTP_PROXY_USERNAME $HTTP_PROXY_PASSWORD $HTTP_PROXY_NONPROXYHOSTS
  - works for all xPaaS images except FIS
2) put your custom-made settings.xml into <git>/configuration/settings.xml
  - works for all xPaaS images (including FIS)
3) put your settings

Other points:
- don't use MAVEN_ARGS env var, use MAVEN_ARGS_APPEND instead (so you don't have to add everything, just the specifics)
- using custom assemble script (as suggested in linked solution) is completely wrong approach

Comment 4 brice 2016-07-20 03:08:48 UTC
Tomas

Thanks very much for the extra information. I've updated the PR:

https://github.com/openshift/openshift-docs/pull/2491

I think step 3 you mention above might need more info, though. Did the comment get cuttoff? I'm also eager to hear any other feedback you have, or if you have any more information.

Thanks!

Comment 5 Tomas Schlosser 2016-07-25 08:14:07 UTC
Sorry, I must have hit the send button too soon.

The third option would be to put your settings.xml anywhere in the git and use MAVEN_ARGS_APPEND variable to point to it (e.g. MAVEN_ARGS_APPEND=/tmp/source/<path_within_git>).

Pull request looks good. I'd add other optional environment variables to it for completeness:
- HTTP_PROXY_PASSWORD
- HTTP_PROXY_NONPROXYHOSTS

Comment 6 brice 2016-07-26 03:49:16 UTC
Tomas,

Thanks so much for the extra info. I've updated the PR:

https://github.com/openshift/openshift-docs/pull/2491

Can I ask for an ack that everything is correct?

One thing, you mention that what was missing was "the third option". Does that mean that what you've given me are three different options, instead of three steps to a procedure, like I have written up? That's all.

Thanks again.

Comment 7 Tomas Schlosser 2016-07-26 07:10:19 UTC
Yes, these are three separate options, not steps to follow.

Value of append should contain also -s switch i.e.
MAVEN_ARGS_APPEND="-s path/to/file"

Comment 8 brice 2016-07-27 03:16:08 UTC
Tomas,

Sure. I've fixed the topic:

https://github.com/openshift/openshift-docs/pull/2491

Is there anything else you'd like to mention? If not, I can probably go ahead with this.

Thanks, again.

Comment 9 Tomas Schlosser 2016-07-27 10:51:39 UTC
Looks good to me! Thanks for doing the update!

Comment 10 brice 2016-07-28 00:23:51 UTC
Thanks, Tomas!

I'll put this onto peer review.

Comment 11 openshift-github-bot 2016-07-29 00:19:48 UTC
Commit pushed to master at https://github.com/openshift/openshift-docs

https://github.com/openshift/openshift-docs/commit/5c3943969fd3d6d3ab143580410f2135df6afd96
Merge pull request #2491 from bfallonf/bz1331656

Bug 1331656 added maven proxy section


Note You need to log in before you can comment on or make changes to this bug.