diff --git a/README.md b/README.md index d0f80bc8..71114c98 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,9 @@ The installation script and the update-designer.sh script set environment variab so you may want to logout/login, or start a new bash shell before using Labtainers the first time. +September 23, 2024 +- Replaced google cloud VM, which was using the wrong Docker version + September 10, 2024 - Typo in creation of imodule path diff --git a/google/base_create24.sh b/google/base_create24.sh new file mode 100755 index 00000000..cc6e74a4 --- /dev/null +++ b/google/base_create24.sh @@ -0,0 +1,19 @@ +#!/bin/bash +if [ "$#" -ne 1 ]; then + echo "create_vm.sh " + exit +fi +user_id=$1 +vm_name=$user_id-labtainervm +cp cloud_init.template cloud_init.txt +gcloud compute instances create $vm_name --image-family=ubuntu-2204-lts \ + --machine-type=e2-standard-2 \ + --image-project=ubuntu-os-cloud \ + --metadata-from-file=user-data=cloud_init.txt +echo "wait 40 seconds" +sleep 40 +gcloud compute ssh labtainer@$vm_name --command='echo "VM created, wait for reboot"' || exit +cp ~/.ssh/google_compute_engine ~/.ssh/id_labtainers +cp ~/.ssh/google_compute_engine.pub ~/.ssh/id_labtainers.pub +echo "Now wait until up." +./waitdone.sh $user_id diff --git a/google/cloud_init.template b/google/cloud_init.template index 5d27e06c..2fd4bcea 100644 --- a/google/cloud_init.template +++ b/google/cloud_init.template @@ -36,7 +36,7 @@ write_files: runcmd: - apt install -y apt-transport-https ca-certificates curl software-properties-common - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" +- add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" - apt update - cache policy docker-ce - apt install -y docker-ce diff --git a/google/create_vm.sh b/google/create_vm.sh index bb9d38e3..a862e16e 100755 --- a/google/create_vm.sh +++ b/google/create_vm.sh @@ -9,7 +9,7 @@ fi user_id=$1 vm_name=$user_id-labtainervm zone=$(./findzone.sh) -gcloud compute instances create $vm_name --image=https://www.googleapis.com/compute/v1/projects/labtainers/global/images/labtainervm7 \ +gcloud compute instances create $vm_name --image=https://www.googleapis.com/compute/v1/projects/labtainers/global/images/labtainervm8 \ --metadata-from-file=user-data=user_config.txt --zone=$zone gcloud compute disks resize $vm_name --size 30G --zone=$zone -q # instances fail ssh until settled diff --git a/google/publishImage.sh b/google/publishImage.sh index a53a5c18..f62cef01 100755 --- a/google/publishImage.sh +++ b/google/publishImage.sh @@ -15,6 +15,6 @@ # Only then run this script # # -gcloud compute images add-iam-policy-binding labtainervm7 \ +gcloud compute images add-iam-policy-binding labtainervm8 \ --member='allAuthenticatedUsers' \ --role='roles/compute.imageUser'