diff --git a/rbe/install-k8s-prow-builds.sh b/rbe/install-k8s-prow-builds.sh index 5943f4f7501f..a27a2e497d59 100755 --- a/rbe/install-k8s-prow-builds.sh +++ b/rbe/install-k8s-prow-builds.sh @@ -21,7 +21,7 @@ proj=k8s-prow-builds pool=prow-pool workers=200 disk=600 -machine=n1-standard-2 +machine=e2-standard-2 bot=pr-kubekins@kubernetes-jenkins-pull.iam.gserviceaccount.com "$(dirname "$0")/install.sh" "$proj" "$pool" "$workers" "$disk" "$machine" "$bot" diff --git a/rbe/install-k8s-prow.sh b/rbe/install-k8s-prow.sh index feebfa9d1ef8..7a467747f0a6 100755 --- a/rbe/install-k8s-prow.sh +++ b/rbe/install-k8s-prow.sh @@ -21,7 +21,7 @@ proj=k8s-prow pool=prow-pool workers=20 disk=600 -machine=n1-standard-2 +machine=e2-standard-2 bots=( deployer@k8s-prow.iam.gserviceaccount.com pusher@k8s-prow.iam.gserviceaccount.com diff --git a/rbe/install.sh b/rbe/install.sh index 7914766aed78..1735c57752fb 100755 --- a/rbe/install.sh +++ b/rbe/install.sh @@ -49,12 +49,20 @@ log() { log gcloud services enable remotebuildexecution.googleapis.com "--project=$proj" -check=( - gcloud alpha remote-build-execution - worker-pools describe - "$pool" "--project=$proj" --instance=default_instance +check_instance=( + gcloud alpha remote-build-execution instances describe default_instance "--project=$proj" ) +check_pools=( + gcloud alpha remote-build-execution worker-pools describe "$pool" "--project=$proj" --instance=default_instance +) + +if ! "${check_instance[@]}" 2>/dev/null; then + log gcloud alpha remote-build-execution instances create \ + default_instance \ + "--project=$proj" +fi + if [[ -z $pool ]]; then echo "Existing pools:" >&2 for i in $(gcloud alpha remote-build-execution worker-pools list \ @@ -67,7 +75,8 @@ if [[ -z $pool ]]; then exit 1 fi -if ! "${check[@]}" 2>/dev/null; then + +if ! "${check_pools[@]}" 2>/dev/null; then log gcloud alpha remote-build-execution worker-pools create \ "$pool" \ "--project=$proj" \