OpenWaterFoundation / cdss-app-snodas-tools

Colorado's Decision Support Systems (CDSS) Snow Data Assimilation System (SNODAS) Tools
8 stars 4 forks source link

Need to do in place update of GCP compute engine to Ubuntu version 20.4 #27

Closed smalers closed 3 years ago

smalers commented 3 years ago

Need to do an in place update of the SNODAS GCP compute engine to version 20.4. See:

https://cloud.google.com/compute/docs/eol/ubuntu1604

Nightsphere commented 3 years ago

Updating Ubuntu from 16.04 to 20.04

From what I've gathered so far, it seems an immediate update from version 16.04 to 20.04 is not possible; an update to 18.04 will be needed to be done first. There are two options to perform the upgrade: using a graphical wizard, or the command line. Since this is updating a a headless machine, a command line is needed. an article which walks through the prompts that will display when updating are on Ubuntu's website here:

https://ubuntu.com/blog/how-to-upgrade-from-ubuntu-18-04-lts-to-20-04-lts-today

The sudo do-release-upgrade command is what is used to do the update. The -c option will not perform the update, but will output what version the OS will be upgraded to if run. The VM right now does indeed list 18.04 as that version. It seems like it will be easy enough to repeat the process from 18.04 to 20.04. Obviously a snapshot will be made of the VM in case something goes wrong.

GCP VM Snapshot

A walkthrough of creating a VM Snapshot can be found here:

https://cloud.google.com/compute/docs/disks/create-snapshots

EDIT: After more research, it seems that a machine image is what's needed to produce what we want. A table listing differences between machine images, persistent disk snapshots, custom images, and instance template can be found here:

https://cloud.google.com/compute/docs/machine-images

The important aspects that machine images have is both the ability for multiple disk backup (which none of the others have) and instance cloning and replication (which only a custom image has). Since a machine image can be used to create a new VM instance, it is considered a VM and is under that menu in the GCP Compute Engine sidebar. Whereas what we've done before is taken a snapshot of each of the disks in the VM separately, this would do that, plus everything else that needed to run the VM from the time the image was created. This is what the plan was, and I will do this moving forward.

Nightsphere commented 3 years ago

No issues have come up since the upgrade. Closing this issue.