The purpose of this document is to define how to create a new Google Compute Engine custom image with required dependencies. You can use the new image to provision virtual machine (VM) instances with all dependencies already installed.
NOTE: To run the following script, make sure that you are signed in to the Google Cloud project with administrative rights.
To run the script, use the create-custom-image.sh
command. To set the image created by this script as a default custom image, add the --default
flag to the command.
NOTE: Adding the
--default
flag to this script adds thedefault:yes
label to the created custom image. By default, theprovision-vm-and-start-kyma-k3d.sh
script selects the latest default custom image available in Kyma project to provision the VM instance.
The script performs the following steps:
-
Provision a new VM under the VM instance in the Google Compute Engine. The new VM instance is named according to the kyma-deps-image-vm-{RANDOM_ID} pattern and created in a random zone in Europe.
-
Move the
install-deps-debian.sh
script to the newly provisioned VM and execute it. -
Shut down the new VM after installing all the required dependencies specified in
install-deps-debian.sh
. -
Create a new image using
--source-disk
as kyma-deps-image-vm-{RANDOM_ID} under the custom-images image family in the Google Compute Engine. This creates a new kyma-deps-image-{Current_Date} image. -
Delete the provisioned kyma-deps-image-vm-{RANDOM_ID} VM.