From 740b143deffee29d31a9535d63ae7847bc7ffa20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=BChnel?= Date: Mon, 2 Dec 2019 12:49:01 +0100 Subject: [PATCH] added docu: spwaning windows agents --- docs/playbooks.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/docs/playbooks.md b/docs/playbooks.md index 59a0333..a702b87 100644 --- a/docs/playbooks.md +++ b/docs/playbooks.md @@ -82,4 +82,21 @@ General hints: 6. Install [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/). 7. Install [gcloud](https://cloud.google.com/sdk/docs/quickstart-windows) and set it up according to the instructions. Then run `gcloud auth configure-docker` to authorize docker to push images. -Check your installation by running "docker build ." in the `containers/agent_windows` folder. \ No newline at end of file +Check your installation by running "docker build ." in the `containers/agent_windows` folder. + + +## Spawning a new windows agent + +To spawn a new windows agent: + +1. Go to the [GCP page](https://pantheon.corp.google.com/compute/instances?project=llvm-premerge-checks&instancessize=50) and pick a new number for the agent. +1. Update the machine name in `kubernetes/windows_agent_create.sh`. +1. Run `kubernetes/windows_agent_create.sh` +1. Go to the [GCP page](https://pantheon.corp.google.com/compute/instances?project=llvm-premerge-checks&instancessize=50) again +1. login to the new machine via RDP (you probably need to set the i). +1. In the RDP session: run these commands in the CMD window to start the docker container: +```cmd +powershell +Invoke-WebRequest -uri 'https://raw.githubusercontent.com/google/llvm-premerge-checks/master/kubernetes/windows_agent_bootstrap.ps1' -OutFile windows_agent_bootstrap.ps1 +.\windows_agent_bootstrap.ps1 +```