diff options
| author | Shulhan <ms@kilabit.info> | 2022-06-30 01:44:12 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2022-08-05 00:02:10 +0700 |
| commit | cb31f4f3fd1a24b8268cca34f9bfefaf3b747a5d (patch) | |
| tree | d4a2081f011c037bcc58a87aae9fd8a8c873034b /gcloud-image-test.aww | |
| parent | 015e2edf17ef7bdb7fd05a9f848c4747a62e7a6f (diff) | |
| download | compute-archlinux-image-builder-cb31f4f3fd1a24b8268cca34f9bfefaf3b747a5d.tar.xz | |
all: add awwan scripts to deploy and test image
The gcloud-image-publish.aww is the script to publish the recently
build image to gcloud and create new image.
The gcloud-image-test.aww is the script to test the new image by
creating new compute engine.
The gcloud-test-image-official.aww is the script to test the official
public image from Google.
The gcloud-test-tail.aww is the script to get the serial log from
test image in compute engine.
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 |
