Juju is an open source application orchestration engine that enables any application operation (deployment, integration, lifecycle management) on any infrastructure (Kubernetes or otherwise) at any scale (development or production) in the same easy way (typically, one line of code), through special operators called ‘charms’.
👉 | Juju | Learn how to quickly deploy, integrate, and manage charms on any cloud with Juju. It's as simple as juju deploy foo , juju integrate foo bar , ..., on any cloud. |
Charmhub | Sample our existing charms on Charmhub. A charm can be a cluster (OpenStack, Kubernetes), a data platform (PostgreSQL, MongoDB, etc.), an observability stack (Canonical Observability Stack), an MLOps solution (Kubeflow), and so much more. |
|
Charm SDK | Write your own charm! Juju is written in Go, but our SDK supports easy charm development in Python. |
Let's use Juju to deploy, configure, and integrate some Kubernetes charms:
You will need a cloud and Juju. The quickest way is to use a Multipass VM launched with the charm-dev
blueprint.
Install Multipass: Linux | macOS | Windows. On Linux:
sudo snap install multipass
Use Multipass to launch an Ubuntu VM with the charm-dev
blueprint:
multipass launch --cpus 4 --memory 8G --disk 30G --name tutorial-vm charm-dev
Open a shell into the VM:
multipass shell tutorial-vm
Verify that you have Juju and two localhost clouds:
juju clouds
Bootstrap a Juju controller into the MicroK8s cloud:
juju bootstrap microk8s tutorial-controller
Add a workspace, or 'model':
juju add-model tutorial-model
Deploy Mattermost:
juju deploy mattermost-k8s
See more: Charmhub |
mattermost-k8s
Deploy PostgreSQL:
juju deploy postgresql-k8s --channel 14/stable --trust
See more: Charmhub |
postgresql-k8s
Enable security in your PostgreSQL deployment:
juju deploy tls-certificates-operator
juju config tls-certificates-operator generate-self-signed-certificates="true" ca-common-name="Test CA"
juju integrate postgresql-k8s tls-certificates-operator
Integrate Mattermost with PostgreSQL:
juju integrate mattermost-k8s postgresql-k8s:db
Watch your deployment come to life:
juju status --watch 1s
(Press Ctrl-C
to quit. Drop the --watch 1s
flag to get the status statically. Use the --relations
flag to view more information about your integrations.)
When everything is in active
or idle
status, note the IP address and port of Mattermost and pass them to curl
:
curl <IP address>:<port>/api/v4/system/ping
You should see the output below:
{"AndroidLatestVersion":"","AndroidMinVersion":"","IosLatestVersion":"","IosMinVersion":"","status":"OK"}
You now have a Kubernetes deployment consisting of a Mattermost backed by PosgreSQL with TLS-encrypted traffic!
Delete your Multipass VM:
multipass delete --purge tutorial-vm
Uninstall Multipass: Linux | macOS | Windows. On Linux:
snap remove multipass
- Read our user docs
- Read our developer docs
Read our Code of conduct and:
- Join our chat: Mattermost, Freenode IRC
- Join our forum: Discourse
- Report a Juju bug on Launchpad
- Raise a general https://juju.is/docs documentation issue on Github | juju/docs
- Read our documentation contributor guidelines and help improve a doc
- Read our codebase contributor guidelines and help improve the codebase