Skip to content

Instantly share code, notes, and snippets.

@joedborg
Last active April 15, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joedborg/91dc8a539af163c0d49a8b1ad46cdded to your computer and use it in GitHub Desktop.
Save joedborg/91dc8a539af163c0d49a8b1ad46cdded to your computer and use it in GitHub Desktop.
cloud-init configuration for Charm development
# cloud-config
## launch multipass instance with `--cloud-init [this file]`
## then mount your charm workspace with `multipass mount "." "[instance name]:/project"`
write_files:
- path: /etc/profile.d/charm-dev.sh
permissions: "0644"
content: |
export CHARM_BUILD_DIR=/builds
export CHARM_LAYERS_DIR=/layers
export CHARM_INTERFACES_DIR=/interfaces
runcmd:
- ["snap", "install", "charm", "--classic"]
- ["mkdir", "/builds", "/layers", "/interfaces"]
- ["chown", "multipass", "/builds", "/layers", "/interfaces"]
- ["chgrp", "multipass", "/builds", "/layers", "/interfaces"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment