Last active
August 29, 2015 14:27
-
-
Save jlrigau/35b9fcc20833d6af5e1a to your computer and use it in GitHub Desktop.
How to update service configuration and restart a service on Marathon?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MARATHON_BASE_URL=http://[REPLACE_IT]:8080 | |
VERSION=$(curl -X PUT -H "Content-Type: application/json" $MARATHON_BASE_URL/v2/apps/dashboard?force=true -d@dashboard.json | jq '.version' | tr -d '"') | |
if [ $(curl -sL -w "%{http_code}" $MARATHON_BASE_URL/v2/apps/dashboard/versions/$VERSION -o /dev/null) != 200 ]; then | |
curl -X POST $MARATHON_BASE_URL/v2/apps/dashboard/restart?force=true | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment