-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
- Loading branch information
1 parent
0a1da7b
commit 29e7904
Showing
5 changed files
with
383 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"variables": { | ||
"name-base":"Jenkins-Agent-AL2-ARM64", | ||
"os-version": "AL2", | ||
"build-region":"us-east-1", | ||
"build-vpc":"vpc-e415e999", | ||
"build-subnet":"subnet-852080e3", | ||
"build-secgrp":"sg-df26d4e2", | ||
"build-time":"{{isotime \"2006-01-02T03-04-05Z\"}}", | ||
"aws_ami_region":"us-east-1" | ||
}, | ||
"builders": [ | ||
{ | ||
"name":"{{user `name-base`}}-{{user `build-time`}}" , | ||
"ami_description":"{{user `name-base`}}", | ||
"type":"amazon-ebs", | ||
"encrypt_boot":"false", | ||
"region":"{{user `build-region`}}", | ||
"ami_regions":"{{user `aws_ami_region`}}", | ||
"instance_type":"c6g.4xlarge", | ||
"ami_name":"{{user `name-base`}}-{{user `build-time`}}", | ||
"vpc_id":"{{user `build-vpc`}}", | ||
"subnet_id":"{{user `build-subnet`}}", | ||
"security_group_ids":"{{user `build-secgrp`}}", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type":"hvm", | ||
"architecture":"arm64", | ||
"name": "amzn2-ami-kernel-5.10-hvm-*", | ||
"block-device-mapping.volume-type":"gp2", | ||
"root-device-type":"ebs" | ||
}, | ||
"owners": [ | ||
"amazon" | ||
], | ||
"most_recent":true | ||
}, | ||
"associate_public_ip_address":true, | ||
"ssh_username": "ec2-user", | ||
"ssh_timeout": "3h", | ||
"tags": { | ||
"Name": "{{user `name-base`}}-{{user `build-time`}}", | ||
"OS_Version":"{{user `os-version`}}", | ||
"User":"Packer", | ||
"Encrypted_AMI":"False", | ||
"Created":"{{user `build-time`}}" | ||
}, | ||
"launch_block_device_mappings": [ | ||
{ | ||
"device_name":"/dev/xvda", | ||
"volume_size":100, | ||
"delete_on_termination":true, | ||
"volume_type":"gp3" | ||
} | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "file", | ||
"source": "files/common/vm-max-map.sh", | ||
"destination": | ||
"/tmp/vm_max_map.sh" | ||
}, | ||
{ | ||
"type": "file", | ||
"source": "files/common/docker-daemon.json", | ||
"destination": | ||
"/tmp/daemon.json" | ||
}, | ||
{ | ||
"type":"shell", | ||
"scripts": [ | ||
"scripts/al2/al2-agent-setups.sh" | ||
] | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": [ | ||
"sudo mv -v /tmp/vm_max_map.sh /etc/profile.d/vm_max_map.sh", | ||
"sudo mv -v /tmp/daemon.json /etc/docker/daemon.json" | ||
] | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": [ | ||
"sudo reboot" | ||
], | ||
"expect_disconnect": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
{ | ||
"variables": { | ||
"name-base":"Jenkins-Agent-Ubuntu2004-X64", | ||
"os-version": "Ubuntu2004", | ||
"build-region":"us-east-1", | ||
"build-vpc":"vpc-0af0640f860d10309", | ||
"build-subnet":"subnet-0587f11ea29087ad6", | ||
"build-secgrp":"sg-00144097ec4790161", | ||
"build-time":"{{isotime \"2006-01-02T03-04-05Z\"}}", | ||
"aws_ami_region":"us-east-1" | ||
}, | ||
"builders": [ | ||
{ | ||
"name":"{{user `name-base`}}-{{user `build-time`}}" , | ||
"ami_description":"{{user `name-base`}}", | ||
"type":"amazon-ebs", | ||
"encrypt_boot":"false", | ||
"region":"{{user `build-region`}}", | ||
"ami_regions":"{{user `aws_ami_region`}}", | ||
"instance_type":"c5.4xlarge", | ||
"ami_name":"{{user `name-base`}}-{{user `build-time`}}", | ||
"vpc_id":"{{user `build-vpc`}}", | ||
"subnet_id":"{{user `build-subnet`}}", | ||
"security_group_ids":"{{user `build-secgrp`}}", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type":"hvm", | ||
"architecture":"x86_64", | ||
"name": "ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20*", | ||
"block-device-mapping.volume-type":"gp2", | ||
"root-device-type":"ebs" | ||
}, | ||
"owners": [ | ||
"099720109477" | ||
], | ||
"most_recent":true | ||
}, | ||
"associate_public_ip_address":true, | ||
"ssh_username": "ubuntu", | ||
"ssh_timeout": "3h", | ||
"tags": { | ||
"Name": "{{user `name-base`}}-{{user `build-time`}}", | ||
"OS_Version":"{{user `os-version`}}", | ||
"User":"Packer", | ||
"Encrypted_AMI":"False", | ||
"Created":"{{user `build-time`}}" | ||
}, | ||
"launch_block_device_mappings": [ | ||
{ | ||
"device_name":"/dev/sda1", | ||
"volume_size":100, | ||
"delete_on_termination":true, | ||
"volume_type":"gp3" | ||
} | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "file", | ||
"source": "files/common/vm-max-map.sh", | ||
"destination": | ||
"/tmp/vm_max_map.sh" | ||
}, | ||
{ | ||
"type": "file", | ||
"source": "files/common/docker-daemon.json", | ||
"destination": | ||
"/tmp/daemon.json" | ||
}, | ||
{ | ||
"type":"shell", | ||
"scripts": [ | ||
"scripts/ubuntu2004/ubuntu2004-agent-setups.sh" | ||
] | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": [ | ||
"sudo mv -v /tmp/vm_max_map.sh /etc/profile.d/vm_max_map.sh", | ||
"sudo mv -v /tmp/daemon.json /etc/docker/daemon.json" | ||
] | ||
}, | ||
{ | ||
"type": "shell", | ||
"inline": [ | ||
"sudo reboot" | ||
], | ||
"expect_disconnect": true | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"variables": { | ||
"name-base":"Jenkins-Agent-Windows2019-X64", | ||
"os-version": "Windows2019", | ||
"build-region":"us-east-1", | ||
"build-vpc":"vpc-0af0640f860d10309", | ||
"build-subnet":"subnet-0587f11ea29087ad6", | ||
"build-secgrp":"sg-00144097ec4790161", | ||
"build-time":"{{isotime \"2006-01-02T03-04-05Z\"}}", | ||
"aws_ami_region":"us-east-1" | ||
}, | ||
"builders": [ | ||
{ | ||
"name":"{{user `name-base`}}-{{user `build-time`}}" , | ||
"ami_description":"{{user `name-base`}}", | ||
"type":"amazon-ebs", | ||
"encrypt_boot":"false", | ||
"region":"{{user `build-region`}}", | ||
"ami_regions":"{{user `aws_ami_region`}}", | ||
"instance_type":"c5.4xlarge", | ||
"ami_name":"{{user `name-base`}}-{{user `build-time`}}", | ||
"vpc_id":"{{user `build-vpc`}}", | ||
"subnet_id":"{{user `build-subnet`}}", | ||
"security_group_ids":"{{user `build-secgrp`}}", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type":"hvm", | ||
"architecture":"x86_64", | ||
"name": "Windows_Server-2019-English-Full-Base-20*", | ||
"block-device-mapping.volume-type":"gp2", | ||
"root-device-type":"ebs" | ||
}, | ||
"owners": [ | ||
"amazon" | ||
], | ||
"most_recent":true | ||
}, | ||
"user_data_file":"scripts/windows/userdata.ps1", | ||
"associate_public_ip_address":true, | ||
"communicator":"winrm", | ||
"winrm_username":"Administrator", | ||
"winrm_timeout":"40m", | ||
"windows_password_timeout":"30m", | ||
"winrm_insecure":true, | ||
"tags": { | ||
"Name": "{{user `name-base`}}-{{user `build-time`}}", | ||
"OS_Version":"{{user `os-version`}}", | ||
"User":"Packer", | ||
"Encrypted_AMI":"False", | ||
"Created":"{{user `build-time`}}" | ||
}, | ||
"launch_block_device_mappings": [ | ||
{ | ||
"device_name":"/dev/sda1", | ||
"volume_size":100, | ||
"delete_on_termination":true, | ||
"volume_type":"gp3" | ||
} | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "file", | ||
"source": "scripts/windows/winrm_max_memory.ps1", | ||
"destination": "C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1" | ||
}, | ||
{ | ||
"type":"powershell", | ||
"inline": [ | ||
"C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1 30" | ||
] | ||
}, | ||
{ | ||
"type":"powershell", | ||
"scripts": [ | ||
"scripts/windows/smb-setup-2019-plus.ps1", | ||
"scripts/windows/longpath-setup.ps1", | ||
"scripts/windows/scoop-setup.ps1", | ||
"scripts/windows/scoop-install-commons.ps1", | ||
"scripts/windows/pip-install.ps1" | ||
], | ||
"max_retries": 3 | ||
}, | ||
{ | ||
"type": "windows-restart" | ||
}, | ||
{ | ||
"type":"powershell", | ||
"inline": [ | ||
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule", | ||
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
{ | ||
"variables": { | ||
"name-base":"Jenkins-Agent-Windows2019-X64-Gradle-Check", | ||
"os-version": "Windows2019", | ||
"build-region":"us-east-1", | ||
"build-vpc":"vpc-0af0640f860d10309", | ||
"build-subnet":"subnet-0587f11ea29087ad6", | ||
"build-secgrp":"sg-00144097ec4790161", | ||
"build-time":"{{isotime \"2006-01-02T03-04-05Z\"}}", | ||
"aws_ami_region":"us-east-1" | ||
}, | ||
"builders": [ | ||
{ | ||
"name":"{{user `name-base`}}-{{user `build-time`}}" , | ||
"ami_description":"{{user `name-base`}}", | ||
"type":"amazon-ebs", | ||
"encrypt_boot":"false", | ||
"region":"{{user `build-region`}}", | ||
"ami_regions":"{{user `aws_ami_region`}}", | ||
"instance_type":"c5.24xlarge", | ||
"ami_name":"{{user `name-base`}}-{{user `build-time`}}", | ||
"vpc_id":"{{user `build-vpc`}}", | ||
"subnet_id":"{{user `build-subnet`}}", | ||
"security_group_ids":"{{user `build-secgrp`}}", | ||
"source_ami_filter": { | ||
"filters": { | ||
"virtualization-type":"hvm", | ||
"architecture":"x86_64", | ||
"name": "Windows_Server-2019-English-Full-Base-20*", | ||
"block-device-mapping.volume-type":"gp2", | ||
"root-device-type":"ebs" | ||
}, | ||
"owners": [ | ||
"amazon" | ||
], | ||
"most_recent":true | ||
}, | ||
"user_data_file":"scripts/windows/userdata.ps1", | ||
"associate_public_ip_address":true, | ||
"communicator":"winrm", | ||
"winrm_username":"Administrator", | ||
"winrm_timeout":"40m", | ||
"windows_password_timeout":"30m", | ||
"winrm_insecure":true, | ||
"tags": { | ||
"Name": "{{user `name-base`}}-{{user `build-time`}}", | ||
"OS_Version":"{{user `os-version`}}", | ||
"User":"Packer", | ||
"Encrypted_AMI":"False", | ||
"Created":"{{user `build-time`}}" | ||
}, | ||
"launch_block_device_mappings": [ | ||
{ | ||
"device_name":"/dev/sda1", | ||
"volume_size":100, | ||
"delete_on_termination":true, | ||
"volume_type":"gp3" | ||
} | ||
] | ||
} | ||
], | ||
"provisioners": [ | ||
{ | ||
"type": "file", | ||
"source": "scripts/windows/winrm_max_memory.ps1", | ||
"destination": "C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1" | ||
}, | ||
{ | ||
"type":"powershell", | ||
"inline": [ | ||
"C:\\Users\\Administrator\\jenkins\\winrm_max_memory.ps1 190" | ||
] | ||
}, | ||
{ | ||
"type":"powershell", | ||
"scripts": [ | ||
"scripts/windows/smb-setup-2019-plus.ps1", | ||
"scripts/windows/longpath-setup.ps1", | ||
"scripts/windows/scoop-setup.ps1", | ||
"scripts/windows/scoop-install-commons.ps1", | ||
"scripts/windows/pip-install.ps1" | ||
], | ||
"max_retries": 3 | ||
}, | ||
{ | ||
"type": "windows-restart" | ||
}, | ||
{ | ||
"type":"powershell", | ||
"inline": [ | ||
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\InitializeInstance.ps1 -Schedule", | ||
"C:\\ProgramData\\Amazon\\EC2-Windows\\Launch\\Scripts\\SysprepInstance.ps1 -NoShutdown" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters