Learn how to build a minimal Charm

by Michael Jaeger on 11 February 2022

The previous blog post talked about the community workshops taking place in the Juju and Charm community. Normally the community workshops take place every Friday at 10:00 am CET. The details for these workshops can be found in the public channel on Mattermost. In one of the workshops, Erik Lönroth held a tutorial on how to build a minimal Charm.

A Charm tutorial from the community

Unlike existing tutorials, Erik’s tutorial presumes an empty computer with a vanilla OS. It explains every step when you start from nothing.

Charming requires a test and development environment, where the application can be run and deployed. Accordingly, the first steps of the tutorial are not only about installing the tool named Charmcraft. The first steps also involve the local environments, Juju and LXD.

LXD runs and manages containers in your local environment, just like a local cloud. This local cloud will be used to run your application. At the same time Juju coordinates the local cloud software and runs the Charm for your application. After the deployment and setup of prerequisites have been finished, the tutorial goes ahead. It will explain creating and building a very simple Charm derived from Erik’s collection of example projects on his Github account.

So, in case you are new to Charming, and you are new to Juju and would like to start with a very first experiment: the new tutorial Build and Deploy a Minimal Charm is online now!

And if you are ready to continue on the Charming journey, you can also access more step-by-step guides in the Juju tutorials section. Further, great video tutorials about Charming are on our YouTube channel, such as the excellent recording of a workshop for building a charmed operator by Jon Seager.

Further readings



Related posts

A Charming community: how to join the Juju and Charmed Operators community

If you are familiar with open source, you know that the community is what drives a project and gives its purpose, keeps it alive and thriving. So, it is important to support that community, and provide tools and encouragement to help it grow. Today, we would highlight the community behind Juju and Charmed Operators and […]

Join us at Operator Day, hosted by Canonical at Kubecon NA 2022

The 5th Operator Day is coming up. It will take place at KubeCon North America 2022. This edition will center on cases where software operators have been applied successfully. Join us to hear about our experience in building software operators using Juju, an open-source operator lifecycle manager. Operators implemented for Juju are called […]

Best practices to publish open-source software operators

Running or operating applications requires several tasks throughout their lifecycle: scaling instances, checking the health, integrating with other applications, running backups, and applying updates – to name a few examples. It’s a time and labour-intensive process. To automate these tasks, developers can implement scripts for repeated e […]