sos_testing/sos_collect_testing.sh

36 lines
766 B
Bash
Raw Permalink Normal View History

2023-10-30 20:04:25 +00:00
#!/bin/bash
2024-04-16 14:35:04 +00:00
series="jammy"
2023-10-30 20:04:25 +00:00
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
2024-04-16 14:35:04 +00:00
ppa:
source: ppa:arif-ali/sosreport-dev
2023-10-30 20:04:25 +00:00
packages:
- sosreport
2024-04-16 14:35:04 +00:00
#postruncmd:
# - [ 'apt', 'install', '-y', 'sosreport/*-proposed' ]
2023-10-30 20:04:25 +00:00
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