Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/guides/operator-private-gcp-confidential-space.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,10 @@ When you run `terraform apply`, the following file is generated in the same fold
Be sure to follow the recommended practices for Terraform `state` files: they are required for maintaining the deployed infrastructure, and they might contain sensitive information. For details, see [state](https://developer.hashicorp.com/terraform/language/state) in the Terraform documentation.
:::

:::note
If `terraform init` or `terraform apply` fails with `An argument named "version_destroy_ttl" is not expected here`, you're using an earlier version of the template that pulls in an incompatible version of the `secret-manager` module. In `main.tf`, change the `secret-manager` module `version` from `"~> 0.1"` to `"0.9.0"`, and then run `terraform init` and `terraform apply` again.
:::

#### Test Terraform using the health check endpoint

Call the health check endpoint to test the health of your implementation. The expected result is HTTP 200 with a response body of `OK`.
Expand Down Expand Up @@ -532,10 +536,34 @@ If you're upgrading to a new version, the upgrade process depends on the deploym

If you previously deployed the Private Operator for GCP using the Terraform template, compare the latest version of the template with the one you used when you deployed. If there are changes, make sure to redeploy to include all the updates.

When you first apply a version of the template that references the Confidential Space image family, the managed instance group replaces all of its VMs once. It creates each replacement before deleting an old VM, so there's no downtime. Make sure your project has quota for three additional VMs of the configured machine type during the replacement.

### Refreshing the Confidential Space image

A VM keeps the Confidential Space image it was created with, and restarting a VM doesn't change it. Google keeps each image `STABLE` for only about six months, and UID2 accepts only operators that run a `STABLE` image. Refresh your VMs at least every 5 months, and whenever UID2 notifies you that your image is being retired.

If you deployed using the Terraform template, the instance template references the image family, so each new VM gets the newest image when it's created. VMs in the same group can therefore run different images. To move every VM to the latest image, replace all the VMs in the managed instance group, which is named `{network_name}-mig`:

```
gcloud compute instance-groups managed rolling-action replace {network_name}-mig --region {REGION} --max-surge 3 --max-unavailable 0
```

The flags keep every existing VM serving until its replacement has been running for 10 minutes, giving the new operator time to start and attest, so the refresh causes no downtime and takes about 10 minutes. Don't drop `--max-unavailable 0`: without it, gcloud can take every VM offline at once when `min_replicas` is small.

:::note
- Don't use `rolling-action restart`, which keeps the existing boot disk and image.
- Re-running `terraform apply` doesn't refresh the image, because the template doesn't change.
- After a `rolling-action replace`, the next `terraform plan` shows a change to the instance group's version name. Applying it replaces all VMs again, also without downtime, in about 10 minutes.
:::

If you deployed using the gcloud CLI, delete and recreate your instances with `--image-family confidential-space`. For details, see [Upgrading—gcloud CLI](#upgradinggcloud-cli).

### Upgrading—gcloud CLI

If you deployed using the gcloud CLI, you must manually bring up new instances that use the new `{OPERATOR_IMAGE}` and then shut down old instances.

Create the new instances with `--image-family confidential-space` so that they use the latest Confidential Space image. Rebooting or restarting an existing instance doesn't update its image. Recreate your instances at least every 5 months; see [Refreshing the Confidential Space image](#refreshing-the-confidential-space-image).

If you previously set up a load balancer manually, you'll also need to update the mapping for the load balancer.

## Scraping metrics
Expand Down
Loading