Use of the $DEVSHELL_PROJECT_ID environment variable within Cloud Shell is to help ensure the names of objects are unique. Since all Project IDs within Google Cloud must be unique, appending the Project ID should make other names unique as well.
Copy data from bucket to local dir
Create a vm with starting script from bucket
list instances of vm in the project
Create firewall rules to allow access to port 8080
stop vm
Create managed instance groups
list template instances
delete vm that we made template from
Create managed instance group
Since these are non-standard ports, you specify named ports to identify these. Named ports are key:value pair metadata representing the service name and the port that it’s running on. Named ports can be assigned to an instance group, which indicates that the service is available on all instances in the group. This information is used by the HTTP Load Balancing service that will be configured later.
Create a health check that repairs the instance if it returns “unhealthy” 3 consecutive times: