You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great if concourse supported running behind a corporate proxy without manually baking every resource image with the proxy settings. It should be possible to set the configuration for the proxy once and have it applied throughout.
I'm seeing from the pivotal issue this has already quite progressed. \o/
I'm hoping you are also propagating/setting the no_proxy environment variable the same way as http(s)_proxy. I'm not seeing any reference to no_proxy in the ticket and I can't find the corresponding code changes (I'm assuming they are not yet committed.)
@databus23 Good point, we were just wondering how that should work - we haven't ever really had to use proxies before so we're kinda winging it. Midway through we were wondering exactly how that'd work (reaching internal addresses), so that answers that. I'll add it to the story.
Here's our approach, if y'all wanna vet it:
Each worker will be able to advertise http_proxy, https_proxy, and (now that you mention it) no_proxy values.
The ATC will then forward those values along as container-level environment variables.
We'll go through our resources and make sure they all support these env vars (I know a few don't already), and add a note to the Implementing a Resource doc to call out that resources should respect it.
Note that this is configuration living on the worker, not the ATC, as it's really the worker's network that determines whether it needs a proxy and can even reach the proxy.
Also note that we're not going to just have this be an env on the worker, as that risks putting more configuration on the workers, making them stateful, which Concourse tries to avoid.
@vito The approach seems very sound to me.
Two remarks:
I'm curious which resources you think don't support proxy environment variables. I don't think you need to change any of the existing resources. Golang picks up the proxy from the environment by default, so does docker, git, curl, ruby and all other popular cli tools on linux I know of.
The only gotcha I can think of right now is when you use a custom http.Transport in go, then you need to make sure to add
A few resources may be constructing their own http.Transports and in doing so may be missing the http.ProxyFromEnvironment. It should be a quick fix. Likely candidates for this would be the S3 or GitHub Release resources.
We could have implemented this by having workers able to advertise arbitrary env values to set on containers created on them (and so you'd set "env": ["http_proxy=..."]). We opted to have proxy configuration be a first-class config instead, as having workers set arbitrary env could lead to tight coupling between the pipeline and its workers (which are supposed to be throwaway/stateless).
this still does not seem to be working, does anyone have a fix for this?
Edit:
After some research the environment variables for http_proxy, etc. are not being honored by ubuntu's upstart. if you log in to the vagrant box and restart the worker as a user then the proxy will be honored.
This is done and shipped long ago. The binaries support the standard env vars (http_proxy, etc). If it's not working, make sure to open a new issue - this one is already closed, and this works at least for some people, so replying to this one won't really get much done. :)
Activity
concourse-bot commentedon Mar 23, 2016
Hi there!
We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.
The current status is as follows:
This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.
databus23 commentedon Apr 9, 2016
I'm seeing from the pivotal issue this has already quite progressed. \o/
I'm hoping you are also propagating/setting the
no_proxyenvironment variable the same way ashttp(s)_proxy. I'm not seeing any reference to no_proxy in the ticket and I can't find the corresponding code changes (I'm assuming they are not yet committed.)Really looking forward to this.
vito commentedon Apr 9, 2016
@databus23 Good point, we were just wondering how that should work - we haven't ever really had to use proxies before so we're kinda winging it. Midway through we were wondering exactly how that'd work (reaching internal addresses), so that answers that. I'll add it to the story.
Here's our approach, if y'all wanna vet it:
http_proxy,https_proxy, and (now that you mention it)no_proxyvalues.Note that this is configuration living on the worker, not the ATC, as it's really the worker's network that determines whether it needs a proxy and can even reach the proxy.
Also note that we're not going to just have this be an
envon the worker, as that risks putting more configuration on the workers, making them stateful, which Concourse tries to avoid.databus23 commentedon Apr 9, 2016
@vito The approach seems very sound to me.
Two remarks:
The only gotcha I can think of right now is when you use a custom
http.Transportin go, then you need to make sure to addDoes that mean you don't want the worker to pick up the proxy variables it will advertise from its environment?
vito commentedon Apr 9, 2016
@databus23
http.Transports and in doing so may be missing thehttp.ProxyFromEnvironment. It should be a quick fix. Likely candidates for this would be the S3 or GitHub Release resources.envvalues to set on containers created on them (and so you'd set"env": ["http_proxy=..."]). We opted to have proxy configuration be a first-class config instead, as having workers set arbitrary env could lead to tight coupling between the pipeline and its workers (which are supposed to be throwaway/stateless).concourse-bot commentedon Apr 14, 2016
Hello again!
All stories related to this issue have been accepted, so I'm going to automatically close this issue.
At the time of writing, the following stories have been accepted:
If you feel there is still more to be done, or if you have any questions, leave a comment and we'll reopen if necessary!
jbakosi commentedon Apr 22, 2016
So what's the state of proxy support? Is there a howto on how to use it?
Following http://www.laurivan.com/set-up-concourse-behind-a-proxy/ I still cannot use concourse behind a proxy. What is missing?
codechaos commentedon Jun 7, 2016
It's the same for me. I followed the instructions on the documentation, but the docker was not able to load the hello-world image behind a proxy.
warroyo commentedon Oct 14, 2016
this still does not seem to be working, does anyone have a fix for this?
Edit:
After some research the environment variables for http_proxy, etc. are not being honored by ubuntu's upstart. if you log in to the vagrant box and restart the worker as a user then the proxy will be honored.
vito commentedon Oct 14, 2016
This is done and shipped long ago. The binaries support the standard env vars (
http_proxy, etc). If it's not working, make sure to open a new issue - this one is already closed, and this works at least for some people, so replying to this one won't really get much done. :)bump ginkgo
bump ginkgo
Sispheor commentedon Aug 8, 2017
For those who googled the issue. Here is the docker-compose file I used to get it working behind a proxy
bump fly yaml.v2