Expert assistant for provisioning charm development and testing environments using concierge...
Expert guidance for provisioning and managing charm development and testing environments using concierge.
Concierge is an opinionated utility for automating the setup of charm development machines. It:
# Full development environment (recommended for most developers)
sudo concierge prepare -p dev
# Machine charm development only
sudo concierge prepare -p machine
# Kubernetes-focused development
sudo concierge prepare -p k8s
# Lightweight K8s with MicroK8s
sudo concierge prepare -p microk8s
# Build tools only (no Juju)
sudo concierge prepare -p crafts
Presets comparison:
| Preset | Juju | LXD | K8s | MicroK8s | Charmcraft | Snapcraft | Rockcraft | Jhack |
|---|---|---|---|---|---|---|---|---|
| dev | ✓ | ✓† | ✓† | — | ✓ | ✓ | ✓ | ✓ |
| machine | ✓ | ✓† | — | — | ✓ | ✓ | — | — |
| k8s | ✓ | ✓* | ✓† | — | ✓ | — | ✓ | — |
| microk8s | ✓ | ✓* | — | ✓† | ✓ | — | ✓ | — |
| crafts | — | ✓ | — | — | ✓ | ✓ | ✓ | — |
Legend:
For detailed preset information, see references/presets.md
# Check provisioning status
concierge status
# Possible states:
# - "provisioning" - Setup in progress
# - "succeeded" - Ready for development
# - "failed" - Setup encountered errors
# Reverse the prepare operation
sudo concierge restore
⚠️ CRITICAL WARNING:
restore does NOT account for packages/configuration that existed before prepareprepare operationprepare, restore will remove itCreate a concierge.yaml file in your working directory:
juju:
channel: "3.6/stable"
agent_version: "3.6.0"
bootstrap_constraints:
cores: 4
mem: 8G
model_defaults:
logging-config: "<root>=INFO"
providers:
microk8s:
enable: true
bootstrap: true
channel: "1.31-strict/stable"
lxd:
enable: true
bootstrap: true
channel: "5.21/stable"
k8s:
enable: false
gcloud:
enable: false
host:
snaps:
- name: astral-uv
channel: "latest/edge"
classic: true
- name: jhack
channel: "latest/stable"
debs:
- build-essential
- python3-dev
Then run:
sudo concierge prepare -c concierge.yaml
For complete YAML schema, see references/configuration.md
# Override snap channels
sudo concierge prepare -p dev --juju-channel=4.0/edge
# Install extra packages
sudo concierge prepare -p dev \
--extra-snaps=astral-uv/latest/edge,jhack \
--extra-debs=build-essential,python3-tox
# Skip Juju installation/bootstrap
sudo concierge prepare -p crafts --disable-juju
# Use Google Cloud credentials
sudo concierge prepare -p k8s --google-credential-file=~/gcloud-creds.json
Channel override flags:
--juju-channel--lxd-channel--k8s-channel--microk8s-channel--charmcraft-channel--snapcraft-channel--rockcraft-channelAll flags have environment variable equivalents:
# Set via environment
export CONCIERGE_JUJU_CHANNEL="4.0/edge"
export CONCIERGE_EXTRA_SNAPS="astral-uv/latest/edge,jhack"
export CONCIERGE_EXTRA_DEBS="build-essential"
sudo concierge prepare -p dev
Variable naming: Flag --juju-channel becomes CONCIERGE_JUJU_CHANNEL
# 1. Install concierge
sudo snap install --classic concierge
# 2. Prepare full dev environment
sudo concierge prepare -p dev --extra-snaps=jhack
# 3. Verify installation
concierge status
juju controllers
lxc list
# 4. Start developing
cd my-charm-project
charmcraft pack
juju deploy ./my-charm.charm
# Prepare K8s environment
sudo concierge prepare -p k8s
# Verify controller
juju controllers
juju models
# Deploy a K8s charm
juju add-model test
juju deploy postgresql-k8s
# Just install craft tools (no Juju)
sudo concierge prepare -p crafts
# Build charms and rocks
cd my-charm
charmcraft pack
cd ../my-rock
rockcraft pack
# Automated setup for CI
sudo concierge prepare -p dev \
--juju-channel=3.6/stable \
--extra-snaps=astral-uv/latest/edge \
--extra-debs=python3-tox,make
# Check it worked
concierge status
if [ $? -eq 0 ]; then
echo "Environment ready"
fi
# Remove everything concierge installed
sudo concierge restore
# Verify cleanup
concierge status
dev for general charm development - Includes everything most developers needmachine for traditional charms - No K8s overheadk8s or microk8s for K8s-only work - Lighter than devcrafts for build servers - Minimal installation for building onlyconcierge.yamlconcierge.yamlrestore on production machines - It removes configurations blindlyconcierge status shows what happenedprepare unnecessarilysnap refresh for updates, not restore+prepare# Run with verbose logging
sudo concierge prepare -p dev -v
# Run with trace logging for detailed output
sudo concierge prepare -p dev --trace
# Check status
concierge status
Common issues:
If Juju controller bootstrap fails:
# Check Juju logs
juju debug-log -m controller
# Manually bootstrap if needed
juju bootstrap lxd
juju bootstrap microk8s
# Check provider status
lxc list # For LXD
microk8s status # For MicroK8s
# Check what will be restored
concierge status
# Run restore with logging
sudo concierge restore -v
If restore fails:
# Check snap connectivity
snap version
snap list
# Manually install problematic snaps
sudo snap install juju --channel=3.6/stable --classic
# Then retry prepare
sudo concierge prepare -p dev
# Prepare environment
sudo concierge prepare [flags]
sudo concierge prepare -p <preset>
sudo concierge prepare -c <config-file>
# Check status
concierge status
# Restore/cleanup
sudo concierge restore
# Shell completion
concierge completion bash
concierge completion zsh
concierge completion fish
# Help
concierge --help
concierge prepare --help
concierge --version
# Logging
sudo concierge prepare -p dev -v # Verbose
sudo concierge prepare -p dev --trace # Trace (very detailed)
# Dry run
sudo concierge prepare -p dev --dry-run
# Prepare environment
sudo concierge prepare -p dev
# Develop charm
cd my-charm
charmcraft init --profile=kubernetes
charmcraft pack
charmcraft test
# Deploy
juju deploy ./my-charm.charm
# Install jhack during prepare
sudo concierge prepare -p dev --extra-snaps=jhack
# Or add to concierge.yaml
# host:
# snaps:
# - name: jhack
# channel: latest/stable
# Use jhack for development
jhack sync src/ myapp/0
jhack tail myapp/0
# Install build tools
sudo concierge prepare -p dev \
--extra-snaps=astral-uv/latest/edge \
--extra-debs=python3-tox
# Use in charm development
cd my-charm
tox -e lint
tox -e unit
uv sync
# GitHub Actions example
- name: Prepare environment
run: |
sudo snap install --classic concierge
sudo concierge prepare -p dev --extra-snaps=astral-uv/latest/edge
- name: Verify setup
run: concierge status
- name: Run tests
run: |
charmcraft pack
charmcraft test
Concierge uses this priority order (highest to lowest):
--juju-channel=4.0/edgeCONCIERGE_JUJU_CHANNEL=4.0/edgeconcierge.yamldev preset# Common operations
sudo concierge prepare -p dev # Full dev environment
sudo concierge prepare -p machine # Machine charm dev
sudo concierge prepare -p k8s # K8s charm dev
concierge status # Check status
sudo concierge restore # Remove everything
# With customisation
sudo concierge prepare -p dev --extra-snaps=jhack
sudo concierge prepare -p dev --juju-channel=4.0/edge
sudo concierge prepare -c my-config.yaml
sudo concierge prepare -p dev -v # Verbose output
# Environment variables
export CONCIERGE_JUJU_CHANNEL="3.6/stable"
export CONCIERGE_EXTRA_SNAPS="jhack"
sudo concierge prepare -p dev
When you need detailed information:
Key reminders:
restore does NOT preserve pre-existing configurationsconcierge status to verify setup--extra-snaps=jhack for rapid development-v or --trace when troubleshootingsudo is required to prepare or restore