Muehlenhoff has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/379502 )
Change subject: Remove beta::saltmaster::tools and /usr/local/bin/beta-apaches ...................................................................... Remove beta::saltmaster::tools and /usr/local/bin/beta-apaches Salt is being removed, Cumin provides more powerful methods to address specific servers, not sure if that script is still very useful and worth porting to Cumin. If you want to keep it (and update it), let me know and I'll abandon the patch. Change-Id: Idb33b54bb80f433110865eef62c32b608756d6d1 --- D modules/beta/files/scripts/beta-apaches D modules/beta/manifests/saltmaster/tools.pp 2 files changed, 0 insertions(+), 88 deletions(-) Approvals: Thcipriani: Looks good to me, but someone else must approve Muehlenhoff: Looks good to me, approved Hashar: Looks good to me, but someone else must approve jenkins-bot: Verified diff --git a/modules/beta/files/scripts/beta-apaches b/modules/beta/files/scripts/beta-apaches deleted file mode 100755 index 0349158..0000000 --- a/modules/beta/files/scripts/beta-apaches +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/env bash -# Send commands to the beta apache servers via salt - -set -e - -APACHE_ROLE=role::mediawiki::appserver -BATCH_SIZE="50%" -ACTIONS=('start' 'stop' 'restart' 'graceful' 'graceful-stop' 'configtest') -ACTION= - -function join() { - local IFS="$1" - shift - echo "$*" -} - -function usage() { - echo - echo "Usage: $0 [OPTIONS] <ACTION>" - echo "Send commands to the beta apache servers via salt" - echo " --help|-h : This help message" - echo " --batch-size|-b <SIZE> : Number of hosts to message at once." - echo " Both percentages and finite numbers are supported." - echo " (default ${BATCH_SIZE})" - echo " <ACTION> : $(join '|' "${ACTIONS[@]}")" -} - -while test "$#" -gt 0; do - case "$1" in - --help|-h) - usage - exit 0 - ;; - --batch-size|-b) - BATCH_SIZE="$2" - shift 2 - ;; - --) - shift - break - ;; - -*) - echo "Unknown option: '$1'" >&2 - usage - exit 2 - ;; - *) - if [[ -z $ACTION ]]; then - for e in "${ACTIONS[@]}"; do - if [[ $e == $1 ]]; then - ACTION=$1 - shift - fi - done - fi - if [[ -z $ACTION ]]; then - echo "Unknown action: '$1'" >&2 - usage - exit 2 - fi - ;; - esac -done - -# If required argument isn't present, show usage -if [[ -z $ACTION ]]; then - echo "No action given." >&2 - usage - exit 1 -fi - -# Run apache.signal via salt targeting nodes with the desired grain -exec /usr/bin/sudo -- /usr/bin/salt \ - -G "rolename:${APACHE_ROLE}" \ - --batch-size "${BATCH_SIZE}" \ - apache.signal "$ACTION" diff --git a/modules/beta/manifests/saltmaster/tools.pp b/modules/beta/manifests/saltmaster/tools.pp deleted file mode 100644 index c14be1c..0000000 --- a/modules/beta/manifests/saltmaster/tools.pp +++ /dev/null @@ -1,12 +0,0 @@ -# == Class: beta::saltmaster::tools -# -# Provisions tools and scripts that are helpful on the salt master. -# -class beta::saltmaster::tools { - file { '/usr/local/bin/beta-apaches': - owner => 'root', - group => 'root', - mode => '0555', - source => 'puppet:///modules/beta/scripts/beta-apaches'; - } -} -- To view, visit https://gerrit.wikimedia.org/r/379502 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Idb33b54bb80f433110865eef62c32b608756d6d1 Gerrit-PatchSet: 3 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Muehlenhoff <mmuhlenh...@wikimedia.org> Gerrit-Reviewer: BryanDavis <bda...@wikimedia.org> Gerrit-Reviewer: Chad <ch...@wikimedia.org> Gerrit-Reviewer: Hashar <has...@free.fr> Gerrit-Reviewer: Muehlenhoff <mmuhlenh...@wikimedia.org> Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits