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

EMS and HTTP proxy... #18

Open
dchiaramello opened this issue Jun 20, 2018 · 0 comments
Open

EMS and HTTP proxy... #18

dchiaramello opened this issue Jun 20, 2018 · 0 comments

Comments

@dchiaramello
Copy link

dchiaramello commented Jun 20, 2018

Hello.

We would like to run the iPerf Integration Test, but we are behind an HTTP Proxy. The Generic VNFM's default "user-data.sh" script, sent via cloud-init to the VM, tries to "wget" the EMS repository, but it fails to proceed because of http proxy.

We have created a "custom" /etc/openbaton/openbaton-vnfm-generic-user-data.sh file, corresponding to the one we found on https://github.com/openbaton/generic-vnfm/blob/master/src/main/resources/user-data.sh, in which we have added "export http_proxy=XXX" and "export https_proxy=XXX" lines, and the first problem was solved: the user-data.sh script managed to "wget" the EMS repository and to install EMS.
The script is also creating a /etc/profile.d/myproxy.sh file containing the same http(s) proxy export lines.

Now, we are facing a problem where the EMS itself is doing a "git clone"... Unfortunately, the EMS service is started by pid=1, which was running BEFORE our /etc/profile.d/myproxy.sh file was created. So, the http(s) proxy environment variables are NOT defined, so the EMS fails to do its "git clone".

We are also anticipating that we'll also face another problem if we manage to handle that one: the EMS will try to contact OpenBaton's Generic VNFM, but these calls MUST NOT go through the HTTP Proxy... So, we'll also have to define a "no_proxy" environment variable containing the IP of OpenBaton's Generic VNFM - is there a way to have this IP somehow in the user-data.sh script (something like the #hostname which seems to be replaced at some point)?

And for iPerf Integration Test, the client will try to contact the server - if the request is done through HTTP, we'll also have to add the server's IP address in the "no_proxy" environment variable. That IP address is dynamically created and provided through a configuration parameter to the client, but is there a way to have access to it in our user-data.sh script (and if yes, how)?

Thanks for your attention,
Daniel

PS: a workaround for that specific use case is to have user-data.sh configuring GIT to use the proxy with "git config --global --add http.proxy " and "git config --global --add https.proxy " and not creating the /etc/profile.d/myproxy.sh file, but for other use cases where we need to have the proxy environment variables defined, it would still apply...

Edit: we "solved" the problem by:

  • defining http_proxy and https_proxy variables in the script iself (as explained above)
  • NOT creating the /etc/profile.d/myproxy.sh file, despite what was mentioned previously. Otherwise, we would need to also create a "no_proxy" environment variable, with variable IPs...
  • creating a /root/.gitconfig file containing the Proxy lines
  • creating a /etc/apt/apt.conf.d/proxy file containing the Proxy lines

But for me, it looks more like a workaround than a real solution...

@ogozman ogozman closed this as completed Feb 27, 2019
@ogozman ogozman reopened this Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants