#!/bin/bash series="lunar" model="${series}-sos" cat > juju-model-sos.yaml << EOF cloudinit-userdata: | package_update: true package_upgrade: true apt: sources: proposed: source: deb \$MIRROR \$RELEASE-proposed restricted main multiverse universe packages: - sosreport postruncmd: - [ 'apt', 'install', '-y', 'sosreport/*-proposed' ] EOF juju add-model ${model} juju model-config ./juju-model-sos.yaml juju deploy ubuntu --series ${series} -n 5 --force juju-wait -v -e ${model} # wait for package to finish install sleep 5 juju run --all -- dpkg -l sosreport sos collect --cluster-type juju --no-local -c "juju.apps=ubuntu" --batch --case-id 3524678 --all-logs -a