-
Scripts
-
Overview
- Automation eases management of large number of VMs
- Automate software installation, updates, services
- Easily and programmatically customize VMs
- Key component of instance groups and autoscaling
-
Considerations
- Scripts always run as root/administrator
- Can run whatever script types OS recognizes
-
Input Method
- Direct input allows users to paste instance properties in script field
- Very useful for large scale automation
- Link to script in Google Cloud Storage
- Must have access to bucket/object
- Using metadata server URL
-
Shutdown
- Best effort basis
- Run during shutdown period
- May shutdown before script completes
- Good to pair with preemptible instances
- Great for managed instance group/autoscaler
-
Agent
- Gathers system and application metrics from VM and sends them to Cloud Monitoring
- Without the Agent, only CPU, disk traffic, network traffic and uptime metrics are collected
- Using the agent is optional but recommended
- Monitors many 3rd party applications
-
Labels
- Labels are key-value pairs
- Tools for organizing resources
- Can be applied across all resources
- Search for and filter resources by labels
- Organization purpose only
- Does not affect resource operation
-
Quotas
- Used to set a cap on resources
- e.g. 24 CPUs per region, 5 static IPs per project
- Prevents unexpected spikes in usage and billing
- Prevents runaway consumption due to error or malicious intent
- Forces user to re-assess needs
- Most quotas are soft caps and can be raised by request
- Free trials have additional quotas in place
- Support ticket or self service form
-
Types
- Resources per project (global, not region-bound)
- API rate limit per request per project
- Per region