Skip to content
This repository was archived by the owner on Apr 18, 2023. It is now read-only.
Draft
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: 2 additions & 0 deletions modules/ecs/ceramic/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ resource "aws_ecs_task_definition" "main" {
log_stream_prefix = var.ecs_log_prefix
logs_volume_source = var.efs_logs_fs_name
memory = var.ecs_memory
node_options = var.node_options
pubsub_qps_limit = var.pubsub_qps_limit
region = var.aws_region
s3_state_store_bucket_name = var.s3_bucket_name
s3_access_key_id = module.s3_ceramic_state_store_task_user.this_iam_access_key_id
Expand Down
8 changes: 8 additions & 0 deletions modules/ecs/ceramic/templates/container_definitions.json.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,18 @@
}
],
"environment": [
{
"name": "CERAMIC_PUBSUB_QPS_LIMIT",
"value": "${pubsub_qps_limit}"
}
{
"name": "NODE_ENV",
"value": "production"
},
{
"name": "NODE_OPTIONS",
"value": "${node_options}"
},
{
"name": "AWS_ACCESS_KEY_ID",
"value": "${s3_access_key_id}"
Expand Down
14 changes: 13 additions & 1 deletion modules/ecs/ceramic/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ variable "ecs_cpu" {
variable "ecs_memory" {
type = number
description = "Memory to allocate to the Ceramic daemon ECS task"
default = 2048 # 2048 MiB = 2 GB
default = 8192 # 8192 MiB = 8 GB
}

variable "ecs_service_name" {
Expand Down Expand Up @@ -138,6 +138,12 @@ variable "namespace" {
description = "Namespace for Ceramic resources"
}

variable "node_options" {
type = string
description = "NodeJS options"
default = "--max-old-space-size=7500"
}

variable "private_subnet_ids" {
type = list(string)
description = "List of private subnet ids for the VPC"
Expand All @@ -158,6 +164,12 @@ variable "s3_bucket_name" {
description = "Name (aka id) of S3 bucket to use as a backend"
}

variable "pubsub_qps_limit" {
type = string
description = "Ceramic pubsub qps limit env value"
default = "50"
}

variable "vpc_security_group_id" {
type = string
description = "VPC security group id"
Expand Down
5 changes: 3 additions & 2 deletions modules/ecs/ipfs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ variable "ecs_cluster_name" {

variable "ecs_cpu" {
type = number
description = "Fargate vCPU threads allocated to the Ceramic gateway instance"
description = "Fargate vCPU threads allocated to the IPFS instance"
}

variable "ecs_log_group_name" {
Expand All @@ -51,7 +51,8 @@ variable "ecs_log_prefix" {

variable "ecs_memory" {
type = number
description = "Fargate memory allocated to the Ceramic gateway instance"
description = "Fargate memory allocated to the IPFS instance"
default = 8192 # 8192 MiB = 8 GB
}

variable "ecs_service_name" {
Expand Down