From bcd47ce1ea117c4113de98bf192118bbd854b24e Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 7 Sep 2022 19:43:26 -0400 Subject: [PATCH] Add more memory for winrm session on Windows Signed-off-by: Peter Zhu --- lib/compute/agent-node-config.ts | 2 +- lib/compute/agent-nodes.ts | 2 +- packer/scripts/windows/userdata.ps1 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/compute/agent-node-config.ts b/lib/compute/agent-node-config.ts index 8b054812..7a63ab09 100644 --- a/lib/compute/agent-node-config.ts +++ b/lib/compute/agent-node-config.ts @@ -266,7 +266,7 @@ export class AgentNodeConfig { ebsOptimized: true, hostKeyVerificationStrategy: 'OFF', iamInstanceProfile: this.AgentNodeInstanceProfileArn, - idleTerminationMinutes: '120', + idleTerminationMinutes: '60', initScript: config.initScript, labelString: config.workerLabelString, launchTimeoutStr: '1000', diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index 49da706e..5cd2eee1 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -146,7 +146,7 @@ export class AgentNodes { maxTotalUses: 10, minimumNumberOfSpareInstances: 2, numExecutors: 1, - amiId: 'ami-0d09c60aa060b8e02', + amiId: 'ami-0710dc5e5094bde27', initScript: 'echo', remoteFs: 'C:\\Users\\Administrator\\jenkins', }; diff --git a/packer/scripts/windows/userdata.ps1 b/packer/scripts/windows/userdata.ps1 index 1809eb90..dc70c76c 100644 --- a/packer/scripts/windows/userdata.ps1 +++ b/packer/scripts/windows/userdata.ps1 @@ -5,7 +5,7 @@ cmd /c winrm quickconfig -q cmd /c winrm quickconfig '-transport:http' cmd /c winrm set "winrm/config" '@{MaxTimeoutms="1800000"}' -cmd /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="1024"}' +cmd /c winrm set "winrm/config/winrs" '@{MaxMemoryPerShellMB="10240"}' cmd /c winrm set "winrm/config/service" '@{AllowUnencrypted="true"}' cmd /c winrm set "winrm/config/client" '@{AllowUnencrypted="true"}' cmd /c winrm set "winrm/config/service/auth" '@{Basic="true"}'