Get started with Juju

Hello dear author,

once I deploy charm-dev , Juju does not recognize microk8s controller by default. And I had to run below commands. Could you please insert these steps also?

  • sudo microk8s enable dns hostpath-storage
  • juju bootstrap microk8s <controller_name>

Regards, Selcem

Hi @selcem , this happened to me a few days ago, so I reported it as an issue (https://github.com/canonical/multipass/issues/3317), but they were not able to reproduce it, and then when I tried again yesterday I couldn’t reproduce it either. I am not entirely sure what’s going on but I will let Multipass know that this has happened to you too.

In the meantime, quick question: Do you wait for multipass launch to complete before running the next command? If you read through the issue I mentioned, you’ll see that I also noticed a drastic increase in the multipass launch time for the charm-dev blueprint, which meant that I had to wait a bit before juju clouds recognized the LXD and MicroK8s clouds properly.

Hello Teodora,

I have same delay at launch command , I was suspecting it is due to my MAC OS as I have frequent performance issues with multipass or other softwares. Of course I am waiting for launch to complete before login to VM with shell command as I am in the same terminal. I am trying to reproduce issue but it gives timeout.

(base) selcemartan@Selcems-MBP python % multipass launch --cpus 4 --memory 8G --disk 30G --name tutorial-vm charm-dev

Waiting for initialization to complete | launch failed: The following errors occurred: timed out waiting for initialization to complete

Regards, Selcem

When I tested it a few weeks ago, multipass launch used to take <2 mins, even for the charm-dev blueprint. That’s why I used it in our tutorial. I’m hoping this issue is only temporary. If it persists, I’ll have to rewrite that part of the tutorial. Anyway, my recommendation for now is to try again, as the issue does seem to be sporadic. And make sure to wait for multipass launch to complete before trying the next steps. PS I’ve also added a note to that effect in the tutorial.

It might be worth mentioning that when juju and microk8s are installed without multipass (e.g. because one wants to access the environment from their host OS (in my case, Ubuntu 23.10), it is important that the strictly confined microk8s is installed (see LP#2031555):

snap install microk8s --channel 1.28-strict

If a classic-confined microk8s is installed and a strictly confined juju tries to use it (in juju bootstrap), the error message is:

ERROR "/var/snap/juju/24626/microk8s/credentials/client.config" does not exist: juju "3.1.6" can only work with strictly confined microk8s

I know that the tutorial assumes Multipass, but it might be good to mention that juju and microk8s in the image provided have been installed using strict confinement.

1 Like

@thp The tutorial assumes you’ll be using the Multipass blueprint, which has everything already set up for you. But, like you, many users prefer to set things up directly on their machine, and then they could use guidance on how to set things up manually. This makes me think that I should maybe revert to making those steps of the tutorial explicit again. Anyway, for now I have updated Get started with Juju with a big note and a link to steps 5 and 6 of Juju | Set up your development environment . Also, thanks for raising the issue – you are now officially a contributor to the doc! (See Contributors line on the bottom of the doc.)

1 Like

@tmihoc in the Deploy the PostgreSQL charm section, the postgresql-app shows a Scale value of 3, but it should be 1, since the scaling up is actually performed later in the tutorial.

@mrbarco Fixed, thanks! PS Also added you to the list of contributors on the bottom of the doc.

1 Like

Part 2 → Configure your PostgreSQL application → See more

Configure your PostgreSQL application

It should be "…or run juju config postgresql-k8s"

hello @tmihoc, I found a tiny mistake here.

@houz42 Fixed, thanks! (PS Added you to the Contributors list on the bottom of the doc.)

Hi, I was having problems with the postgresql-k8s and tls-certificates-operator integration while following the tutorial. The logs didn’t show any errors , but postgresql didn’t have the tls certificates after everything had settled.

Apparently there are issues with secrets on postgresql-k8s 14/stable and Juju 3.1.7 (current 3.1/stable on the snap store). The workaround, according to the developers, is to use 14/candidate, until it gets promoted to 14/stable.

1 Like

Hi, I just wanted to mention that while trying this tutorial on Windows, I found that Multipass can only be installed on Windows 10 Pro or Enterprise editions. Since many people might not have either of these versions installed, it may be worthwhile to mention this requirement in the documentation.

@zxhdaze I’ve updated the doc and also added you to the list of contributors on the bottom of the doc. Thanks! >> UPDATE: Actually decided it was more relevant here as a note at the top of the how-to guide: Set up / Tear down your test environment

1 Like

Hi, as a newcomer to Juju I tried to follow the “Set things up” section. It is not immediatly clear how to actually set things up manually. This could benefit from having a sentence explaining to follow the “Set up your environment automatically” to get an already configured VM ready to go, and a sentence about where to go to configure a VM manually. It’s not clear that the automatic and manual installations are in the same documentation as it is named “Set up your environment automatically”.

Update: Looks like the document has been changed when I was waiting for my comment to be approved but my remark should still be relevant :slight_smile:

@sophiepages Thank you very much for your input! Trying to balance keeping setup instructions reusable with keeping the tutorial easy to follow has been tricky. I’ve reworked that section a little bit to both make users aware of the manual path as well as caution them about it. Hope it’s clearer now (though happy to iterate further!).

1 Like

Hi @tmihoc and thank you. It’s very clear now and I followed the full documentation in about one hour using Multipass as it was recommended.

I think I found two tiny mistakes and one bug that I reported.

1 - “For this tutorial plan to use mattermost-k8s…” => looks like a word is missing or this sentence could be reworked. It could be “For this tutorial we plan to…”.

2 - We jump from looking at the client credentials to a command without having a # with explanations beforehand. We don’t have explanations compared to the other steps.

Client Credentials:
Cloud      Credentials
localhost  localhost*
microk8s   microk8s*
ubuntu@my-juju-vm:~$ juju controllers

3 - I had an error when doing the juju upgrade-controller and I reported this bug here Bug #2064823 “Failed to upgrade Juju controller” : Bugs : Canonical Juju.

Hope it will help :slight_smile:

I found 2 typos in the documentation. So, would like to kindly report it.

  1. In the “Setup an isolated test environment” section, in line 1 - “Tempted to skip this step? We strongly recommend that you do no!”, it should be a “not!” in the end of the statement.
  2. In the “Deploy” section, in line 1 - “You will need to install a Juju client; on the client, add your cloud and cloud credentials; on the cloud, bootstrap a controller (i.e., control plan)”, it should be “control plane” in the round braces in the end of the statement.

Thanks!

@shrishtikarkera Fixed, thanks! PS Also added you to the list of contributors on the bottom of the doc. (And note that it is also perfectly fine for you to edit the doc yourself – while for larger changes it’s good to discuss, for typos you should always feel free to intervene directly.)

Understood. Thank you!