[arvados] updated: 2.6.0-152-g705c7711b
git repository hosting
git at public.arvados.org
Thu May 11 12:41:04 UTC 2023
Summary of changes:
tools/salt-install/terraform/aws/services/main.tf | 2 +-
tools/salt-install/terraform/aws/services/terraform.tfvars | 7 +++++--
tools/salt-install/terraform/aws/services/variables.tf | 10 ++++++----
3 files changed, 12 insertions(+), 7 deletions(-)
via 705c7711ba7a741c85a57d260cc63e8183373a86 (commit)
from d73105e0d13de878c2452983dd1680f5cb28f179 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 705c7711ba7a741c85a57d260cc63e8183373a86
Author: Lucas Di Pentima <lucas.dipentima at curii.com>
Date: Thu May 11 09:40:05 2023 -0300
20482: Allows setting instance types per service node.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima at curii.com>
diff --git a/tools/salt-install/terraform/aws/services/main.tf b/tools/salt-install/terraform/aws/services/main.tf
index fbbcabab3..48b6ef23c 100644
--- a/tools/salt-install/terraform/aws/services/main.tf
+++ b/tools/salt-install/terraform/aws/services/main.tf
@@ -48,7 +48,7 @@ resource "aws_iam_instance_profile" "default_instance_profile" {
resource "aws_instance" "arvados_service" {
for_each = toset(concat(local.public_hosts, local.private_hosts))
ami = local.instance_ami_id
- instance_type = var.default_instance_type
+ instance_type = try(var.instance_type[each.value], var.instance_type.default)
user_data = templatefile("user_data.sh", {
"hostname": each.value,
"deploy_user": var.deploy_user,
diff --git a/tools/salt-install/terraform/aws/services/terraform.tfvars b/tools/salt-install/terraform/aws/services/terraform.tfvars
index 4be0edd59..856ea2396 100644
--- a/tools/salt-install/terraform/aws/services/terraform.tfvars
+++ b/tools/salt-install/terraform/aws/services/terraform.tfvars
@@ -5,8 +5,11 @@
# Set to a specific SSH public key path. Default: ~/.ssh/id_rsa.pub
# pubkey_path = "/path/to/pub.key"
-# Set the instance type for your hosts. Default: m5a.large
-# default_instance_type = "t2.micro"
+# Set the instance type for your nodes. Default: m5a.large
+# instance_type = {
+# default = "m5a.xlarge"
+# controller = "c5a.4xlarge"
+# }
# AWS secret's name which holds the SSL certificate private key's password.
# Default: "arvados-ssl-privkey-password"
diff --git a/tools/salt-install/terraform/aws/services/variables.tf b/tools/salt-install/terraform/aws/services/variables.tf
index 99005a220..08675a84f 100644
--- a/tools/salt-install/terraform/aws/services/variables.tf
+++ b/tools/salt-install/terraform/aws/services/variables.tf
@@ -2,10 +2,12 @@
#
# SPDX-License-Identifier: CC-BY-SA-3.0
-variable "default_instance_type" {
- description = "The default EC2 instance type to use on the nodes"
- type = string
- default = "m5a.large"
+variable "instance_type" {
+ description = "The EC2 instance types to use per service node"
+ type = map(string)
+ default = {
+ default = "m5a.large"
+ }
}
variable "pubkey_path" {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list