From 2152b6c368c6a305905108aaff6f78a3cfd7a822 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Nov 2017 23:13:42 +0100 Subject: script for creating windows debug worker --- tools/gce/create_windows_debug_worker.sh | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100755 tools/gce/create_windows_debug_worker.sh (limited to 'tools') diff --git a/tools/gce/create_windows_debug_worker.sh b/tools/gce/create_windows_debug_worker.sh new file mode 100755 index 0000000000..9ac82eb3f6 --- /dev/null +++ b/tools/gce/create_windows_debug_worker.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2017 gRPC authors. +# +# 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. + +# Creates a worker for debugging/experiments. +# The worker will have all the prerequisites that are installed on kokoro +# windows workers. + +set -ex + +cd $(dirname $0) + +CLOUD_PROJECT=grpc-testing +ZONE=us-central1-b + +if [ "$1" != "" ] +then + INSTANCE_NAME="$1" +else + INSTANCE_NAME="${USER}-windows-kokoro-debug1" +fi + +MACHINE_TYPE=n1-standard-8 +TMP_DISK_NAME="$INSTANCE_NAME-temp-disk" + +gcloud compute disks create $TMP_DISK_NAME \ + --project="$CLOUD_PROJECT" \ + --zone "$ZONE" \ + --image-project google.com:kokoro \ + --image empty-100g-image \ + --type pd-ssd + +echo 'Created scratch disk, waiting for it to become available.' +sleep 15 + +gcloud compute instances create $INSTANCE_NAME \ + --project="$CLOUD_PROJECT" \ + --zone "$ZONE" \ + --machine-type $MACHINE_TYPE \ + --image-project google.com:kokoro \ + --image kokoro-win7build-v9-prod-debug \ + --boot-disk-type pd-ssd \ + --tags=allow-ssh \ + --disk auto-delete=yes,boot=no,name=$TMP_DISK_NAME -- cgit v1.2.3 From 4160ec4dc0e4c0e950672b9516ead0dbda7208e0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 2 Nov 2017 11:47:11 +0100 Subject: simplify create windows debug worker script --- tools/gce/create_windows_debug_worker.sh | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'tools') diff --git a/tools/gce/create_windows_debug_worker.sh b/tools/gce/create_windows_debug_worker.sh index 9ac82eb3f6..b56c8d95d9 100755 --- a/tools/gce/create_windows_debug_worker.sh +++ b/tools/gce/create_windows_debug_worker.sh @@ -32,17 +32,6 @@ else fi MACHINE_TYPE=n1-standard-8 -TMP_DISK_NAME="$INSTANCE_NAME-temp-disk" - -gcloud compute disks create $TMP_DISK_NAME \ - --project="$CLOUD_PROJECT" \ - --zone "$ZONE" \ - --image-project google.com:kokoro \ - --image empty-100g-image \ - --type pd-ssd - -echo 'Created scratch disk, waiting for it to become available.' -sleep 15 gcloud compute instances create $INSTANCE_NAME \ --project="$CLOUD_PROJECT" \ @@ -50,6 +39,6 @@ gcloud compute instances create $INSTANCE_NAME \ --machine-type $MACHINE_TYPE \ --image-project google.com:kokoro \ --image kokoro-win7build-v9-prod-debug \ - --boot-disk-type pd-ssd \ - --tags=allow-ssh \ - --disk auto-delete=yes,boot=no,name=$TMP_DISK_NAME + --boot-disk-size 500 \ + --boot-disk-type pd-ssd \ + --tags=allow-ssh -- cgit v1.2.3