4

I got a shiny new server in the lab and I want to use Juju. I install juju, and juju-local just fine. The juju bootstrap completes successfully but when I attempt a deploy a charm I get an error:

$ juju deploy ubuntu
ERROR Cannot access the charm store. Are you connected to the internet? Error details: Get https://store.juju.ubuntu.com/charm-info?charms=cs%3Atrusty%2Fubuntu: dial tcp 91.189.95.67:443: connection timed out

The error message indicates that the server does not have access to the Internet, so I checked and the server is in an isolated network. I can use proxies to get out to the Internet.

How do I configure Juju to use a restricted network?

2 Answers2

4

The error message for this problem was correct, the server was in restricted network and did not have access to the Internet. The lab has a proxy server for http and https traffic.

The solution was to export http_proxy, https_proxy, and no_proxy environment variables on the Juju host server:

export http_proxy=http://squid.internal:3128
export https_proxy=https://squid.internal:3128
export no_proxy=localhost,127.0.0.1,10.0.3.1

After setting these environment variables the server was able to contact the charm store over port 443 and the charm deployed successfully.

The no_proxy variable was used to exclude servers from the proxy. I excluded 10.0.3.1 because that is the local bridge created by Juju.

1

The best my google-goo can offer is

Jorge Castro
  • 73,717