Azure IoT Edge EFLOW behind proxy - azure-iot-edge

PC on which I have installed IoT Edge EFLOW is behind proxy.
I have tried to setup proxy as I did for standardalone Ubuntu instance i.a. by setting proxy for ubuntu (export https_proxy="...") and then setting proxy for docker.
Unfortunately I have noticed proxy settings are removed after each time host system has been restarted.
Futhermore I cannot modify docker configuration file via powershell and SSH connection.
When I try to open any file via nano or vim the powershell window is empty I cannot type anything, I can only exit by closing powershell window.
Is there any particular steps to do to start using EFLOW behind proxy?

Make sure you follow this: Configure deployment manifests "Once your IoT Edge device is configured to work with your proxy server, you need to continue to declare the HTTPS_PROXY environment variable in future deployment manifests."

As part of our remote automation scripts, we've added the EFLOW Autodeploy scripts that will let you deploy the EFLOW VM and all the configurations (including Proxy) just by declaring a JSON file.
Thanks,
Francisco

Related

Making containers use host's proxy on MacOS

I'm running Docker Desktop for MacOS. Like many of us, I'm working from home right now and I access certain services that are inside the corporate firewall from my home machine via a SOCKS5 proxy. I'm trying to build a number of services in Docker containers and these containers also need access to the services at work. The problem is that Docker on MacOS does not support SOCKS proxies. I was hoping I could use something like host network mode, but that is also not supported on MacOS.
Any suggestions on how I do the above (other than switching to Linux ;-))
EDIT: add more detail on my environment.
Working from home on a Mac running MacOS Catalina Connected to
various services at work using SOCKS5 proxy and a few SSH tunnels.
Running the Proxifier application to make it easier to allow variousapplications to tunnel via the SOCKS proxy.
Docker Desktop for MacOS.
Ruby on Rails stack inside a Docker container in which certain Gems are developed in-house and
hosted on our internal (behind the corporate firewall) Gitlab server. So the stack needs access to that Gitlab server when the Gems are installed.
OK. I think I've come up with something workable. I'd still appreciate comments on this in case there's a better way. I'm always happy to learn.
Proxifier routes all traffic to *.mydomain.com to the SOCKS5 proxy.
I've created an SSH tunnel on my MacOS host: -L 8443:gitlab-server.mydomain.com:443
In the Gemfile, I reference the gitlab server as https://host.docker.internal:8443
The only sticky bit was that I get an SSL cert verification error since I'm not referencing the Gitlab server at the *.mydomain.com domain. I worked around this by doing git config --global http.sslVerify "false" just before the bundle install so that the git clone commands issued by the Bundler to install the Gitlab-hosted Gems ignore SSL verification errors.
This seems to be working fairly well. The actual Gitlab URL in the Gemfile is parameterized so that the "real" Gitlab URL can be used when inside the corporate firewall.

Docker Desktop for Windows configure to use Proxy Auto-Config Script (PAC)

I am using windows 10 Enterprise Version 1607,
We use a Proxy Auto Config (PAC) script for Proxy config.
The problem is docker connectivity. I have Docker 17.12.0-ce (stable release) is installed. I'm not able to configure Docker to use PAC to pull docker registry images.
Kindly help! I've gone through the official documentation several times, but nothing helpful. I'm not sure if I'm missing something.
.pac configuration file is actually returning a proxy server address based on which url you are visiting.
So you can skip using .pac and set your HTTP PROXY directly to docker.
If you want to know what is your proxy server address, visit the .pac from your browser, read it and you will find the proxy server address in clear text there.

Issues with Jenkins 1.67 URL set up

