golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/windows/README.md (about)

     1  # Windows buildlet images
     2  
     3  Windows images are built by creating and configuring VMs in GCP then capturing the image to the GCP Project.
     4  
     5  ## Prerequisite: Access internal network
     6  
     7  The scripts assume the internal GCP network is accessible. To do this, create a linux VM in the project and SSH into the machine or use a VPN like [sshuttle](https://github.com/apenwarr/sshuttle).
     8  
     9  ## Examples/Tools
    10  
    11  ### Build and test a single base image
    12  Builds a buildlet from the BASE_IMAGE and sets it up with  and  An image is captured and then a new VM is created from that image and validated with [test_buildlet.bash](./test_buildlet.bash).
    13  
    14  ```bash
    15  export PROJECT_ID=YOUR_GCP_PROJECT
    16  export BASE_IMAGE=windows-server-2016-dc-core-v20171010
    17  export IMAGE_PROJECT=windows-cloud
    18  
    19  ./build.bash
    20  ```
    21  
    22  ### Build all targets
    23  ```bash
    24  PROJECT_ID=YOUR_GCP_PROJECT ./make.bash
    25  ```
    26  
    27  ### Build/test golang
    28  ```bash
    29  instance_name=golang-buildlet-test
    30  external_ip=$(gcloud compute instances describe golang-buildlet-test --project=${PROJECT_ID} --zone=${ZONE} --format="value(networkInterfaces[0].accessConfigs[0].natIP)")
    31  ./test_buildlet.bash $external_ip
    32  ```
    33  
    34  ### Troubleshoot via remote access
    35  ```bash
    36  ./rdp.bash <instance_name>
    37  ./ssh.bash <instance_name>
    38  ```