Juju 2.0 proxy for bootstrap
Solution 1:
From the MAAS freenode community, I learned that I could run:
--config=config.yaml
Where config.yaml contains:
default-series: xenial
no-proxy: localhost
apt-http-proxy: http://<ip address>:<port>
apt-https-proxy: https://<ip address>:<port>
apt-ftp-proxy: ftp://<ip address>:<port>
http-proxy: http://<ip address>:<port>
https-proxy: https://<ip address>:<port>
ftp-proxy: ftp://<ip address>:<port>
This isn't documented anywhere in the MAAS or Juju documentation, disappointingly. This didn't actually solve my issue either, though I believe it addressed the direct question of setting a proxy before a model exists. I believe the issue I'm having is due to unrelated DNS confusion within my network.
Solution 2:
Use
--config http-proxy=http://<ip address>:<port>
--config https-proxy=http://<ip address>:<port>
Solution 3:
During the bootstrap process, you probably want to specify the proxies as model defaults. These will apply both to the controller model, and to any subsequent models that are created in that controller.
juju bootstrap lxd --model-defaults=config.yaml
Configuration attributes specified with --config will only apply to the controller model, and not other models.