diff options
Diffstat (limited to 'gcloud-image-test.aww')
| -rw-r--r-- | gcloud-image-test.aww | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/gcloud-image-test.aww b/gcloud-image-test.aww new file mode 100644 index 0000000..218dae7 --- /dev/null +++ b/gcloud-image-test.aww @@ -0,0 +1,30 @@ +## Script to test the published image manually by creating new compute +## instance. + +#require: gcloud config configurations activate {{.Val "gcloud::config"}} + +gcloud compute instances create arch-test \ + --zone={{.Val "gcloud::zone"}} \ + --image={{.Val "host::image"}} \ + --metadata=block-project-ssh-keys=TRUE \ + --machine-type=f1-micro + +gcloud compute instances describe arch-test \ + --zone={{.Val "gcloud::zone"}} + +gcloud compute instances tail-serial-port-output {{.Val "host::name"}} \ + --zone={{.Val "gcloud::zone"}} \ + +gcloud compute ssh \ + --zone={{.Val "gcloud::zone"}} \ + --command="lsblk -o NAME,UUID,MOUNTPOINTS; cat /etc/fstab; timedatectl show-timesync; localectl" \ + arch-test + +##---- Cleaning up. + +gcloud compute instances stop arch-test \ + --zone={{.Val "gcloud::zone"}} + +gcloud compute instances delete arch-test \ + --zone={{.Val "gcloud::zone"}} \ + --quiet |
