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

Option to cloud-init template and TF to modify ulimit for file process #47

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
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
3 changes: 2 additions & 1 deletion modules/cloud-init/worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ write_files:
TimeoutStartSec=5m
TimeoutStopSec=1h
KillMode=process
%{ if limitNOFILE != "" }LimitNOFILE=${limitNOFILE}%{ else }LimitNOFILE=4096:8192%{ endif }


Environment="CONCOURSE_TEAM=${worker_team}"
Environment="CONCOURSE_BIND_IP=0.0.0.0"
Expand Down Expand Up @@ -108,4 +110,3 @@ runcmd:
- |
/usr/local/scripts/cloudformation-signal.sh
/opt/aws/bin/cfn-signal -e $? --stack ${stack_name} --resource AutoScalingGroup --region ${region}

2 changes: 1 addition & 1 deletion modules/worker/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ locals {
worker_key = file("${var.concourse_keys}/worker_key")
pub_worker_key = file("${var.concourse_keys}/worker_key.pub")
pub_tsa_host_key = file("${var.concourse_keys}/tsa_host_key.pub")
limitNOFILE = var.ulimit_no_file
lifecycle_topic = aws_sns_topic.worker.arn
lifecycled_log_group_name = aws_cloudwatch_log_group.worker_lifecycled.name
})
Expand Down Expand Up @@ -217,4 +218,3 @@ data "aws_iam_policy_document" "asg_permissions" {
]
}
}

7 changes: 6 additions & 1 deletion modules/worker/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ variable "worker_team" {
default = ""
}

variable "ulimit_no_file" {
description = "Number of File Descriptors (default is 4096:8192, softlimit:hardlimit)"
type = string
default = "4096:8192"
}

variable "log_level" {
description = "Minimum level of logs to see (options: debug|info|error|fatal)."
type = string
Expand All @@ -94,4 +100,3 @@ variable "tags" {
type = map(string)
default = {}
}