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

Configure Provisioned EFS Throughput #42

Merged
merged 4 commits into from
Jul 5, 2022
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
8 changes: 8 additions & 0 deletions solr-on-ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ provision:
required: false
type: string
details: "The Solr setup file for initialization of cores/authentication/et cetera..."
- field_name: efsProvisionedThroughput
required: false
type: number
details: "The throughput, measured in MiB/s, that you want to provision for the file system"
computed_inputs:
- name: instance_name
type: string
Expand Down Expand Up @@ -70,6 +74,10 @@ provision:
default: "https://raw.githubusercontent.com/GSA/catalog.data.gov/main/solr/solr_setup.sh"
overwrite: false
type: string
- name: efsProvisionedThroughput
default: 1
overwrite: false
type: number
- name: region
type: string
details: "The AWS region in which to create k8s instances"
Expand Down
4 changes: 4 additions & 0 deletions terraform/standalone_ecs/provision/efs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ resource "aws_kms_key" "solr-data-key" {
resource "aws_efs_file_system" "solr-data" {
creation_token = "solr-${local.id_64char}-data"

performance_mode = "generalPurpose"
throughput_mode = "provisioned"
provisioned_throughput_in_mibps = var.efsProvisionedThroughput

# encryption-at-rest
encrypted = true
kms_key_id = aws_kms_key.solr-data-key.arn
Expand Down
6 changes: 6 additions & 0 deletions terraform/standalone_ecs/provision/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,9 @@ variable "setupLink" {
description = "The Solr setup file for initialization of cores/authentication/et cetera..."
default = "https://raw.githubusercontent.com/GSA/catalog.data.gov/main/solr/solr_setup.sh"
}

variable "efsProvisionedThroughput" {
type = number
description = "The throughput, measured in MiB/s, that you want to provision for the file system"
default = 1
}
2 changes: 1 addition & 1 deletion terraform/standalone_ecs/provision/vpc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module "vpc" {
}

resource "aws_service_discovery_private_dns_namespace" "solr" {
name = "local"
name = "solr${local.lb_name}"
description = "Internal solr-to-solr communication link"
vpc = module.vpc.vpc_id
}
Expand Down