Merge pull request #12 in PAR/yap from feature/DEV-2481-add-upgrade-command-to-yap to master

* commit 'f7ef72194f1b3e861bd4bd3020d41ac897aa2670':
  Fix format of docs
  Disable super verbose output
  Add upgrade command to yap for easier upgrading of nodes
This commit is contained in:
Emily Prachnau 2019-06-27 15:45:37 -07:00
commit dea80797db
2 changed files with 31 additions and 0 deletions

View File

@ -36,6 +36,19 @@ query the API. Add the user details using the ``yap`` tool::
yap auth-set user@example.com mypassword
Upgrading
==========
From the directory containing the YAP checkout, usually ~/yap, perform the
following::
git pull
make install
yap upgrade [region]
region can be left blank if you wish to upgrade all regions at once.
Setting up regions
==================

18
yap
View File

@ -510,6 +510,20 @@ function salt_exec() {
}
function upgrade() {
args=$(check_args region,skip,$1)
eval $args
if [ ! -z "$region" ] ; then
salt_update "$(get_region_nodelist $region)"
salt_exec "$(get_region_nodelist $region)" service.restart yap ||:
else
salt_update "$(get_full_nodelist)"
salt_exec "$(get_full_nodelist)" service.restart yap ||:
fi
}
#
# Region commands
#
@ -1229,6 +1243,7 @@ function usage() {
echo "auth-set <email> <password>"
echo "dump-config"
echo "upgrade [region]"
echo
}
@ -1248,6 +1263,9 @@ case "$action" in
dump-config)
dump_vars "$@"
;;
upgrade)
upgrade "$@"
;;
region-list)
region_list "$@"
;;