From 00b15dff588e8b1b1400f85dfd782ac425a48069 Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Sat, 8 Mar 2025 20:53:13 +0000 Subject: [PATCH 1/3] fixed wait for instance --- .../bench-client-resources.tf | 16 ++++------------ .../db-resources.tf | 16 ++++------------ .../oss-standalone-redisearch-m5/variables.tf | 19 +++++++++++++------ 3 files changed, 21 insertions(+), 30 deletions(-) diff --git a/terraform/oss-standalone-redisearch-m5/bench-client-resources.tf b/terraform/oss-standalone-redisearch-m5/bench-client-resources.tf index 5dc6358..b885163 100644 --- a/terraform/oss-standalone-redisearch-m5/bench-client-resources.tf +++ b/terraform/oss-standalone-redisearch-m5/bench-client-resources.tf @@ -46,18 +46,10 @@ resource "aws_instance" "client" { ################################################################################ # This will ensure we wait here until the instance is ready to receive the ssh connection ################################################################################ - provisioner "remote-exec" { - script = "./../scripts/wait_for_instance.sh" - connection { - host = self.public_ip # The `self` variable is like `this` in many programming languages - type = "ssh" # in this case, `self` is the resource (the server). - user = var.ssh_user - private_key = file(var.private_key) - #need to increase timeout to larger then 5m for metal instances - timeout = "5m" - agent = "false" - } - } + user_data = <<-EOF + #!/bin/bash + echo "Instance is ready" > /var/log/instance_ready.log + EOF ################################################################################ # Deployment related diff --git a/terraform/oss-standalone-redisearch-m5/db-resources.tf b/terraform/oss-standalone-redisearch-m5/db-resources.tf index 1e97090..6910acc 100644 --- a/terraform/oss-standalone-redisearch-m5/db-resources.tf +++ b/terraform/oss-standalone-redisearch-m5/db-resources.tf @@ -51,18 +51,10 @@ resource "aws_instance" "server" { ################################################################################ # This will ensure we wait here until the instance is ready to receive the ssh connection ################################################################################ - provisioner "remote-exec" { - script = "./../scripts/wait_for_instance.sh" - connection { - host = self.public_ip # The `self` variable is like `this` in many programming languages - type = "ssh" # in this case, `self` is the resource (the server). - user = var.ssh_user - private_key = file(var.private_key) - #need to increase timeout to larger then 5m for metal instances - timeout = "15m" - agent = "false" - } - } + user_data = <<-EOF + #!/bin/bash + echo "Instance is ready" > /var/log/instance_ready.log + EOF ################################################################################ # Deployment related diff --git a/terraform/oss-standalone-redisearch-m5/variables.tf b/terraform/oss-standalone-redisearch-m5/variables.tf index 7e912e9..63d72e5 100644 --- a/terraform/oss-standalone-redisearch-m5/variables.tf +++ b/terraform/oss-standalone-redisearch-m5/variables.tf @@ -53,19 +53,26 @@ variable "private_key" { variable "key_name" { description = "key name" - default = "perf-ci" + default = "perf-cto-us-east-2" } variable "region" { default = "us-east-2" } -# (Ubuntu 20.04) -# ubuntu-bionic-20.04-amd64-server with redis 7.4.0 and memtier 2.1.1 -# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-0cfbc88a79665b192 +# (Ubuntu 22.04, memtier 2.1.4 and redis unstable from March 6th 2025) +# ubuntu@ip-10-3-0-162:~$ memtier_benchmark --version +# memtier_benchmark 2.1.4 +# Copyright (C) 2011-2024 Redis Ltd. +# This is free software. You may redistribute copies of it under the terms of +# the GNU General Public License . +# There is NO WARRANTY, to the extent permitted by law. +# ubuntu@ip-10-3-0-162:~$ redis-server --version +# Redis server v=255.255.255 sha=f364dcca:0 malloc=jemalloc-5.3.0 bits=64 build=502a999850b32fd8 +# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-0cda50c2e20879afb variable "instance_ami" { - description = "AMI for aws EC2 instance - us-east-2 Ubuntu 20.04 - perf-cto-base-image-ubuntu20.04-redis-7.4.0-tuned-latency" - default = "ami-0cfbc88a79665b192" + description = "AMI for aws EC2 instance - us-east-2 Ubuntu 22.04 - perf-base-image-ubuntu22.04-m6i.8xlarge-20250306-0220" + default = "ami-0cda50c2e20879afb" } variable "instance_device_name" { From b8d07359780b240daa3ff245b951629bf2a2811d Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Sat, 8 Mar 2025 21:22:06 +0000 Subject: [PATCH 2/3] fixed wait for instance --- .../bench-client-resources.tf | 16 ++++---------- .../db-resources.tf | 16 ++++---------- .../variables.tf | 21 +++++++++++++------ 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/terraform/oss-redisearch-m5-spot-instances/bench-client-resources.tf b/terraform/oss-redisearch-m5-spot-instances/bench-client-resources.tf index b67ad88..3a004cc 100644 --- a/terraform/oss-redisearch-m5-spot-instances/bench-client-resources.tf +++ b/terraform/oss-redisearch-m5-spot-instances/bench-client-resources.tf @@ -22,18 +22,10 @@ resource "aws_spot_instance_request" "client" { ################################################################################ # This will ensure we wait here until the instance is ready to receive the ssh connection ################################################################################ - provisioner "remote-exec" { - script = "./../scripts/wait_for_instance.sh" - connection { - host = self.public_ip # The `self` variable is like `this` in many programming languages - type = "ssh" # in this case, `self` is the resource (the server). - user = var.ssh_user - private_key = file(var.private_key) - #need to increase timeout to larger then 5m for metal instances - timeout = "15m" - agent = "false" - } - } + user_data = <<-EOF + #!/bin/bash + echo "Instance is ready" > /var/log/instance_ready.log + EOF ################################################################################ # Deployment related diff --git a/terraform/oss-redisearch-m5-spot-instances/db-resources.tf b/terraform/oss-redisearch-m5-spot-instances/db-resources.tf index ffb2629..2be32ec 100644 --- a/terraform/oss-redisearch-m5-spot-instances/db-resources.tf +++ b/terraform/oss-redisearch-m5-spot-instances/db-resources.tf @@ -36,18 +36,10 @@ resource "aws_spot_instance_request" "server" { ################################################################################ # This will ensure we wait here until the instance is ready to receive the ssh connection ################################################################################ - provisioner "remote-exec" { - script = "./../scripts/wait_for_instance.sh" - connection { - host = self.public_ip # The `self` variable is like `this` in many programming languages - type = "ssh" # in this case, `self` is the resource (the server). - user = var.ssh_user - private_key = file(var.private_key) - #need to increase timeout to larger then 5m for metal instances - timeout = "15m" - agent = "false" - } - } + user_data = <<-EOF + #!/bin/bash + echo "Instance is ready" > /var/log/instance_ready.log + EOF ################################################################################ # Deployment related diff --git a/terraform/oss-redisearch-m5-spot-instances/variables.tf b/terraform/oss-redisearch-m5-spot-instances/variables.tf index 5f73121..a8cfac4 100644 --- a/terraform/oss-redisearch-m5-spot-instances/variables.tf +++ b/terraform/oss-redisearch-m5-spot-instances/variables.tf @@ -56,23 +56,32 @@ variable "public_key" { default = "~/.ssh/perf-ci.pub" } + variable "key_name" { description = "key name" - default = "perf-ci" + default = "perf-cto-us-east-2" } variable "region" { default = "us-east-2" } -# (Ubuntu 20.04) -# ubuntu-bionic-20.04-amd64-server with redis 7.4.0 and memtier 2.1.1 -# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-0cfbc88a79665b192 +# (Ubuntu 22.04, memtier 2.1.4 and redis unstable from March 6th 2025) +# ubuntu@ip-10-3-0-162:~$ memtier_benchmark --version +# memtier_benchmark 2.1.4 +# Copyright (C) 2011-2024 Redis Ltd. +# This is free software. You may redistribute copies of it under the terms of +# the GNU General Public License . +# There is NO WARRANTY, to the extent permitted by law. +# ubuntu@ip-10-3-0-162:~$ redis-server --version +# Redis server v=255.255.255 sha=f364dcca:0 malloc=jemalloc-5.3.0 bits=64 build=502a999850b32fd8 +# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-0cda50c2e20879afb variable "instance_ami" { - description = "AMI for aws EC2 instance - us-east-2 Ubuntu 20.04 - perf-cto-base-image-ubuntu20.04-redis-7.4.0-tuned-latency" - default = "ami-0cfbc88a79665b192" + description = "AMI for aws EC2 instance - us-east-2 Ubuntu 22.04 - perf-base-image-ubuntu22.04-m6i.8xlarge-20250306-0220" + default = "ami-0cda50c2e20879afb" } + variable "instance_device_name" { description = "EC2 instance device name" default = "/dev/sda1" From f4cbb0e9b058b0f57e1bb7b734095979fe9723da Mon Sep 17 00:00:00 2001 From: filipecosta90 Date: Sat, 8 Mar 2025 22:26:16 +0000 Subject: [PATCH 3/3] fixed key --- .../variables.tf | 19 ++++++++++++++----- .../oss-standalone-redisearch-m5/variables.tf | 2 +- 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/terraform/oss-standalone-redisearch-m5-spot-instances/variables.tf b/terraform/oss-standalone-redisearch-m5-spot-instances/variables.tf index 90c5820..506a4a4 100644 --- a/terraform/oss-standalone-redisearch-m5-spot-instances/variables.tf +++ b/terraform/oss-standalone-redisearch-m5-spot-instances/variables.tf @@ -53,20 +53,29 @@ variable "private_key" { variable "key_name" { description = "key name" - default = "perf-ci" + default = "perf-cto-us-east-2" } variable "region" { default = "us-east-2" } -# (Ubuntu 20.04) -# ubuntu-bionic-20.04-amd64-server +# (Ubuntu 22.04, memtier 2.1.4 and redis unstable from March 6th 2025) +# ubuntu@ip-10-3-0-162:~$ memtier_benchmark --version +# memtier_benchmark 2.1.4 +# Copyright (C) 2011-2024 Redis Ltd. +# This is free software. You may redistribute copies of it under the terms of +# the GNU General Public License . +# There is NO WARRANTY, to the extent permitted by law. +# ubuntu@ip-10-3-0-162:~$ redis-server --version +# Redis server v=255.255.255 sha=f364dcca:0 malloc=jemalloc-5.3.0 bits=64 build=502a999850b32fd8 +# https://us-east-2.console.aws.amazon.com/ec2/home?region=us-east-2#ImageDetails:imageId=ami-0cda50c2e20879afb variable "instance_ami" { - description = "AMI for aws EC2 instance - us-east-2 Ubuntu 20.04 - perf-cto-base-image-ubuntu20.04-redis-7.1.241-tuned-latency" - default = "ami-0e64e0b751414b32e" + description = "AMI for aws EC2 instance - us-east-2 Ubuntu 22.04 - perf-base-image-ubuntu22.04-m6i.8xlarge-20250306-0220" + default = "ami-0cda50c2e20879afb" } + variable "instance_device_name" { description = "EC2 instance device name" default = "/dev/sda1" diff --git a/terraform/oss-standalone-redisearch-m5/variables.tf b/terraform/oss-standalone-redisearch-m5/variables.tf index 63d72e5..b46545c 100644 --- a/terraform/oss-standalone-redisearch-m5/variables.tf +++ b/terraform/oss-standalone-redisearch-m5/variables.tf @@ -53,7 +53,7 @@ variable "private_key" { variable "key_name" { description = "key name" - default = "perf-cto-us-east-2" + default = "perf-ci" } variable "region" {