I am trying to set a new Jenkins instance (version 1.67) on to a Windows Server 2012 r2.
I am trying to configure a custom URL instead of using
localhost:8080
etc..
I have set Jenkins URL as
NewServer.domainname.com
But I cannot access it via that url, I get presented with a message "Remote Web Access is turned off" it only allows me to connect when I follow the URL with the port number;
NewServer.domainname.com:8080
I am sure that Remote web access is completely different from what my goal is.
By default, Jenkins launches its own built-in webserver, listening on port 8080.
Changing the URL in the Jenkins configuration does not change the port that the running webserver listens on, but rather the URL that is shown within the UI, or in emails sent to users etc.
In order to access Jenkins at just NewServer.domainname.com (i.e. running on port 80), you would first have to disable Windows Remote Web Access, which is currently occupying port 80.
You would then need to stop Jenkins and start it again with the flag --httpPort=80; these options are documented on the Jenkins wiki.
If Jenkins was started as a Windows Service, you can edit the jenkins.xml file as shown in these answers.
Just wanted to say, after setting Jenkins.xml to run on port 80, and then via the Jenkins web interface using
'install as service'
I found that this process seemed to create a new jenkins.xml along with the default httpPort which is stored within the Jenkins.war.
I get around this I installed as a service, ensured that the service was not set to start on start up. Rebooted the machine
On start up I re-edited the jenkins.xml httpPort value back to 80. Started the service and now running very happy!

Docker cannot acces registry from openshift

Here is my whole scenario.
I have a RHEL 7.1 vmware image, with the corporate proxy properly configured, accessing stuff over http or https works properly.
Installed docker-engine, and added the HTTP_PROXY setting to /etc/systemd/system/docker.service.d/http-proxy.conf. I can verify the proxy setting is picked up by executing:
sudo systemctl show docker --property Environment
which will print:
Environment=HTTP_PROXY=http://proxy.mycompany.com:myport/ with real values of course.
Pulling and running docker images works correctly this way.
The goal is to work with the binary distribution of openshift-origin. I downloaded the binaries, and started setting up things as per the walkthrough page on github:
https://github.com/openshift/origin/blob/master/examples/sample-app/README.md
Starting openshift seems to work as I can:
* login via the openshift cli
* create a new project
* even access the web console
But when I try to create an app in the project (also via the cli):
oc new-app centos/ruby-22-centos7~https://github.com/openshift/ruby-hello-world.git
It fails:
error: can't look up Docker image "centos/ruby-22-centos7": Internal error occurred: Get https://registry-1.docker.io/v2/: dial tcp 52.71.246.213:443: connection refused
I can access (without authentication though) this endpoint via the browser on the VM or via WGET.
Hence I believe DOCKER fails to pick up the proxy settings. After some searching I also fear if there are IPTABLES settings missing. Referring to:
https://docs.docker.com/v1.7/articles/networking/
But I don't know if I should fiddle with the IPTABLES settings, should not Docker figure that out itself?
Check your HTTPS_PROXY environment property.

Configure Proxy Server

I've installed the latest Team Explorer Everywhere (14.0.1) onto my machine, but am having issues configuring the Proxy server.
Previous versions to TE, installed a VS 2010 shell onto the machine, and I could either open it and configure it normally within there, or I could use the following command to configure it:
tf proxy /configure [url]
However, this version appears to just be a command line file, and it doesn't appear to accept the tf proxy command.
Looking at the help file, it looks like the individual commands do take a /proxy:[url] switch, but this means adding it to every call I wish to make.
Is there a way in the new Team Explorer Everywhere to configure a proxy server to be used on all calls?
Could you please try setup the proxy via environment variables:
http_proxy
https_proxy
and try again?
EDIT: The environment variables only setup HTTP proxies, not TFS proxy which caches files from remote TFS to a local TFS proxy server.
The latest version of TEE doesn't permit a proxy being set in the same way that the TEE 2010 version does (i.e. via tf proxy /configure [url])
Instead, this can either (as noted in the question) be indicated on each call by adding the /proxy [url] switch to the command, or by setting the TFSPROXY environment variable.
Below is an example of how this is done via powershell:
$env:TFSPROXY = "[url]"

Resources