Setup resin.io behind corporate proxy/firewall

Can anyone on the Resin team clarify what happens if the redsocks proxy is misconfigured or if it goes down for some reason?
Will the host-os try to communicate directly if this is the case, falling back to the proxy when things return to normal?

I’m not a resin employee, but I can tell you that doesn’t happen. If the redsocks config is invalid, it essentially bricks the machine from a remote-management standpoint because it appears offline.

However, we use this workflow to test the configuration prior to ‘going live’:

  • Provision the resin device and verify it shows online in the dashboard
  • Set an environment variable (we use HTTP_PROXY_HOST) which triggers an API call to the supervisor to configure the proxy

At this point the resin host is not using the proxy and can still communicate to resin.io… however your container and code will use the proxy, so you can test to see that your application is working properly with the new proxy settings.

  • Once you’ve verified the proxy is working within your container, you can reboot the resin device and it will now start using the proxy configuration

Hi. Could you please tell me where are the $RESIN_SUPERVISOR_ADDRESS and the $RESIN_SUPERVISOR_API_KEY variables defined?

I looked in both the ResinOS host, as well as in the container, but I can’t seem to find them…

They are automatically set in the environment. If you shell into your application container and type env at the prompt, you should see all of the variables including those keys.

You should be able to ssh to your app’s container and run echo $RESIN_SUPERVISOR_ADDRESS. Just tried that using the webterminal. Isn’t that working for you @cgavriluta ?

When ssh-ing into the machine. I am presented with a dialog for choosing the container. However, there is only 1 container running, i.e. resin_supervisor:
>> sudo resin local ssh 00bc0c9.local
? Select a container (Use arrow keys)
❯ resin_supervisor (7d36e098879) - Up 11 minutes (health: starting)

Running:
>> echo $RESIN_SUPERVISOR_ADDRESS
from inside this container doesn’t return anything. Also, if I look at the enviroment variables
>> env
I don’t see any RESIN_SUPERVISOR_ADDRESS.

You should be able to see those variables in your application’s container. Is there a reason why your application container is not running?

No idea why it’s not running. I followed the steps of the getting started guide as instructed.
I am not sure if the whole proxy-thing (see above) plays a role into this.

Can you see your device online in the dashboard?

No. I am behind a proxy, and I can’t get it to work with ResinOS. See my post above: Setup resin.io behind corporate proxy/firewall .
In the same network I am running another RPI with Raspbian on it, and on that one the proxy settings work. I can access the web from it.