Add ADDITIONAL_REQS config option
- Define requirements packages in settings.
- Add COLLECTD_ADDITIONAL_PACKAGES variable.
- User can define requirements to be installed by using the above
variable in local.conf
- Install system requirements and user defined requirements in
libs/collectd.
Change-Id: If5883aa585be4c6a42e8ffbee9a59ad80de765ae
Closes-Bug: #1675120
This commit is contained in:
@@ -21,17 +21,8 @@ function stop_collectd {
|
||||
function install_requirements {
|
||||
echo "Installing pre-resquisites"
|
||||
|
||||
if is_ubuntu; then
|
||||
install_package libvirt-bin libvirt-dev python-libvirt
|
||||
if [[ "$COLLECTD_INSTALL_TYPE" == "source" ]]; then
|
||||
install_package byacc flex bison build-essential automake libgcrypt20 libtool
|
||||
fi
|
||||
|
||||
elif is_fedora; then
|
||||
install_package libvirt libvirt-devel libvirt-python
|
||||
if [[ "$COLLECTD_INSTALL_TYPE" == "source" ]]; then
|
||||
install_package flex bison automake autoconf libtool
|
||||
fi
|
||||
if [[ ! -z "$COLLECTD_REQUIREMENTS" ]]; then
|
||||
install_package $COLLECTD_REQUIREMENTS $COLLECTD_ADDITIONAL_PACKAGES
|
||||
else
|
||||
echo "Unsupported distros"
|
||||
fi
|
||||
|
||||
@@ -43,3 +43,27 @@ fi
|
||||
#Custom units feature
|
||||
COLLECTD_CEILOMETER_UNITS=${COLLECTD_CEILOMETER_CUSTOM_UNITS:-none}
|
||||
COLLECTD_GNOCCHI_UNITS=${COLLECTD_GNOCCHI_CUSTOM_UNITS:-none}
|
||||
|
||||
# User defined requirements
|
||||
COLLECTD_ADDITIONAL_PACKAGES=${COLLECTD_ADDITIONAL_PACKAGES:-''}
|
||||
COLLECTD_REQUIREMENTS=''
|
||||
|
||||
# Definition for requirements
|
||||
ubuntu_bin_requirements="libvirt-bin libvirt-dev python-libvirt"
|
||||
ubuntu_src_requirements="$ubuntu_bin_requirements byacc flex bison build-essential automake libgcrypt20 libtool"
|
||||
centos_bin_requirements="libvirt libvirt-devel libvirt-python"
|
||||
centos_src_requirements="$centos_bin_requirements flex bison automake autoconf libtool"
|
||||
|
||||
if is_ubuntu; then
|
||||
if [[ "$COLLECTD_INSTALL_TYPE" == "source" ]]; then
|
||||
COLLECTD_REQUIREMENTS="$ubuntu_src_requirements"
|
||||
else
|
||||
COLLECTD_REQUIREMENTS="$ubuntu_bin_requirements"
|
||||
fi
|
||||
elif is_fedora; then
|
||||
if [[ "$COLLECTD_INSTALL_TYPE" == "source" ]]; then
|
||||
COLLECTD_REQUIREMENTS="$centos_src_requirements"
|
||||
else
|
||||
COLLECTD_REQUIREMENTS="$centos_bin_requirements"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -78,6 +78,17 @@ To enable this feature execute the following instructions:
|
||||
|
||||
| COLLECTD_CUSTOM_UNITS="<meter> <unit>,<meter> <unit>"
|
||||
|
||||
Custom Packages Feature
|
||||
------------------------
|
||||
|
||||
This feature enables users to define new packages to be installed when building
|
||||
collectd.
|
||||
|
||||
* To include your new packages, add the following line with your chosen
|
||||
packages to your local.conf file.
|
||||
|
||||
| COLLECTD_ADDITIONAL_PACKAGES="package1 package2 package3"
|
||||
|
||||
Gnocchi
|
||||
=======
|
||||
|
||||
|
||||
@@ -130,6 +130,15 @@ COLLECTD_PREFIX
|
||||
|
||||
Default: /usr/
|
||||
|
||||
COLLECTD_ADDITIONAL_PACKAGES
|
||||
Specify additional packages to be installed before collectd is
|
||||
built/installed. This is useful when building collectd from source it
|
||||
will make sure the packages are installed. Collectd plugins are
|
||||
automatically installed/built if requirements are met, so there is no need
|
||||
for manual installation. A space separates packages.
|
||||
|
||||
Example: COLLECTD_ADDITIONAL_PACKAGES="package1 package2 package3"
|
||||
|
||||
|
||||
Authenticating using Identity Server API v3
|
||||
===========================================
|
||||
|
||||
Reference in New Issue
Block a user