Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add required tags and update VPC/IGW related to AWS account migration #2244

Merged
merged 5 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ Simulator makes use of Terraform for provisioning. After you have created a benc
`perftest create` command, you want to edit the `inventory_plan.yaml`. This is where you can configure the
type of instances, the number etc. The specified `cidr_block` will need to be updated to prevent conflicts.

To provision the environment, you will first need to configure your AWS credentials:
To provision the environment, you will first need to configure your AWS credentials and update team tag on inventory_plan according to the values on following [repository](https://github.com/hazelcast/aws-hazelcast-inc-iac/blob/main/README.md#aws-tagging-guidelines):

In your `~/.aws/credentials` file you need something like this:

Expand Down
16 changes: 16 additions & 0 deletions templates/hazelcast5-cp-ec2/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ resource "aws_subnet" "subnet" {
map_public_ip_on_launch = true
tags = {
Name = "Simulator Public Subnet ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -60,6 +62,8 @@ resource "aws_route_table" "route_table" {

tags = {
Name = "Simulator Public Subnet Route Table ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -86,6 +90,8 @@ resource "aws_security_group" "node-sg" {
tags = {
Name = "Simulator Node Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -144,6 +150,8 @@ resource "aws_instance" "nodes" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.nodes.user
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -161,6 +169,8 @@ resource "aws_security_group" "loadgenerator-sg" {
tags = {
Name = "Simulator Load Balancer Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -210,6 +220,8 @@ resource "aws_instance" "loadgenerators" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.loadgenerators.user
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -227,6 +239,8 @@ resource "aws_security_group" "mc-sg" {
tags = {
Name = "Simulator MC Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -275,6 +289,8 @@ resource "aws_instance" "mc" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.mc.user
team = local.settings.team
type = local.settings.type
}

connection {
Expand Down
15 changes: 10 additions & 5 deletions templates/hazelcast5-cp-ec2/inventory_plan.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
provisioner: terraform
terraform_plan: aws
# Used for naming resources; give it some unique name specific to a set of benchmarks
basename: gbarnett-ooaxh
basename: <id>-<rnd:5>
# Enter something here that identifies you.
owner: gbarnett
owner: <id>
taylanerden marked this conversation as resolved.
Show resolved Hide resolved
region: eu-central-1
availability_zone: eu-central-1a
vpc_id: vpc-002b5a4e5f8b8ece2
internet_gateway_id: igw-02b8fe3ab75871205
# Change the '20' to a different octet to prevent running into conflicts.
#Engineering account VPC
vpc_id: vpc-094e507d79a701227
#Engineering account igw
internet_gateway_id: igw-03696757cca398137
#Change the '20' to a different octet to prevent running into conflicts.
cidr_block: 10.0.20.0/24
#Change team information
team: Cloud
type: Benchmarking

keypair:
public_key: key.pub
Expand Down
16 changes: 16 additions & 0 deletions templates/hazelcast5-ec2/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ resource "aws_subnet" "subnet" {
map_public_ip_on_launch = true
tags = {
Name = "Simulator Public Subnet ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -60,6 +62,8 @@ resource "aws_route_table" "route_table" {

tags = {
Name = "Simulator Public Subnet Route Table ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -86,6 +90,8 @@ resource "aws_security_group" "node-sg" {
tags = {
Name = "Simulator Node Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -161,6 +167,8 @@ resource "aws_instance" "nodes" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.nodes.user
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -178,6 +186,8 @@ resource "aws_security_group" "loadgenerator-sg" {
tags = {
Name = "Simulator Load Balancer Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -244,6 +254,8 @@ resource "aws_instance" "loadgenerators" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.loadgenerators.user
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -261,6 +273,8 @@ resource "aws_security_group" "mc-sg" {
tags = {
Name = "Simulator MC Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -309,6 +323,8 @@ resource "aws_instance" "mc" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.mc.user
team = local.settings.team
type = local.settings.type
}

connection {
Expand Down
11 changes: 8 additions & 3 deletions templates/hazelcast5-ec2/inventory_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ basename: <id>-<rnd:5>
owner: <id>
region: eu-central-1
availability_zone: eu-central-1a
vpc_id: vpc-002b5a4e5f8b8ece2
internet_gateway_id: igw-02b8fe3ab75871205
# Change the '20' to a different octet to prevent running into conflicts.
#Engineering account VPC
vpc_id: vpc-094e507d79a701227
#Engineering account igw
internet_gateway_id: igw-03696757cca398137
#Change the '20' to a different octet to prevent running into conflicts.
cidr_block: 10.0.20.0/24
#Change team information
team: Cloud
taylanerden marked this conversation as resolved.
Show resolved Hide resolved
type: Benchmarking

keypair:
public_key: key.pub
Expand Down
14 changes: 14 additions & 0 deletions templates/hazelcast5-hd-ec2/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ resource "aws_subnet" "subnet" {
map_public_ip_on_launch = true
tags = {
Name = "Simulator Public Subnet ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -60,6 +62,8 @@ resource "aws_route_table" "route_table" {

tags = {
Name = "Simulator Public Subnet Route Table ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -86,6 +90,8 @@ resource "aws_security_group" "node-sg" {
tags = {
Name = "Simulator Node Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -161,6 +167,8 @@ resource "aws_instance" "nodes" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.nodes.user
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -178,6 +186,8 @@ resource "aws_security_group" "loadgenerator-sg" {
tags = {
Name = "Simulator Load Balancer Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -244,6 +254,8 @@ resource "aws_instance" "loadgenerators" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.loadgenerators.user
team = local.settings.team
type = local.settings.type
}
}

Expand Down Expand Up @@ -310,6 +322,8 @@ resource "aws_instance" "mc" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.mc.user
team = local.settings.team
type = local.settings.type
}

connection {
Expand Down
11 changes: 8 additions & 3 deletions templates/hazelcast5-hd-ec2/inventory_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,15 @@ basename: <id>-<rnd:5>
owner: <id>
region: eu-central-1
availability_zone: eu-central-1a
vpc_id: vpc-002b5a4e5f8b8ece2
internet_gateway_id: igw-02b8fe3ab75871205
# Change the '20' to a different octet to prevent running into conflicts.
#Engineering account VPC
vpc_id: vpc-094e507d79a701227
#Engineering account igw
internet_gateway_id: igw-03696757cca398137
#Change the '20' to a different octet to prevent running into conflicts.
cidr_block: 10.0.20.0/24
#Change team information
team: Cloud
type: Benchmarking

keypair:
public_key: key.pub
Expand Down
14 changes: 14 additions & 0 deletions templates/hazelcast5-sql-ec2-tstore/aws/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ resource "aws_subnet" "subnet" {
map_public_ip_on_launch = true
tags = {
Name = "Simulator Public Subnet ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -60,6 +62,8 @@ resource "aws_route_table" "route_table" {

tags = {
Name = "Simulator Public Subnet Route Table ${local.settings.basename}"
team = local.settings.team
type = local.settings.type
}
}

Expand All @@ -86,6 +90,8 @@ resource "aws_security_group" "node-sg" {
tags = {
Name = "Simulator Node Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -153,6 +159,8 @@ resource "aws_instance" "nodes" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.nodes.user
team = local.settings.team
type = local.settings.type
}

# mount instance store to be used by Tiered Storage
Expand Down Expand Up @@ -182,6 +190,8 @@ resource "aws_security_group" "loadgenerator-sg" {
tags = {
Name = "Simulator Load Balancer Security Group ${local.settings.basename}",
Owner = local.settings.owner
team = local.settings.team
type = local.settings.type
}

ingress {
Expand Down Expand Up @@ -248,6 +258,8 @@ resource "aws_instance" "loadgenerators" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.loadgenerators.user
team = local.settings.team
type = local.settings.type
}
}

Expand Down Expand Up @@ -314,6 +326,8 @@ resource "aws_instance" "mc" {
Owner = local.settings.owner
"passthrough:ansible_ssh_private_key_file" = local.settings.keypair.private_key
"passthrough:ansible_user" = local.settings.mc.user
team = local.settings.team
type = local.settings.type
}

connection {
Expand Down
3 changes: 3 additions & 0 deletions templates/hazelcast5-sql-ec2-tstore/inventory_plan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ vpc_id: vpc-<your-vpc-id-here>
internet_gateway_id: igw-<your-igw-id-here>
# Change to a different cidr_block as-needed.
cidr_block: 10.0.5.0/24
#Change team information
team: Cloud
type: Benchmarking

keypair:
public_key: key.pub
Expand Down
Loading