Created
March 16, 2016 13:37
-
-
Save gburd/2de32e9391b3175d8541 to your computer and use it in GitHub Desktop.
Joyent SDC update script
This file contains hidden or 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
#!/bin/bash | |
confirm () { | |
# call with a prompt string or use a default | |
read -r -p "${1:-Would you like to continue? [y/N]} " response | |
case $response in | |
[yY][eE][sS]|[yY]) | |
true | |
;; | |
*) | |
false | |
;; | |
esac | |
} | |
sdcadm channel set dev | |
sdcadm self-update --latest | |
sdcadm platform assign $(sdcadm platform list -j | json -a -c 'latest===true' version) --all | |
sdc-healthcheck | |
confirm || exit | |
set -e | |
# Image pre-download | |
sdcadm experimental update-gz-tools --latest --just-download | |
sdcadm experimental update-agents --latest --just-download --all | |
sdcadm platform install --latest | |
sdcadm update --all --just-images | |
sdcadm dc-maint --start | |
sdcadm experimental update-gz-tools --latest | |
sdcadm experimental update-other | |
sdcadm experimental update-agents --latest --all | |
sdcadm experimental add-new-agent-svcs | |
sdcadm update --all | |
sdcadm platform install --latest | |
sdcadm dc-maint --stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment