create_win2019_container_vm.sh 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # Copyright 2017 gRPC authors.
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # Creates a worker for debugging/experiments.
  16. # The worker will have all the prerequisites that are installed on kokoro
  17. # windows workers.
  18. set -ex
  19. cd "$(dirname "$0")"
  20. CLOUD_PROJECT=grpc-testing
  21. ZONE=us-central1-b
  22. if [ "$1" != "" ]
  23. then
  24. INSTANCE_NAME="$1"
  25. else
  26. INSTANCE_NAME="${USER}-win2019-for-containers-test1"
  27. fi
  28. MACHINE_TYPE=e2-standard-8
  29. # The image version might need updating.
  30. gcloud compute instances create "$INSTANCE_NAME" \
  31. --project="$CLOUD_PROJECT" \
  32. --zone "$ZONE" \
  33. --machine-type "$MACHINE_TYPE" \
  34. --boot-disk-size=400GB \
  35. --boot-disk-type pd-ssd \
  36. --image-project=windows-cloud \
  37. --image-family=windows-2019-for-containers
  38. # or use --image-family=windows-2019-core-for-containers