A financial analytics firm is configuring an automated deployment pipeline to provision Compute Engine instances for evening risk-modeling simulations. The workload consists of fault-tolerant, stateless processing jobs that can sustain abrupt instance terminations. Security policies require adhering to the principle of least privilege, using dedicated service account identities, and executing a boot-time bootstrap script stored in a private Cloud Storage bucket (`gs://finance-scripts-prod/bootstrap.sh`). Which TWO configuration flags must be included in the `gcloud compute instances create` command to satisfy these operational and security requirements?
- --provisioning-model=SPOT to leverage excess compute capacity at significantly reduced costs for fault-tolerant batch workloads.Cevap
- --metadata=startup-script-url=gs://finance-scripts-prod/bootstrap.sh to direct Compute Engine to download and run the script from Cloud Storage upon booting.Cevap
- C[email protected] to assign the custom service account identity to the virtual machine instance.
- D--maintenance-policy=MIGRATE to ensure continuous execution of the risk-modeling batch jobs during host infrastructure maintenance.
Cevap
The correct flags are specifying `--provisioning-model=SPOT` to run cost-effective fault-tolerant workloads, and using `--metadata=startup-script-url=gs://finance-scripts-prod/bootstrap.sh` to execute the startup script hosted in Google Cloud Storage.
Specifying `--provisioning-model=SPOT` is the recommended GCP mechanism for provisioning low-cost, fault-tolerant compute capacity suitable for stateless batch workloads. Additionally, using `--metadata=startup-script-url=gs://finance-scripts-prod/bootstrap.sh` allows Compute Engine instances to automatically fetch and execute the boot script stored in Cloud Storage without requiring custom disk images or manually injected startup script code.
Adım Adım Çözüm
Anahtar Kavram
Deploying Compute Engine Virtual Machines with Spot provisioning models and startup script metadata flags using the `gcloud` CLI.