0f3203b18c
Sync charms.ceph and use helper functions to determine whether any changes in the source configuration option are a supported upgrade path. If an upgrade path is detected then upgrade via apt_install with the full list of required packages for the radosgw to force an upgrade. Change-Id: I48a8b5d14ad6ac11af57ddf0260a4a41744e7e21 Closes-Bug: 1539335
18 lines
371 B
Bash
Executable File
18 lines
371 B
Bash
Executable File
#!/bin/bash -e
|
|
# Install required dependencies for charm runtime
|
|
|
|
declare -a DEPS=('apt' 'netaddr' 'netifaces' 'yaml' 'jinja2' 'dnspython' 'pyudev')
|
|
|
|
check_and_install() {
|
|
pkg="${1}-${2}"
|
|
if ! dpkg -s ${pkg} 2>&1 > /dev/null; then
|
|
apt-get -y install ${pkg}
|
|
fi
|
|
}
|
|
|
|
PYTHON="python3"
|
|
|
|
for dep in ${DEPS[@]}; do
|
|
check_and_install ${PYTHON} ${dep}
|
|
done
|