Skip to content

Commit

Permalink
Deployments sync 20230609 (#23)
Browse files Browse the repository at this point in the history
* Sets correct defaults for bit and dup checks, 3m and 1m respectively. (#16)

Also provides variables for overriding those values.

* Make audit, bit, and dup worker maximum instance count configurable. (#17)
  • Loading branch information
dbernstein authored Jun 9, 2023
1 parent bd4bbf8 commit 0d6dde6
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 7 deletions.
2 changes: 1 addition & 1 deletion mill/audit-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_autoscaling_group" "audit_worker_asg" {
name = "${var.stack_name}-audit-worker-asg"
launch_configuration = aws_launch_configuration.audit_worker_launch_config.name
vpc_zone_identifier = [data.aws_subnet.duracloud_a.id, data.aws_subnet.duracloud_c.id, data.aws_subnet.duracloud_d.id]
max_size = 10
max_size = var.audit_worker_max
min_size = 1
}

Expand Down
2 changes: 1 addition & 1 deletion mill/bit-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_autoscaling_group" "bit_worker_asg" {
name = "${var.stack_name}-bit-worker-asg"
launch_configuration = aws_launch_configuration.bit_worker_launch_config.name
vpc_zone_identifier = [data.aws_subnet.duracloud_a.id, data.aws_subnet.duracloud_c.id, data.aws_subnet.duracloud_d.id]
max_size = 10
max_size = var.bit_worker_max
min_size = 0
}

Expand Down
2 changes: 1 addition & 1 deletion mill/high-priority-dup-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_autoscaling_group" "high_priority_dup_worker_asg" {
name = "${var.stack_name}-high_priority_dup-worker-asg"
launch_configuration = aws_launch_configuration.high_priority_dup_worker_launch_config.name
vpc_zone_identifier = [data.aws_subnet.duracloud_a.id, data.aws_subnet.duracloud_c.id, data.aws_subnet.duracloud_d.id]
max_size = 10
max_size = var.high_priority_dup_worker_max
min_size = 0
}

Expand Down
2 changes: 1 addition & 1 deletion mill/low-priority-dup-worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ resource "aws_autoscaling_group" "low_priority_dup_worker_asg" {
name = "${var.stack_name}-low_priority_dup-worker-asg"
launch_configuration = aws_launch_configuration.low_priority_dup_worker_launch_config.name
vpc_zone_identifier = [data.aws_subnet.duracloud_a.id, data.aws_subnet.duracloud_c.id, data.aws_subnet.duracloud_d.id]
max_size = 10
max_size = var.low_priority_dup_worker_max
min_size = 0
}

Expand Down
7 changes: 6 additions & 1 deletion mill/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,12 @@ resource "aws_s3_object" "mill_config_properties" {
bit_report_queue_name = aws_sqs_queue.bit_report.name,
bit_error_queue_name = aws_sqs_queue.bit_error.name,
dead_letter_queue_name = aws_sqs_queue.dead_letter.name,
storage_stats_queue_name = aws_sqs_queue.storage_stats.name }))
dup_frequency = var.dup_frequency,
bit_frequency = var.bit_frequency,
storage_stats_queue_name = aws_sqs_queue.storage_stats.name
}
)
)
}


Expand Down
4 changes: 2 additions & 2 deletions mill/resources/mill-config.properties.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ max-workers=20
#############################

# The frequency for a complete run through all store policies. Specify in hours (e.g. 3h), days (e.g. 3d), or months (e.g. 3m). Default is 1m - i.e. one month
looping.dup.frequency=0m
looping.dup.frequency=${dup_frequency}

# Indicates how large the task queue should be allowed to grow before the Looping Task Producer quits.
looping.dup.max-task-queue-size=200000
Expand All @@ -68,7 +68,7 @@ looping.dup.max-task-queue-size=200000
#############################

# The frequency for a complete run through all store policies. Specify in hours (e.g. 3h), days (e.g. 3d), or months (e.g. 3m). Default is 1m - i.e. one month
looping.bit.frequency=0d
looping.bit.frequency=${bit_frequency}

# Indicates how large the task queue should be allowed to grow before the Looping Task Producer quits.
looping.bit.max-task-queue-size=200000
Expand Down
29 changes: 29 additions & 0 deletions mill/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,32 @@ variable "stack_name" {
description = "The name of the duracloud stack."
}

variable "dup_frequency" {
description = "The frequency of the start of a duplication run. Format [0-9][d - day, m - month]. So a frequency of 1 month would be 1m."
default = "1m"
}

variable "bit_frequency" {
description = "The frequency of the start of a bit integrity check run. Format [0-9][d - day, m - month]. So a frequency of 1 month would be 1m."
default = "3m"
}

variable "audit_worker_max" {
description = "The max number of audit worker instances that the mill should scale up to."
default = 10
}

variable "bit_worker_max" {
description = "The max number of bit worker instances that the mill should scale up to."
default = 10
}

variable "high_priority_dup_worker_max" {
description = "The max number of high priority duplication worker instances that the mill should scale up to."
default = 10
}

variable "low_priority_dup_worker_max" {
description = "The max number of low priority duplication worker instances that the mill should scale up to."
default = 10
}

0 comments on commit 0d6dde6

Please sign in to comment.