How to get started as an application developer?

Existing tutorial

I needed to dive into Juju and Charmhub, so I used this tutorial:

https://juju.is/docs/olm/microk8s

See this annotated PDF for some notes. how-to-use-microk8s.pdf (63.4 KB)

At the end of the tutorial my mental model is:

Suggested tutorial (or does it already exist?)

Overall, this was useful, but I think it would be worth introducing Juju + microk8s to an application developer specifically, so that they can:

  • get a feel for the tools (“kick the tyres”)
  • learn some terminology
  • understand the benefits

Persona

I am a server application developer (including microservices). I can write an application, install it on an Ubuntu server and hook it up to a database and other resources. I can also configure (for example) a load-balancing web server.

I am not familiar with Juju or Kubernetes, but I understand they will make things like deployments, upgrades and scaling easier.

Does something like the following tutorial already exist?

Outline

Let’s take a simple Django application and deploy it to microk8s using Juju. The application has two components, the Django code and a PostreSQL database:

https://github.com/digitalocean/sample-django

We should be able to:

  • build an OCI image from the source code
  • create a Juju namespace in microk8s
  • deploy the OCI image
  • deploy the PostgreSQL charm
  • hook things up :mage:
  • access the Django website from our browser

Next steps

Now that we have a basic application running, we should be able to:

  • update the source code
  • including a Django data migrations (e.g. new field)
  • generate a new OCI image from the source code
  • deploy the update
  • confirm it still works!
3 Likes

Hi, some of this might overlap with this tutorial, though I think your outline is clearer and doesn’t assume as much knowledge as the tutorial.

  • Daniel
1 Like

The tutorial that you mentioned is on our roadmap to be published as an official Juju SDK tutorial. Timeline, end of the January 2023. Key target for my tutorial is to explain how to create charms for K8s and integrate with other charms.

I would be glad to have a chat/call and discuss if something is missing.

1 Like

Hi there, Do you mean the tutorial David linked to: Juju | How to use MicroK8s with Juju ? If so, I have some feedback!

FWIW, after skimming through, I ended up with a diagram that is slightly different from yours:

Now I’m annoyed my ‘laptop host’ blob doesn’t encompass my ‘cloud (mk8s)’ blob. The perils of OCD.

I am about From Zero to Hero: Write your first Kubernetes charm - doc - Charmhub

2 Likes