Skip to content

DanielArndt/charm-dev-utils

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Charm development utils

A repository to collect initiatives around making the life of a charm author easier.

cloud-init

In the cloud-init directory you will find the following cloud-init scripts to launch reusable VMs to everyday charm development:

  • charm-dev-juju-3.2.yaml
  • charm-dev-juju-3.1.yaml
  • charm-dev-juju-3.0.yaml
  • charm-dev-juju-2.9.yaml
  • charm-dev-juju-latest-edge.yaml

These script will create a VM with:

How to launch a VM using cloud-init script

Let's say you need to launch a VM using Multipass that runs juju 3.0/stable with:

  • 4G RAM
  • 3 CPUs
  • 30G disk
  • and mounting your repos directory inside the ubuntu user home directory

you may run:

multipass launch --cloud-init charm-dev-juju-3.0.yaml \
--timeout 1200 \
--name charm-dev-juju-3 \
--memory 4G \
--cpus 3 \
--disk 30G \
--mount /home/jose/trabajos/canonical/repos:/home/ubuntu/repos

Once the VM is ready you will see:

Launched: charm-dev-juju-3
Mounted '/home/jose/trabajos/canonical/repos' into 'charm-dev-juju-3:/home/ubuntu/repos'

Now you can jump into the new VM:

multipass shell charm-dev-juju-3
Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.15.0-67-generic x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage


 * Introducing Expanded Security Maintenance for Applications.
   Receive updates to over 25,000 software packages with your
   Ubuntu Pro subscription. Free for personal use.

     https://ubuntu.com/pro

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


Last login: Fri Mar 24 15:40:53 2023 from 192.168.122.1
╭─ubuntu@charm-dev-juju-29 ~ [microk8s:controller]
╰─$

And voilà, you have a VM with all you need to start developing Charmed Operators!

zsh_themes

In the zsh_themes directory you will find a juju.zsh-theme that uses the juju plugin to show a prompt with juju information about controller and model.

prompt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%