Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

As a developer, I can use pack with an HTTP proxy #169

Closed
sclevine opened this issue May 2, 2019 · 5 comments
Closed

As a developer, I can use pack with an HTTP proxy #169

sclevine opened this issue May 2, 2019 · 5 comments
Labels
size/md Medium level of effort
Milestone

Comments

@sclevine
Copy link
Member

sclevine commented May 2, 2019

Very important for enterprise/corporate use cases.

When I set the HTTP_PROXY, HTTPS_PROXY, and/or NO_PROXY environment variables
And I run pack build
Then All connections from the pack CLI and associated containers are routed through the specified proxies.

Notes

@sclevine sclevine added the size/md Medium level of effort label May 2, 2019
@sweeneyb
Copy link

sweeneyb commented May 3, 2019

I just hit this and would volunteer to help test once there's a patch. Here's the error in case somebody comes looking:
`$ /tmp/pack build brian:foo
Defaulting app directory to current working directory /vagrant/projects/foo-service (use --path to override)
Using default builder image cloudfoundry/cnb:bionic
Pulling builder image cloudfoundry/cnb:bionic (use --no-pull flag to skip this step)
bionic: Pulling from cloudfoundry/cnb
Digest: sha256:175798db658a45eb6b4e707a8fde2779567650dc93544a4322036762ee463d78
Status: Image is up to date for cloudfoundry/cnb:bionic
Selected run image packs/run:0.1.0 from builder cloudfoundry/cnb:bionic
Pulling run image packs/run:0.1.0 (use --no-pull flag to skip this step)
0.1.0: Pulling from packs/run
Digest: sha256:99dee5262498d21b302321fd5d7b889c1685bfbd0ea12a64f786d91232e52278
Status: Image is up to date for packs/run:0.1.0
Using cache image pack-cache-6ffd32cfc585
===> DETECTING
[detector] Trying group of 8...
[detector] ======== Results ========
[detector] Cloud Foundry OpenJDK Buildpack: pass
[detector] Cloud Foundry Build System Buildpack: pass
[detector] Cloud Foundry JVM Application Buildpack: pass
[detector] Cloud Foundry Azure Application Insights Buildpack: skip
[detector] Cloud Foundry Debug Buildpack: skip
[detector] Cloud Foundry Google Stackdriver Buildpack: skip
[detector] Cloud Foundry JMX Buildpack: skip
[detector] Cloud Foundry Procfile Buildpack: skip
===> RESTORING
[restorer] cache image 'pack-cache-6ffd32cfc585' not found, nothing to restore
===> ANALYZING
[analyzer] WARNING: image 'brian:foo' not found or requires authentication to access
[analyzer] WARNING: image 'brian:foo' has incompatible 'io.buildpacks.lifecycle.metadata' label
===> BUILDING
[builder] -----> Cloud Foundry OpenJDK Buildpack 1.0.0-M6
[builder] -----> OpenJDK JDK 11.0.2: Contributing to layer
[builder] Downloading from https://java-buildpack.cloudfoundry.org/openjdk-jdk/bionic/x86_64/openjdk-11.0.2_09.tar.gz
[builder] Get https://java-buildpack.cloudfoundry.org/openjdk-jdk/bionic/x86_64/openjdk-11.0.2_09.tar.gz: dial tcp 13.249.87.18:443: connect: connection refused

[builder] Error: failed to : exit status 103
ERROR: failed with status code: 7

But I can reach this normally:
$ curl -I https://java-buildpack.cloudfoundry.org/openjdk-jdk/bionic/x86_64/openjdk-11.0.2_09.tar.gz
HTTP/1.1 200 Connection established
Server: SimpleHTTP/0.6 Python/3.6.4
Date: Fri, 03 May 2019 13:42:10 GMT
Proxy-Agent: SimpleHTTP/0.6 Python/3.6.4

HTTP/1.1 200 OK
Content-Type: application/x-tar
Content-Length: 194941827
Connection: keep-alive
Date: Fri, 03 May 2019 13:37:09 GMT
Last-Modified: Sat, 06 Apr 2019 01:20:37 GMT
Accept-Ranges: bytes
Server: AmazonS3
Age: 303
X-Cache: Hit from cloudfront
Via: 1.1 5764c2906825a6dd0688f4b549ef2cdf.cloudfront.net (CloudFront)

@ekcasey
Copy link
Member

ekcasey commented May 3, 2019

@sclevine It's much easier to implement this story if we don't support the case where the proxy is running on the host machine (it's possible but more laborious). Given that the motivation for this story is to support enterprise/corporate use cases, the vast majority of which involve an external proxy, we were thinking we should ship the quick version (w/o local proxy support), and address local proxies in another issue.

@sclevine
Copy link
Member Author

sclevine commented May 3, 2019

👍

@ekcasey ekcasey added the v0.2.0 label May 10, 2019
@mgibson1121
Copy link
Member

Needs @sclevine because I don't know where I would set env variables. If the following is provided:

  1. Where a user would configure an environment variable
  2. The syntax in which they would be configured
  3. How to tell if all connections from the pack CLI and associated containers are routed through the specified proxies

I could probably accept it.

@mgibson1121 mgibson1121 added help wanted Need some extra hands to get this done. Help Accepting and removed help wanted Need some extra hands to get this done. labels May 10, 2019
@ekcasey
Copy link
Member

ekcasey commented May 14, 2019

done on master, will ship in v0.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/md Medium level of effort
Projects
None yet
Development

No branches or pull requests

5 participants