forked from fabienrenaud/java-json-benchmark
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ami.json
59 lines (59 loc) · 1.65 KB
/
ami.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
"variables": {
"region": "us-west-2",
"aws_profile": "{{env `AWS_PROFILE`}}",
"iam_instance_profile": "java-json-benchmark"
},
"builders": [
{
"type": "amazon-ebs",
"profile": "{{user `aws_profile`}}",
"region": "{{user `region`}}",
"source_ami_filter": {
"filters": {
"name": "amzn2-ami-hvm-*-gp2",
"architecture": "x86_64",
"owner-alias": "amazon",
"root-device-type": "ebs",
"block-device-mapping.volume-type": "gp2",
"ena-support": "true",
"sriov-net-support": "simple",
"virtualization-type": "hvm"
},
"owners": ["137112412989"],
"most_recent": true
},
"instance_type": "c5.xlarge",
"iam_instance_profile": "{{user `iam_instance_profile`}}",
"ssh_username": "ec2-user",
"ami_name": "java-json-benchmark-build-{{timestamp}}"
}
],
"provisioners": [
{
"type": "file",
"source": "app.tar.gz",
"destination": "/tmp/app.tar.gz"
},
{
"type": "shell",
"timeout": "48h",
"inline": [
"sudo yum -y clean all",
"sudo yum -y upgrade",
"sudo yum search java",
"sudo yum install -y java-17-amazon-corretto-devel",
"java -version",
"mkdir ~/app",
"tar xzf /tmp/app.tar.gz -C ~/app",
"pushd ~/app",
"chmod +x run run-everything gradlew",
"mkdir output",
"./run-everything",
"archiveName=results-$(date +%Y-%m-%dT%H:%M:%S).tar.gz",
"tar czf ./${archiveName} output",
"aws s3 cp ./${archiveName} s3://java-json-benchmark/"
]
}
]
}