Files
substrate/hack/ate-dev-env.sh.example
T
Huy Pham 9f57d78f4f Add --enable-nested-virtualization to setup-gcp (#1669)
Nested virtualization exposes `/dev/kvm`, which microVMs need. The new
`--enable-nested-virtualization` flag turns it on for the node pool
`setup-gcp` creates. It defaults to on, so pass
`--enable-nested-virtualization=false` for a cluster that does not need
it.

Also, rename the env var `GVISOR_NODE_MACHINE_TYPE` to
`NODE_MACHINE_TYPE` to be consistent with other env vars and to avoid
confusion for microVMs. The old env var still works with a warning.

- [x] Tests pass
- [x] Appropriate changes to documentation are included in the PR
2026-09-18 04:27:38 +00:00

53 lines
2.1 KiB
Plaintext

# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Example environment variables for Substrate development.
# Copy this file to .ate-dev-env.sh and customize it for your environment.
export PROJECT_ID=${USER}-gke-dev
export PROJECT_NUMBER=$(gcloud projects describe ${PROJECT_ID} --format="value(projectNumber)")
export GCE_REGION=us-west1
export CLUSTER_LOCATION=us-west1-c
export NETWORK=default
export SUBNETWORK=default
export CLUSTER_NAME=substrate-poc
# Supported: 1.36 (needs the beta APIs enabled at cluster creation, which
# setup-gcp does) or 1.37+ (APIs served by default). Anything below 1.36 does
# not work. GKE retires patch versions over time — if cluster creation rejects
# this pin, pick a current one from:
# gcloud container get-server-config --zone ${CLUSTER_LOCATION} --format="value(defaultClusterVersion)"
# See tools/setup-gcp/README.md ("Create Cluster") for the full constraint.
export CLUSTER_VERSION=1.36.3-gke.1767000
export NODE_POOL_NAME=gvisor-pool
export NODE_POOL_VERSION=1.36.3-gke.1767000
export NODE_MACHINE_TYPE=c3-standard-4
# Enable nested virtualization (required for microVMs)
export ENABLE_NESTED_VIRTUALIZATION=true
# Boot disk customizations (optional; defaults to GKE's default boot disk)
# export BOOT_DISK_SIZE_GB=500
# export BOOT_DISK_TYPE=hyperdisk-balanced
# Set this if you are using an existing cluster with a different context name.
export KUBECTL_CONTEXT=
export BUCKET_NAME=snapshot-substrate-test-${PROJECT_ID}
export KO_DOCKER_REPO="gcr.io/${PROJECT_ID}/ate-images"
# Set this if you want to override the default build platforms
export KO_DEFAULTPLATFORMS=linux/amd64