Skip to content

Commit

Permalink
Added 4 Amazon OpenSearch v2.11 (lucene 9.7.0) deployments (#98)
Browse files Browse the repository at this point in the history
* Included postgresql v16.2 and v16.3 versions

* Added 4 Amazon OpenSearch v2.11 (lucene 9.7.0) deployments
  • Loading branch information
filipecosta90 authored May 17, 2024
1 parent 2676a62 commit 2ce9439
Show file tree
Hide file tree
Showing 20 changed files with 452 additions and 0 deletions.
11 changes: 11 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/common.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

################################################################################
# This is the bucket holding this specific setup tfstate
################################################################################
terraform {
backend "s3" {
bucket = "performance-cto-group"
region = "us-east-1"
}
}

75 changes: 75 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain1/db.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
variable "domain_name" {
description = "The name of the OpenSearch domain"
type = string
default = "vector-benchmark-d1" # You can override this value during `terraform apply`
}


data "aws_caller_identity" "current" {}

resource "aws_opensearch_domain" "example" {
domain_name = var.domain_name
engine_version = "OpenSearch_2.11"

cluster_config {
instance_type = "r6g.2xlarge.search"
}

advanced_security_options {
enabled = false
anonymous_auth_enabled = true
internal_user_database_enabled = true
master_user_options {
master_user_name = "opensearch"
master_user_password = "Performance2025#"
}
}

encrypt_at_rest {
enabled = true
}

# The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions.
access_policies = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Principal = "*"
Action = "es:*"
Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*"
}
]
})


ebs_options {
ebs_enabled = true
volume_size = 360
}


domain_endpoint_options {
enforce_https = false
tls_security_policy = "Policy-Min-TLS-1-2-2019-07"
}

node_to_node_encryption {
enabled = true
}

vpc_options {
subnet_ids = [
data.terraform_remote_state.shared_resources.outputs.subnet_public_id,
]

security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"]
}


tags = {
Domain = var.domain_name
Name = "vector-benchmark-opensearch-v2-11"
Project = "Vector-Competitive-OpenSearch"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# output "primary_endpoint_address" {
# sensitive = true
# value = ["${module.cluster}"]
# }
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# provider
provider "aws" {
region = var.region
}

################################################################################
# This is the shared resources bucket key -- you will need it across environments like security rules,etc...
# !! do not change this !!
################################################################################
data "terraform_remote_state" "shared_resources" {
backend = "s3"
config = {
bucket = "performance-cto-group"
key = "benchmarks/infrastructure/shared_resources.tfstate"
region = "us-east-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


variable "region" {
default = "us-east-2"
}
11 changes: 11 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/common.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

################################################################################
# This is the bucket holding this specific setup tfstate
################################################################################
terraform {
backend "s3" {
bucket = "performance-cto-group"
region = "us-east-1"
}
}

75 changes: 75 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain2/db.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
variable "domain_name" {
description = "The name of the OpenSearch domain"
type = string
default = "vector-benchmark-d2" # You can override this value during `terraform apply`
}


data "aws_caller_identity" "current" {}

resource "aws_opensearch_domain" "example" {
domain_name = var.domain_name
engine_version = "OpenSearch_2.11"

cluster_config {
instance_type = "r6g.2xlarge.search"
}

advanced_security_options {
enabled = false
anonymous_auth_enabled = true
internal_user_database_enabled = true
master_user_options {
master_user_name = "opensearch"
master_user_password = "Performance2025#"
}
}

encrypt_at_rest {
enabled = true
}

# The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions.
access_policies = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Principal = "*"
Action = "es:*"
Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*"
}
]
})


ebs_options {
ebs_enabled = true
volume_size = 360
}


domain_endpoint_options {
enforce_https = false
tls_security_policy = "Policy-Min-TLS-1-2-2019-07"
}

node_to_node_encryption {
enabled = true
}

vpc_options {
subnet_ids = [
data.terraform_remote_state.shared_resources.outputs.subnet_public_id,
]

security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"]
}


tags = {
Domain = var.domain_name
Name = "vector-benchmark-opensearch-v2-11"
Project = "Vector-Competitive-OpenSearch"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# output "primary_endpoint_address" {
# sensitive = true
# value = ["${module.cluster}"]
# }
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# provider
provider "aws" {
region = var.region
}

################################################################################
# This is the shared resources bucket key -- you will need it across environments like security rules,etc...
# !! do not change this !!
################################################################################
data "terraform_remote_state" "shared_resources" {
backend = "s3"
config = {
bucket = "performance-cto-group"
key = "benchmarks/infrastructure/shared_resources.tfstate"
region = "us-east-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


variable "region" {
default = "us-east-2"
}
11 changes: 11 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/common.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

################################################################################
# This is the bucket holding this specific setup tfstate
################################################################################
terraform {
backend "s3" {
bucket = "performance-cto-group"
region = "us-east-1"
}
}

75 changes: 75 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain3/db.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
variable "domain_name" {
description = "The name of the OpenSearch domain"
type = string
default = "vector-benchmark-d3" # You can override this value during `terraform apply`
}


data "aws_caller_identity" "current" {}

resource "aws_opensearch_domain" "example" {
domain_name = var.domain_name
engine_version = "OpenSearch_2.11"

cluster_config {
instance_type = "r6g.2xlarge.search"
}

advanced_security_options {
enabled = false
anonymous_auth_enabled = true
internal_user_database_enabled = true
master_user_options {
master_user_name = "opensearch"
master_user_password = "Performance2025#"
}
}

encrypt_at_rest {
enabled = true
}

# The Action element in the policy is set to es:*, which means it allows all Amazon OpenSearch Service actions.
access_policies = jsonencode({
Version = "2012-10-17"
Statement = [
{
Effect = "Allow"
Principal = "*"
Action = "es:*"
Resource = "arn:aws:es:us-east-2:${data.aws_caller_identity.current.account_id}:domain/${var.domain_name}/*"
}
]
})


ebs_options {
ebs_enabled = true
volume_size = 360
}


domain_endpoint_options {
enforce_https = false
tls_security_policy = "Policy-Min-TLS-1-2-2019-07"
}

node_to_node_encryption {
enabled = true
}

vpc_options {
subnet_ids = [
data.terraform_remote_state.shared_resources.outputs.subnet_public_id,
]

security_group_ids = ["${data.terraform_remote_state.shared_resources.outputs.performance_cto_sg_id}"]
}


tags = {
Domain = var.domain_name
Name = "vector-benchmark-opensearch-v2-11"
Project = "Vector-Competitive-OpenSearch"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

# output "primary_endpoint_address" {
# sensitive = true
# value = ["${module.cluster}"]
# }
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# provider
provider "aws" {
region = var.region
}

################################################################################
# This is the shared resources bucket key -- you will need it across environments like security rules,etc...
# !! do not change this !!
################################################################################
data "terraform_remote_state" "shared_resources" {
backend = "s3"
config = {
bucket = "performance-cto-group"
key = "benchmarks/infrastructure/shared_resources.tfstate"
region = "us-east-1"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@


variable "region" {
default = "us-east-2"
}
11 changes: 11 additions & 0 deletions terraform/opensearch-v2.11-r6g.2xlarge-search-domain4/common.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@

################################################################################
# This is the bucket holding this specific setup tfstate
################################################################################
terraform {
backend "s3" {
bucket = "performance-cto-group"
region = "us-east-1"
}
}

Loading

0 comments on commit 2ce9439

Please sign in to comment.