Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 13 additions & 7 deletions ganglia/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,22 @@ rm -rf /mnt/ganglia/rrds/*
mkdir -p /mnt/ganglia/rrds
chown -R nobody:nobody /mnt/ganglia/rrds

# Install ganglia
# TODO: Remove this once the AMI has ganglia by default
OLD_GANGLIA_PACKAGES="httpd* php* ganglia* ganglia* ganglia-gmond* ganglia-gmetad*"
GANGLIA_PACKAGES="httpd24-2.4* php56-5.6* ganglia-3.6* ganglia-web-3.5* ganglia-gmond-3.6* ganglia-gmetad-3.6*"

GANGLIA_PACKAGES="ganglia ganglia-web ganglia-gmond ganglia-gmetad"

if ! rpm --quiet -q $GANGLIA_PACKAGES; then
yum install -q -y $GANGLIA_PACKAGES;
fi
#block till other yum process finishes its job
while [ -f /var/run/yum.pid ]; do sleep 1; done

#Uninstalls older version of ganglia from master if it was reinstalled in AMI
yum remove -q -y $OLD_GANGLIA_PACKAGES 2>&1 | grep -v "No Match for argument:"
yum install -q -y $GANGLIA_PACKAGES & sleep 1
wait

for node in $SLAVES $OTHER_MASTERS; do
ssh -t -t $SSH_OPTS root@$node "if ! rpm --quiet -q $GANGLIA_PACKAGES; then yum install -q -y $GANGLIA_PACKAGES; fi" & sleep 0.3
#Uninstalls older version of ganglia from other masters if it was reinstalled in AMI
ssh -t -t $SSH_OPTS root@$node "yum remove -q -y $OLD_GANGLIA_PACKAGES 2>&1 | grep -v 'No Match for argument:'"
ssh -t -t $SSH_OPTS root@$node "yum install -q -y $GANGLIA_PACKAGES" & sleep 0.3
done
wait

Expand Down
2 changes: 1 addition & 1 deletion templates/etc/httpd/conf/httpd.conf
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ LoadModule version_module modules/mod_version.so
LoadModule unixd_module modules/mod_unixd.so
LoadModule access_compat_module modules/mod_access_compat.so
LoadModule mpm_prefork_module modules/mod_mpm_prefork.so
LoadModule php5_module modules/libphp-5.5.so
LoadModule php5_module modules/libphp-5.6.so

#
# The following modules are not loaded by default:
Expand Down