Charmed Temporal K8s Tutorial - Environment Setup

Environment Setup

This is part of the Charmed Temporal Tutorial. Please refer to this page for more information and the overview of the content.

Minimum Requirements

Before we start, make sure your machine meets the following requirements:

  • A machine running Ubuntu 22.04 (Jammy) or later. Machines running other operating systems may opt for the use of Multipass. A simple set of instructions to set up Multipass can be found here.
  • 8GB of RAM.
  • 2 CPU threads.
  • At least 20GB of available storage.
  • Access to the internet for downloading the required snaps and charms.

Install Canonical Kubernetes

On your machine, install and configure Canonical Kubernetes (K8s):

sudo snap install k8s --classic

sudo k8s bootstrap

Wait until the k8s cluster is in Ready state. You can check it as follows:

sudo k8s status --wait-ready

Install kubectl and write kubeconfig for the current user:

sudo snap install kubectl --classic
mkdir -p ~/.kube
sudo k8s config > ~/.kube/config

Set up Juju

Install Juju as follows:

sudo snap install juju --channel=latest/stable

Register your Canonical K8s cluster with Juju as a cloud named ck8s:

juju add-k8s ck8s

Confirm the new cloud entry is present:

juju clouds
# >>> Cloud      Regions  Default    Type  Credentials  Source    Description
# >>> ck8s       0                   k8s   1            local     A Kubernetes Cluster
# >>> k8s        0                   k8s   0            built-in  A local Kubernetes context
# >>> localhost  1        localhost  lxd   0            built-in  LXD Container Hypervisor

Install a Juju controller into your ck8s cloud. You can name it temporal-controller:

juju bootstrap ck8s temporal-controller

Create a workspace, or ‘model’, on this controller. You can name it temporal-model:

juju add-model temporal-model

You can check it’s status as follows:

juju status
# >>> Model           Controller           Cloud/Region  Version  SLA          Timestamp
# >>> temporal-model  temporal-controller  ck8s          3.6.8    unsupported  06:26:34-06:00
# >>>
# >>> Model "admin/temporal-model" is empty.

See next: Deploying Temporal Server

Hi @ali-kelkawi

I went through this tutorial and I think it is a bit outdated. When I run:

sudo snap install juju --channel 3.1/stable

it installs juju 3.1.10.

Later when I run the command:

juju deploy postgresql-k8s --channel 14/stable --trust

I get the error:

  - charm requires at least one of the following:
    - charm requires all of the following:
      - charm requires feature "juju" (version < 3.0.0) but model currently supports version 3.1.10
    - charm requires all of the following:
      - charm requires feature "juju" (version >= 3.4.3) but model currently supports version 3.1.10
    - charm requires all of the following:
      - charm requires feature "juju" (version >= 3.5.1) but model currently supports version 3.1.10

which shows that the model version is outdated. I confirmed my model version being 3.1.10.

I managed to get around this by destroying everything with:

juju destroy-controller  --destroy-all-models --destroy-storage temporal-controller

and then I upgraded juju to version 3.5.7 with:

sudo snap refresh juju --channel 3.5/stable

I reran the whole tutorial and my model was version 3.5.7 on the second pass through.

Hi @adriaan ! Yes, the tutorial is a bit outdated - we are in the middle of upgrading atm. Please bear with us while we do it.

Regarding the error you are running into, yes, the latest juju supported version is 3.6 (LTS) - which is what we use to test our charms. Please use that version instead.