Get started with Juju

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!

Hi @tmihoc

In the terraform juju tutorial while trying to run terraform plan, got error “Reference to undeclared resource”

I checked and found some issue with the example in the tutorial’s main.tf file.

while defining the “postgresql-k8s” juju_application resource (lines 21 - 37 ) , the model “welcome-k8s” was referenced (line 23) instead of the “chat” model that was created earlier in the same tf file (lines 8- 10).

I changed line 23 to “model = juju_model.chat.name” and the terraform plan was successful.

My changes below

 21 resource "juju_application" "postgresql-k8s" {
 22 
 23   model = juju_model.welcome-k8s.name (removed)
 24   model = juju_model.chat.name (added)
 25 
 26   charm {
 27     name = "postgresql-k8s"
 28     channel  = "14/stable"
 29   }
 30 
 31   trust = true
 32 
 33   config = {
 34     profile = "testing"
 35    }
 36 
 37 }

The originally created model “chat” should be referenced when creating the resource “juju_application” “postgresql-k8s” or the model “welcome-k8s.name” should be created first before being referenced.

Thank you!

1 Like

Fixed and added your name to the list of Contributors on the bottom of the doc – thanks!

Hello @tmihoc, I’ve spotted an issue. It looks like the line:

the host IP address of the PostgreSQL unit: retrieve it from juju status or juju show-unit (in the sample outputs above, 10.1.170.142);

and the subsequent example psql --host=10.1.170.142 commands refer to an old revision of the tutorial. IP 10.1.170.142 doesn’t appear in the sample outputs and should likely be replaced with 10.1.32.152 to be consistent.

Thanks!