Skip to content

Commit 1d3f710

Browse files
Updated wait for instance aarch64 (#123)
* Added oss-standalone-redisearch-m5-aarch64 * wait for instance aarch64 --------- Co-authored-by: filipecosta90 <[email protected]>
1 parent 7090d00 commit 1d3f710

File tree

2 files changed

+24
-8
lines changed

2 files changed

+24
-8
lines changed

terraform/oss-standalone-redisearch-m5-aarch64/bench-client-resources.tf

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,18 @@ resource "aws_instance" "client" {
4646
################################################################################
4747
# This will ensure we wait here until the instance is ready to receive the ssh connection
4848
################################################################################
49-
user_data = <<-EOF
50-
#!/bin/bash
51-
echo "Instance is ready" > /var/log/instance_ready.log
52-
EOF
49+
provisioner "remote-exec" {
50+
script = "./../../scripts/wait_for_instance.sh"
51+
connection {
52+
host = self.public_ip # The `self` variable is like `this` in many programming languages
53+
type = "ssh" # in this case, `self` is the resource (the server).
54+
user = var.ssh_user
55+
private_key = file(var.private_key)
56+
#need to increase timeout to larger then 5m for metal instances
57+
timeout = "5m"
58+
agent = "false"
59+
}
60+
}
5361

5462
################################################################################
5563
# Deployment related

terraform/oss-standalone-redisearch-m5-aarch64/db-resources.tf

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,18 @@ resource "aws_instance" "server" {
5151
################################################################################
5252
# This will ensure we wait here until the instance is ready to receive the ssh connection
5353
################################################################################
54-
user_data = <<-EOF
55-
#!/bin/bash
56-
echo "Instance is ready" > /var/log/instance_ready.log
57-
EOF
54+
provisioner "remote-exec" {
55+
script = "./../../scripts/wait_for_instance.sh"
56+
connection {
57+
host = self.public_ip # The `self` variable is like `this` in many programming languages
58+
type = "ssh" # in this case, `self` is the resource (the server).
59+
user = var.ssh_user
60+
private_key = file(var.private_key)
61+
#need to increase timeout to larger then 5m for metal instances
62+
timeout = "5m"
63+
agent = "false"
64+
}
65+
}
5866

5967
################################################################################
6068
# Deployment related

0 commit comments

Comments
 (0)