Last active
January 31, 2021 16:52
-
-
Save bahamat/b1f6511ebdaea510a0f9391c75e2362c to your computer and use it in GitHub Desktop.
Script to update/upgrade all components of SDC/Triton
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
[root@headnode (barovia) ~]# cat /opt/custom/bin/update-all | |
#!/bin/bash | |
set -o errexit | |
set -o xtrace | |
imgadm vacuum -f | |
sdcadm update --all --just-images -y | |
sdcadm self-update --allow-major-update --latest | |
sdcadm dc-maint start && printf "DC maintenance has started at %s\n" "$(date)" | |
sdcadm update --all -y | |
sdcadm experimental update-agents --latest --all -y | |
sdcadm experimental update-other | |
sdcadm experimental update-gz-tools --latest | |
sdcadm dc-maint stop && printf "DC maintenance has ended at %s\n" "$(date)" | |
sdcadm platform remove -a --cleanup-cache -y | |
sdcadm platform install --latest | |
sdcadm platform assign --latest --all | |
sdcadm platform set-default --latest | |
sdc-oneachnode -a 'sdc-usbkey update' | |
# Optional, will disrupt fabric network traffic | |
sdcadm update portolan --force-data-path | |
printf 'Update of all components complete\n' | |
now=$(date +%Y%m%dT%H%M%SZ) | |
sdc-vmapi /vms?state=active\&tag.smartdc_type=core | json -Ha > "/opt/custom/core_services_${now}.json" | |
exit | |
update-agents Update SDC agents | |
dc-maint Show and modify the DC maintenance mode. | |
update-other Temporary grabbag for small SDC update steps. | |
update-gz-tools Temporary grabbag for updating the SDC global zone tools. | |
add-new-agent-svcs Temporary grabbag for installing the SDC global zone new agents. | |
update-docker Add/update the docker service. | |
install-docker-cert Installs a custom TLS certificate to be used by sdc-docker. | |
portolan Add/update the portolan service. | |
fabrics Initialize fabrics in the datacenter. | |
default-fabric Initialize a default fabric for an account. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following script can be used to reboot all compute nodes, but you need to be sure this isn't going to disrupt your tenants.