Juju bootstrap/deploy from own created image in offline


I want to use juju in offline mode using my own image.
Don’t know it is possible or not :slight_smile:

Is it possible to bootstrap a cotroller or deploy application using my own image? Like I have created my own image by the following procedure:

lxc launch ubuntu:18.04 my-container
lxc publish my-container --alias my-new-image

then I saw something in below link to create a metadata before bootstrap:
but confusion is what is region and url for me? because i am not using openstack. and if anyone describe full steps for juju metadata generate-image :slight_smile: after created metadata my folder is like below picture:

I tried bootstrap controller by the following command by using my own created image’s simplestreams:
juju bootstrap cloud-name controller-name --metadata-source ~/simplestreams/images
but it is downloading image from internet.

Thanks in advance.


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:

wget https://streams.canonical.com/juju/tools/agent/2.6.2/juju-2.6.2-ubuntu-amd64.tgz
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.