blob: d6d9ea030932a620da08af09683997c4dc313119 [file] [view]
# Starting the VM that hosts the Docker container
```bash
gcloud compute instances delete \
--project bazel-public \
--zone us-central1-a \
--quiet \
buildkite-agent-metrics
gcloud compute instances create \
--project bazel-public \
--boot-disk-size 20GB \
--machine-type n1-standard-1 \
--zone us-central1-a \
--image-project=ubuntu-os-cloud \
--image-family=ubuntu-2404-lts-amd64 \
--scopes cloud-platform \
--service-account buildkite-agent-metrics@bazel-public.iam.gserviceaccount.com \
--metadata-from-file=startup-script=start.sh \
buildkite-agent-metrics
```
# About the service account
The service account used for the VM must have at least the following permissions:
- `Secret Manager Secret Accessor` for the secrets that store the Buildkite agent tokens.
- `Logging > Logs Writer` to write logs to Stackdriver Logging.
- `Monitoring > Monitoring Metric Writer` to write to the Stackdriver Metrics.