0
0
GCPcloud~5 mins

Startup scripts for automation in GCP - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is a startup script in Google Cloud Platform (GCP)?
A startup script is a set of commands that automatically run when a virtual machine (VM) instance starts. It helps automate setup tasks like installing software or configuring settings.
Click to reveal answer
beginner
Where do you specify a startup script for a VM in GCP?
You specify a startup script in the VM instance's metadata under the key 'startup-script'. This script runs every time the VM boots.
Click to reveal answer
beginner
Why use startup scripts instead of manual setup on VMs?
Startup scripts automate repetitive tasks, ensure consistency across VMs, save time, and reduce human errors during setup.
Click to reveal answer
intermediate
How can you debug a startup script if it fails on a GCP VM?
Check the serial port output logs of the VM in the GCP Console. Logs often show errors from the startup script to help identify issues.
Click to reveal answer
beginner
What is a common format for startup scripts in GCP VMs?
Startup scripts are usually shell scripts (bash) for Linux VMs or PowerShell scripts for Windows VMs.
Click to reveal answer
Where do you add a startup script for a GCP VM?
AIn the IAM permissions
BIn the VM's firewall rules
CIn the Cloud Storage bucket
DIn the VM's metadata under 'startup-script'
What happens when a startup script runs on a VM?
AIt runs commands automatically when the VM starts
BIt deletes the VM
CIt changes the VM's machine type
DIt pauses the VM
Which log helps you debug startup script errors on a GCP VM?
ACloud DNS logs
BCloud Audit logs
CSerial port output logs
DBilling logs
What scripting language is commonly used for Linux VM startup scripts?
APython
BBash shell script
CPowerShell
DJavaScript
Why automate VM setup with startup scripts?
ATo save time and ensure consistent setup
BTo increase VM cost
CTo disable VM networking
DTo manually configure each VM
Explain what a startup script is and how it helps automate VM setup in GCP.
Think about what happens automatically when a VM starts.
You got /4 concepts.
    Describe how you would troubleshoot a startup script that is not working on a GCP VM.
    Where does the VM show boot messages and errors?
    You got /4 concepts.