Skip to content

Commit 98a4f9d

Browse files
authored
Merge pull request #121 from redhat-performance/pcp_pkg_mgt2
Pcp pkg mgt2
2 parents 6a69091 + d5b797d commit 98a4f9d

File tree

2 files changed

+45
-3
lines changed

2 files changed

+45
-3
lines changed

pcp/pcp.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"dependencies": {
3+
"rhel": [
4+
"pcp-zeroconf",
5+
"pcp-pmda-openmetrics",
6+
"pcp-pmda-denki"
7+
],
8+
"sles": [
9+
"pcp-zeroconf"
10+
],
11+
"ubuntu": [
12+
"pcp-zeroconf"
13+
]
14+
}
15+
}

pcp/pcp_commands.inc

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,37 @@ setup_pcp()
5555
# If pmlogger isn't present, install the PCP bits
5656
pcp_present=$(which pmlogger)
5757
if [[ $? -ne 0 ]]; then
58-
package_tool --packages pcp-zeroconf,pcp-pmda-openmetrics,pcp-pmda-denki
58+
${TOOLS_BIN}/package_tool --no_packages $to_no_pkg_install --wrapper_config ${TOOLS_BIN}/pcp/pcp.json
5959
fi
60-
61-
working_dir="/usr/local/src/PCPrecord"
60+
# Distro-specific magic required once the packages are installed
61+
running_os=`${TOOLS_BIN}/detect_os`
62+
case "$running_os" in
63+
"ubuntu")
64+
# Ubuntu drops the PMDAs in a known place when zeroconf is used, but doesn't make them usable.
65+
# Each has its own installer which has to be run from its own directory.
66+
pushd /var/lib/pcp/pmdas/openmetrics
67+
./Install
68+
popd
69+
pushd /var/lib/pcp/pmdas/denki
70+
./Install
71+
popd
72+
;;
73+
"sles")
74+
# SLES drops the PMDAs in a known place when zeroconf is used, but doesn't make them usable.
75+
# Each has its own installer which has to be run from its own directory.
76+
pushd /var/lib/pcp/pmdas/openmetrics
77+
./Install
78+
popd
79+
pushd /var/lib/pcp/pmdas/denki
80+
./Install
81+
popd
82+
;;
83+
*)
84+
# Nothing to do, the installation did everything for us
85+
;;
86+
esac
87+
88+
working_dir="/usr/local/src/PCPrecord"
6289

6390
mkdir -p "${working_dir}"
6491
chmod 755 ${TOOLS_BIN}/pcp/*.sh

0 commit comments

Comments
 (0)