A cloud engineer is authoring an automated shell script to deploy Compute Engine virtual machines dedicated to nightly batch analytics processing. The processing jobs are fault-tolerant, stateless, and require aggressive cost optimization. Additionally, each VM must automatically execute a boot configuration script located on the local administrator machine at `/local/config/init.sh` upon startup. Which flags should be included in the `gcloud compute instances create` command to satisfy these operational requirements? (Select TWO)
- --provisioning-model=SPOTCevap
- --metadata-from-file=startup-script=/local/config/init.shCevap
- C--scopes=startup-script=/local/config/init.sh
- D--metadata=startup-script=/local/config/init.sh
Cevap
The correct options are the flag specifying the SPOT provisioning model and the flag using metadata-from-file to pass the local startup script path.
For fault-tolerant batch workloads, specifying `--provisioning-model=SPOT` ensures the instance runs on GCP excess capacity at significant cost savings. Furthermore, to pass a script stored on the client machine to Compute Engine instance metadata for execution at boot, `--metadata-from-file` must be used so that `gcloud` reads the file content prior to API submission.
Adım Adım Çözüm
Anahtar Kavram
Compute Engine instance deployment flags for Spot VMs and local startup script metadata.