Skip to content

Commit 7090d00

Browse files
Added oss-standalone-redisearch-m5-aarch64 (#122)
1 parent 9c745c7 commit 7090d00

File tree

6 files changed

+349
-0
lines changed

6 files changed

+349
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
2+
resource "aws_instance" "client" {
3+
count = var.client_instance_count
4+
ami = var.instance_ami
5+
instance_type = var.client_instance_type
6+
subnet_id = data.terraform_remote_state.shared_resources.outputs.subnet_public_id
7+
vpc_security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"]
8+
key_name = var.key_name
9+
associate_public_ip_address = "true"
10+
placement_group = data.terraform_remote_state.shared_resources.outputs.perf_cto_pg_name
11+
availability_zone = "us-east-2a"
12+
13+
root_block_device {
14+
volume_size = var.instance_volume_size
15+
volume_type = var.instance_volume_type
16+
encrypted = var.instance_volume_encrypted
17+
delete_on_termination = true
18+
}
19+
20+
volume_tags = {
21+
Environment = "${var.environment}"
22+
Project = "${var.environment}"
23+
Name = "ebs_block_device-${var.setup_name}-CLIENT-${count.index + 1}"
24+
setup = "${var.setup_name}"
25+
triggering_env = "${var.triggering_env}"
26+
github_actor = "${var.github_actor}"
27+
github_org = "${var.github_org}"
28+
github_repo = "${var.github_repo}"
29+
github_sha = "${var.github_sha}"
30+
timeout_secs = "${var.timeout_secs}"
31+
}
32+
33+
tags = {
34+
Environment = "${var.environment}"
35+
Project = "${var.environment}"
36+
Name = "${var.setup_name}-CLIENT-${count.index + 1}"
37+
setup = "${var.setup_name}"
38+
triggering_env = "${var.triggering_env}"
39+
github_actor = "${var.github_actor}"
40+
github_org = "${var.github_org}"
41+
github_repo = "${var.github_repo}"
42+
github_sha = "${var.github_sha}"
43+
timeout_secs = "${var.timeout_secs}"
44+
}
45+
46+
################################################################################
47+
# This will ensure we wait here until the instance is ready to receive the ssh connection
48+
################################################################################
49+
user_data = <<-EOF
50+
#!/bin/bash
51+
echo "Instance is ready" > /var/log/instance_ready.log
52+
EOF
53+
54+
################################################################################
55+
# Deployment related
56+
################################################################################
57+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
2+
################################################################################
3+
# This is the bucket holding this specific setup tfstate
4+
################################################################################
5+
terraform {
6+
backend "s3" {
7+
bucket = "performance-cto-group"
8+
region = "us-east-1"
9+
}
10+
}
11+
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
resource "aws_instance" "server" {
2+
count = var.server_instance_count
3+
ami = var.instance_ami
4+
instance_type = var.server_instance_type
5+
6+
subnet_id = data.terraform_remote_state.shared_resources.outputs.subnet_public_id
7+
vpc_security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"]
8+
key_name = var.key_name
9+
associate_public_ip_address = "true"
10+
placement_group = data.terraform_remote_state.shared_resources.outputs.perf_cto_pg_name
11+
availability_zone = "us-east-2a"
12+
13+
cpu_options {
14+
core_count = var.server_instance_cpu_core_count
15+
threads_per_core = var.server_instance_cpu_threads_per_core
16+
}
17+
18+
root_block_device {
19+
volume_size = var.instance_volume_size
20+
volume_type = var.instance_volume_type
21+
encrypted = var.instance_volume_encrypted
22+
delete_on_termination = true
23+
}
24+
25+
volume_tags = {
26+
Environment = "${var.environment}"
27+
Project = "${var.environment}"
28+
Name = "ebs_block_device-${var.setup_name}-DB-${count.index + 1}"
29+
setup = "${var.setup_name}"
30+
triggering_env = "${var.triggering_env}"
31+
github_actor = "${var.github_actor}"
32+
github_org = "${var.github_org}"
33+
github_repo = "${var.github_repo}"
34+
github_sha = "${var.github_sha}"
35+
timeout_secs = "${var.timeout_secs}"
36+
}
37+
38+
tags = {
39+
Environment = "${var.environment}"
40+
Project = "${var.environment}"
41+
Name = "${var.setup_name}-DB-${count.index + 1}"
42+
setup = "${var.setup_name}"
43+
triggering_env = "${var.triggering_env}"
44+
github_actor = "${var.github_actor}"
45+
github_org = "${var.github_org}"
46+
github_repo = "${var.github_repo}"
47+
github_sha = "${var.github_sha}"
48+
timeout_secs = "${var.timeout_secs}"
49+
}
50+
51+
################################################################################
52+
# This will ensure we wait here until the instance is ready to receive the ssh connection
53+
################################################################################
54+
user_data = <<-EOF
55+
#!/bin/bash
56+
echo "Instance is ready" > /var/log/instance_ready.log
57+
EOF
58+
59+
################################################################################
60+
# Deployment related
61+
################################################################################
62+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
output "server_public_ip" {
2+
value = ["${aws_instance.server[0].public_ip}"]
3+
}
4+
5+
output "server_private_ip" {
6+
value = ["${aws_instance.server[0].private_ip}"]
7+
}
8+
9+
output "client_public_ip" {
10+
value = ["${aws_instance.client[0].public_ip}"]
11+
}
12+
13+
output "client_private_ip" {
14+
value = ["${aws_instance.client[0].private_ip}"]
15+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# provider
2+
provider "aws" {
3+
region = var.region
4+
}
5+
6+
################################################################################
7+
# This is the shared resources bucket key -- you will need it across environments like security rules,etc...
8+
# !! do not change this !!
9+
################################################################################
10+
data "terraform_remote_state" "shared_resources" {
11+
backend = "s3"
12+
config = {
13+
bucket = "performance-cto-group"
14+
key = "benchmarks/infrastructure/shared_resources.tfstate"
15+
region = "us-east-1"
16+
}
17+
}
Lines changed: 187 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,187 @@
1+
################################################################################
2+
# Variables used for deployment tag
3+
################################################################################
4+
5+
variable "setup_name" {
6+
description = "setup name"
7+
default = "oss-redisearch-m7g-aarch64"
8+
}
9+
variable "github_actor" {
10+
description = "The name of the person or app that initiated the deployment."
11+
default = "N/A"
12+
}
13+
14+
variable "github_repo" {
15+
description = " The owner and repository name. For example, testing-infrastructure."
16+
default = "N/A"
17+
}
18+
19+
variable "triggering_env" {
20+
description = " The triggering environment. For example circleci."
21+
default = "N/A"
22+
}
23+
24+
variable "environment" {
25+
description = " The cost tag."
26+
default = "RediSearch"
27+
}
28+
29+
variable "github_org" {
30+
description = " The owner name. For example, RedisModules."
31+
default = "N/A"
32+
}
33+
34+
variable "github_sha" {
35+
description = "The commit SHA that triggered the deployment."
36+
default = "N/A"
37+
}
38+
39+
variable "timeout_secs" {
40+
description = "The maximum time to wait prior destroying the VM via the watchdog."
41+
default = "3600"
42+
}
43+
44+
45+
46+
################################################################################
47+
# Access keys
48+
################################################################################
49+
variable "private_key" {
50+
description = "private key"
51+
default = "/tmp/benchmarks.redislabs.pem"
52+
}
53+
54+
variable "key_name" {
55+
description = "key name"
56+
default = "perf-ci"
57+
}
58+
59+
variable "region" {
60+
default = "us-east-2"
61+
}
62+
63+
# (Ubuntu 22.04, memtier 2.1.4 and redis unstable from March 6th 2025)
64+
# ubuntu@ip-10-3-0-162:~$ memtier_benchmark --version
65+
# memtier_benchmark 2.1.4
66+
# Copyright (C) 2011-2024 Redis Ltd.
67+
# This is free software. You may redistribute copies of it under the terms of
68+
# the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
69+
# There is NO WARRANTY, to the extent permitted by law.
70+
# ubuntu@ip-10-3-0-162:~$ redis-server --version
71+
# Redis server v=255.255.255 sha=f364dcca:0 malloc=jemalloc-5.3.0 bits=64 build=502a999850b32fd8
72+
# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-095460f0c4bc57b6e
73+
variable "instance_ami" {
74+
description = "AMI for aws EC2 instance - us-east-2 Ubuntu 22.04 - perf-base-image-ubuntu22.04-aarch64-m7g.8xlarge-20250314-1233"
75+
default = "ami-095460f0c4bc57b6e"
76+
}
77+
78+
variable "instance_device_name" {
79+
description = "EC2 instance device name"
80+
default = "/dev/sda1"
81+
}
82+
83+
84+
variable "instance_volume_type" {
85+
description = "EC2 instance volume_type"
86+
default = "gp3"
87+
}
88+
89+
variable "instance_volume_iops" {
90+
description = "EC2 instance volume_iops"
91+
default = "100"
92+
}
93+
94+
variable "redis_module" {
95+
description = "redis_module"
96+
default = "N/A"
97+
}
98+
99+
variable "instance_volume_size" {
100+
description = "EC2 instance volume_size"
101+
default = "512"
102+
}
103+
104+
105+
variable "client_instance_volume_size" {
106+
description = "EC2 instance volume_size"
107+
default = "256"
108+
}
109+
110+
variable "client_instance_volume_type" {
111+
description = "EC2 instance volume_type"
112+
default = "gp3"
113+
}
114+
115+
116+
variable "instance_volume_encrypted" {
117+
description = "EC2 instance instance_volume_encrypted"
118+
default = "false"
119+
}
120+
121+
variable "instance_root_block_device_encrypted" {
122+
description = "EC2 instance instance_root_block_device_encrypted"
123+
default = "false"
124+
}
125+
126+
variable "instance_cpu_threads_per_core" {
127+
description = "CPU threads per core for aws EC2 instance"
128+
default = 1
129+
}
130+
131+
variable "instance_cpu_threads_per_core_hyperthreading" {
132+
description = "CPU threads per core when hyperthreading is enabled for aws EC2 instance"
133+
default = 2
134+
}
135+
136+
variable "instance_network_interface_plus_count" {
137+
description = "number of additional network interfaces to add to aws EC2 instance"
138+
default = 0
139+
}
140+
141+
variable "os" {
142+
description = "os"
143+
default = "ubuntu22.04"
144+
}
145+
146+
variable "ssh_user" {
147+
description = "ssh_user"
148+
default = "ubuntu"
149+
}
150+
151+
################################################################################
152+
# Specific DB machine variables
153+
################################################################################
154+
# m5.8xlarge 32 VCPUs 128 GB MEM
155+
variable "server_instance_type" {
156+
description = "type for aws EC2 instance"
157+
default = "m7g.8xlarge"
158+
}
159+
160+
161+
variable "server_instance_count" {
162+
default = "1"
163+
}
164+
165+
variable "server_instance_cpu_core_count" {
166+
description = "CPU core count for aws EC2 instance"
167+
default = 16
168+
}
169+
170+
variable "server_instance_cpu_threads_per_core" {
171+
description = "CPU threads per CORE"
172+
default = 1
173+
}
174+
175+
################################################################################
176+
# Specific Client machine variables
177+
################################################################################
178+
# c5.4xlarge 16 VCPUs
179+
180+
variable "client_instance_type" {
181+
description = "type for aws EC2 instance"
182+
default = "c7g.4xlarge"
183+
}
184+
185+
variable "client_instance_count" {
186+
default = "1"
187+
}

0 commit comments

Comments
 (0)