Here is my final answer about Juju offline:
To deploy a machine from user own Charm, it is possible to use a own created image(in the image all types of application will be installed) . below are the steps:
1. first create a container: lxc launch ubuntu:18.04 test
2. lxc exec test – /bin/bash to attach in test container and then install all application regurding charm installation.
3. lxc snap test command will create snap for test container.
4. lxc publish test/snap0 --alias juju/bionic/amd64 is used for create a image from container sanp
then use that image to deply application.
To bootstrap controller:
Using Juju it is not possible bootstrap a controller in offline (If I am not wrong).
What i tried:
1. before going to offline create a controller to get the juju agent binaries in my machine.
2. then go offline and tried with following command to to bootstrap in offline
juju bootstrap localhost test --auto-upgrade=false --debug
it is showing juju is getting local image and agent binaries also but issue with it is not getting ssh authentication.
then tried with:
then keep this tar in one /var/www/html/juju-metadata/released/
then used following command to generate tools metadata:
juju metadata generate-tools -d /var/www/html/juju-metadata/ --stream realeased (It is not possible with out any controller)
after created run the following command for bootstrap:
juju bootstrap localhost test --auto-upgrade=false --no-browser-login=false --build-agent=false --metadata-source=/var/www/html/juju-metadata --debug
it is also getting image and agent binaries but same problem like ssh no authentication. I tried in several ways but no luck.
log looks like for both:
ci-info: no authorized ssh keys fingerprints found for user tt.
So I think it is not possible to bootstrap in offline mode (I am not using openstack, just using single machine with lxd and juju)
If there have any solution from Juju team let me know. and also please if possible let us know it is possible or not.
Thanks in advance.