Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added new jenkins agents and logging bug-fix #126

Merged
merged 1 commit into from
May 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docker/plugins.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,5 @@ workflow-basic-steps
workflow-step-api
ws-cleanup
job-import-plugin
workflow-multibranch
workflow-multibranch
pipeline-utility-steps
2 changes: 1 addition & 1 deletion lib/ci-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export class CIStack extends Stack {
const certificateArn = Secret.fromSecretCompleteArn(this, 'certificateArn', importedArnSecretBucketValue.toString());
const listenerCertificate = ListenerCertificate.fromArn(certificateArn.secretValue.toString());
const agentNode = new AgentNodes(this);
const agentNodes: AgentNodeProps[] = [agentNode.AL2_X64, agentNode.AL2_ARM64];
const agentNodes: AgentNodeProps[] = [agentNode.AL2_X64, agentNode.AL2_X64_DOCKER_1, agentNode.AL2_ARM64, agentNode.AL2_ARM64_DOCKER_1];

const mainJenkinsNode = new JenkinsMainNode(this, {
vpc,
Expand Down
4 changes: 2 additions & 2 deletions lib/compute/agent-node-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export class AgentNodeConfig {
associatePublicIp: false,
connectBySSHProcess: false,
connectionStrategy: 'PRIVATE_IP',
customDeviceMapping: '/dev/xvda=:100:true:::encrypted',
customDeviceMapping: '/dev/xvda=:300:true:::encrypted',
deleteRootOnTermination: true,
description: `jenkinsAgentNode-${config.workerLabelString}`,
ebsEncryptRootVolume: 'ENCRYPTED',
Expand All @@ -163,7 +163,7 @@ export class AgentNodeConfig {
minimumNumberOfSpareInstances: 1,
mode: 'EXCLUSIVE',
monitoring: true,
numExecutors: 1,
numExecutors: 4,
remoteAdmin: config.remoteUser,
remoteFS: '/var/jenkins',
securityGroups: props.agentNodeSecurityGroup,
Expand Down
18 changes: 18 additions & 0 deletions lib/compute/agent-nodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ export class AgentNodes {
// Refer: https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/ec2/model/InstanceType.html for instance types
readonly AL2_X64: AgentNodeProps;

readonly AL2_X64_DOCKER_1: AgentNodeProps;

readonly AL2_ARM64: AgentNodeProps;

readonly AL2_ARM64_DOCKER_1: AgentNodeProps;

constructor(stack: Stack) {
this.AL2_X64 = {
workerLabelString: 'AL2-X64',
Expand All @@ -31,6 +35,13 @@ export class AgentNodes {
+ ' sudo yum install -y java-1.8.0-openjdk cmake python3 python3-pip python3-devel && sudo yum groupinstall -y "Development Tools" &&'
+ ' sudo ln -sfn `which pip3` /usr/bin/pip && pip3 install pipenv && sudo ln -s ~/.local/bin/pipenv /usr/local/bin',
};
this.AL2_X64_DOCKER_1 = {
workerLabelString: 'Jenkins-Agent-al2-x64-c54xlarge-Docker-Host',
instanceType: 'C54xlarge',
remoteUser: 'ec2-user',
amiId: 'ami-00a07e55fcad01043',
initScript: 'sudo yum update -y || sudo yum update -y',
prudhvigodithi marked this conversation as resolved.
Show resolved Hide resolved
};
this.AL2_ARM64 = {
workerLabelString: 'AL2-ARM64',
instanceType: 'C6g4xlarge',
Expand All @@ -43,5 +54,12 @@ export class AgentNodes {
+ ' sudo yum install -y java-1.8.0-openjdk cmake python3 python3-pip python3-devel && sudo yum groupinstall -y "Development Tools" &&'
+ ' sudo ln -sfn `which pip3` /usr/bin/pip && pip3 install pipenv && sudo ln -s ~/.local/bin/pipenv /usr/local/bin',
};
this.AL2_ARM64_DOCKER_1 = {
workerLabelString: 'Jenkins-Agent-al2-arm64-c6g4xlarge-Docker-Host',
instanceType: 'C6g4xlarge',
remoteUser: 'ec2-user',
amiId: 'ami-020c52efb1a60f1ae',
initScript: 'sudo yum update -y || sudo yum update -y',
prudhvigodithi marked this conversation as resolved.
Show resolved Hide resolved
};
}
}
Loading