Some environments require no direct Internet access. Previously to Juju 2.1.x it wasn’t possible to use Juju locally with LXD without the Internet.
Prereq: Setup Juju 2.1.x and LXD however you usually do in the environment
- Get an LXD importable image and move to the offline machine
wget https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-lxd.tar.xz https://cloud-images.ubuntu.com/xenial/current/xenial-server-cloudimg-amd64-root.tar.xz
- Import the image and assign it an alias so Juju knows to use it
lxc image import xenial-
server- cloudimg- amd64-lxd. tar.xz xenial- server- cloudimg- amd64-root. tar.xz --alias juju/xenial/amd64
- It’s a good idea to confirm that LXD can launch the image fine
lxc launch juju/xenial/amd64
- Bootstrap and start deploying charms
juju bootstrap localhost
This is just one part of running offline. This may only work if you have a local package mirror that the LXD image will be able to detect as it does need to install some packages.
Additionally, some charms may download software directly from Internet sites so those would also need more workarounds for them.
Fixed bug: https://bugs.launchpad.net/juju/+bug/1650651