-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
oc cluster up does not work in a proxied environment #11323
Comments
@csrwng This short of creates many dependencies in minishift. Do you have an initial idea on what would be required to support this? |
@jorgemoralespou thank you for reminding me about this. At the very least we should document the configuration. We need to do some testing to see what it will take, but basically we need to configure the default proxy settings for builds. We'd also need to configure the proxy for registry access when importing image streams. I'll definitely take a look on Wednesday |
@csrwng This is also required from CDK/minishift side. As from our experience we have seen many users using CDK behind proxy environment. |
@csrwng have you been able to look into configuration documentation by any chance? We are also behind a corporate proxy and can't create image streams when using "oc cluster up". Environment: Using Docker Toolbox we can pull images, and we can start OpenShift with "oc cluster up", but OpenShift itself can't pull any images. Somehow, I need to figure out how to set HTTP_PROXY and HTTPS_PROXY for OpenShift itself. Thanks. |
@pittar we are working on adding a flag to cluster up to let you specify the proxy server to use. However, if you want HTTP_PROXY and HTTPS_PROXY environment variables to be set for origin, you can use the -e flag on cluster up currently. |
@pittar you can specify multiple -e arguments |
@csrwng will multiple -e concatenate the ENV?
If he needs NO_PROXY=a,b will that be achieved by -e NO_PROXY=a -e
NO_PROXY=b?
|
@jorgemoralespou yes it will |
@jorgemoralespou sorry, I spoke too quickly ... actually no |
@jorgemoralespou I wish we didn't have to deal with a proxy! This all works so nicely on my laptop at home ;) |
@pittar did you try the workaround suggested in the issue you linked to? |
Hi @csrwng, I have tried:
`oc cluster up --env HTTP_PROXY=proxy.host --env HTTPS_PROXY=proxy.host --env='"NO_PROXY,"10.128.0.0/14,172.30.0.0/16,192.168.0.0/16""' The examples with I'm probably doing something dumb, but it's hard to see. |
@pittar how about: |
NO_PROXY isn't set with that option: `$ docker exec -it origin bash ` I'll keep trying different combos. I'm sure one will work eventually. If I figure it out, I'll post the answer. |
Ok, I got it to work!
When I bash into the "origin" container, I now see a properly set HTTP_PROXY, HTTPS_PROXY, and the full NO_PROXY list. Thanks for your help. |
@csrwng is that enough to have proxies working? There's no need to add
anything to master-config.yaml to enable proxies to work in builds?
|
@jorgemoralespou |
@jorgemoralespou you still need to configure the build defaults as explained here: https://docs.openshift.org/latest/install_config/build_defaults_overrides.html#manually-setting-global-build-defaults |
@pittar this means that for building you're going to have some additional
work to do that is not easy.
Out of curiosity, would you expect to use the same cluster in different
locations, with and without proxy? Meaning that you create the oc cluster
without proxy, work, and keeping the config would you go to your office,
start the cluster with the proxy work more, go back home and work more
without proxy and so on? Or would you expect to create a cluster for each
location, home and work? Or would you create a cluster everytime not
keeping the config as you move?
Thanks for the answer.
|
@jorgemoralespou we're new to OpenShift and trying to figure out the best way to setup developer work stations. I was experimenting with creating templates at home on my personal laptop using "oc cluster up" (MacOS, no proxy). That was working great. I had trouble (as you can see) getting the same setup running at work. Here, we're on Windows 7 (so only Docker Toolbox) and behind a corporate proxy. This gave me some fits! Now that OpenShift is running with "oc cluster up" (thanks @csrwng), I've been able to import the same templates and start up a few of our apps. We already had some apps on Docker Hub. This part is now working. I haven't tried builds, and it's not on my near-term list. I still want to try the CDK (mentioned here) to see if that's more appropriate for developer workstations. To more directly answer your questions:
I hope that helps! |
+1 here. We need to be able to bring a cluster up on a node behind a corporate proxy. I am not having a bunch of luck with what is in these comments. It seems like however I set the environment variables something won't work (either oc cluster up won't work with those proxy vars set, or when I bring the cluster up and set them manually on origin, I am not able to pull things down via the registry). From my end, it has been an issue getting something to work behind a corporate proxy (CDK and/or oc cluster up). It has been a battle to try to get something to work. We really just need an easy way to get developers local access to OSE so they can vet code/apps before promoting and running in a real environment. |
@adamjk-dev we're working on adding arguments to let you specify the proxy. |
Perhaps this is the wrong place to ask, but when running
This makes sense because
The problem is that the IP is dynamically allocated by docker... So this is a bit of chicken and egg... Is there a suggested approach to get around this? Or am i missing something obvious? |
Guys , If i follow openshift origin advanced installation @ then post installation do i still need to execute "oc cluster up" command. Second question while creating inventory files , we have set of variables like "openshift_http_proxy" "openshift_https_proxy" and even no_proxy variables which we can set , Does this variables will make sure that proxy at my machine level , docker level will be set automatically and i will be able to pull required images fro router and registry from internet and y cluster will start working , As of now none of my pods i.e. registry pod and router pod is not running , am getting error syncing pod . I tried to set proxy post advanced installation @ https://docs.openshift.com/enterprise/3.0/admin_guide/http_proxies.html but then the defualt pod's goes off and then i get pod syning failed. Should i set my office proxy at docker level and machine level separately. |
Have you tried setting those parameters in "oc cluster up"? If you do "oc cluster up -h" you'll see there's 3 parameters related to proxies:
Maybe you should try to set those directly to the "oc cluster up" command. |
Should i execute this after executing the openshift ansible playbook for openshift origin installation ??????? |
@teotia39 since this issue is for "oc cluster up" not sure why you're running the openshift installation. My reply was to @lucastheisen. "oc cluster up" is to run openshift locally on your laptop. Not for when you do a full install of a cluster with ansible. |
@jorgemoralespou , I do set those, but this issue is not inside of openshift... Its when |
I get exactly the same behavior as lucastheisen. My organization also has a proxy. I am setting both HTTP_PROXY and HTTPS_PROXY. |
In an environment with a proxy oc cluster up can start, if the proxy is configured for Docker daemon but builds (as an example) will not work.
Provide a way to configure a proxy in the config generated by oc cluster up. And if it is currently possible, please, document.
The text was updated successfully, but these errors were encountered: