From e660113a62daa6e076e3946613c4d511bf0ec3b4 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 10 Aug 2022 17:06:17 -0400 Subject: [PATCH] Update agent setups so each executor takes 4 cores Signed-off-by: Peter Zhu --- lib/compute/agent-node-config.ts | 11 ++++++----- lib/compute/agent-nodes.ts | 15 +++++++++++++-- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/lib/compute/agent-node-config.ts b/lib/compute/agent-node-config.ts index f479cd15..8b054812 100644 --- a/lib/compute/agent-node-config.ts +++ b/lib/compute/agent-node-config.ts @@ -24,9 +24,10 @@ export interface AgentNodeProps { workerLabelString: string; remoteUser: string; maxTotalUses: number; + minimumNumberOfSpareInstances: number; numExecutors: number; - initScript: string, - remoteFs: string + initScript: string; + remoteFs: string; } export interface AgentNodeNetworkProps { readonly agentNodeSecurityGroup: string; @@ -174,7 +175,7 @@ export class AgentNodeConfig { launchTimeoutStr: '300', maxTotalUses: config.maxTotalUses, minimumNumberOfInstances: 0, - minimumNumberOfSpareInstances: 1, + minimumNumberOfSpareInstances: config.minimumNumberOfSpareInstances, mode: 'EXCLUSIVE', monitoring: true, numExecutors: config.numExecutors, @@ -220,7 +221,7 @@ export class AgentNodeConfig { initScript: config.initScript, maxTotalUses: config.maxTotalUses, minimumNumberOfInstances: 1, - minimumNumberOfSpareInstances: 0, + minimumNumberOfSpareInstances: config.minimumNumberOfSpareInstances, mode: 'EXCLUSIVE', monitoring: true, numExecutors: config.numExecutors, @@ -271,7 +272,7 @@ export class AgentNodeConfig { launchTimeoutStr: '1000', maxTotalUses: config.maxTotalUses, minimumNumberOfInstances: 0, - minimumNumberOfSpareInstances: 1, + minimumNumberOfSpareInstances: config.minimumNumberOfSpareInstances, mode: 'EXCLUSIVE', monitoring: true, numExecutors: config.numExecutors, diff --git a/lib/compute/agent-nodes.ts b/lib/compute/agent-nodes.ts index 199d9ca8..870f58b8 100644 --- a/lib/compute/agent-nodes.ts +++ b/lib/compute/agent-nodes.ts @@ -41,6 +41,7 @@ export class AgentNodes { instanceType: 'C54xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-00a07e55fcad01043', initScript: 'sudo yum clean all && sudo rm -rf /var/cache/yum /var/lib/yum/history && sudo yum repolist &&' @@ -54,7 +55,8 @@ export class AgentNodes { instanceType: 'C54xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, - numExecutors: 8, + minimumNumberOfSpareInstances: 2, + numExecutors: 4, amiId: 'ami-00a07e55fcad01043', initScript: 'sudo yum clean all && sudo rm -rf /var/cache/yum /var/lib/yum/history && sudo yum repolist &&' + ' sudo yum update --skip-broken --exclude=openssh* --exclude=docker* -y && sudo yum install -y ntp &&' @@ -67,6 +69,7 @@ export class AgentNodes { instanceType: 'M52xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 8, amiId: 'ami-00a07e55fcad01043', initScript: 'sudo yum clean all && sudo rm -rf /var/cache/yum /var/lib/yum/history && sudo yum repolist &&' @@ -80,6 +83,7 @@ export class AgentNodes { instanceType: 'C6g4xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-020c52efb1a60f1ae', initScript: 'sudo yum clean all && sudo rm -rf /var/cache/yum /var/lib/yum/history && sudo yum repolist &&' @@ -93,7 +97,8 @@ export class AgentNodes { instanceType: 'C6g4xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, - numExecutors: 8, + minimumNumberOfSpareInstances: 2, + numExecutors: 4, amiId: 'ami-020c52efb1a60f1ae', initScript: 'sudo yum clean all && sudo rm -rf /var/cache/yum /var/lib/yum/history && sudo yum repolist &&' + ' sudo yum update --skip-broken --exclude=openssh* --exclude=docker* -y && sudo yum install -y ntp &&' @@ -106,6 +111,7 @@ export class AgentNodes { instanceType: 'C524xlarge', remoteUser: 'ubuntu', maxTotalUses: 1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-0f6ceb3b3687a3fba', initScript: 'sudo apt-mark hold docker docker.io openssh-server && docker ps &&' @@ -120,6 +126,7 @@ export class AgentNodes { instanceType: 'M52xlarge', remoteUser: 'ubuntu', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-0f6ceb3b3687a3fba', initScript: 'sudo apt-mark hold docker docker.io openssh-server && docker ps &&' @@ -134,6 +141,7 @@ export class AgentNodes { instanceType: 'Mac1Metal', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 6, amiId: 'ami-022cee9eedb91288a', initScript: 'echo', @@ -145,6 +153,7 @@ export class AgentNodes { instanceType: 'C54xlarge', remoteUser: 'Administrator', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: 'ami-07591ca4ef792c2d4', initScript: 'echo', @@ -157,6 +166,7 @@ export class AgentNodes { instanceType: 'C54xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: MachineImage.latestAmazonLinux({ generation: AmazonLinuxGeneration.AMAZON_LINUX_2, @@ -174,6 +184,7 @@ export class AgentNodes { instanceType: 'C6g4xlarge', remoteUser: 'ec2-user', maxTotalUses: -1, + minimumNumberOfSpareInstances: 1, numExecutors: 1, amiId: MachineImage.latestAmazonLinux({ generation: AmazonLinuxGeneration.AMAZON_LINUX_2,