diff --git a/terraform/small-test/fred-node/main.tf b/terraform/small-test/fred-node/main.tf index c53d6db8af2363a892278d3bb18f50698f8674c6..4b727e5b85764285f1b86dbec9448fb23ed9c4fc 100644 --- a/terraform/small-test/fred-node/main.tf +++ b/terraform/small-test/fred-node/main.tf @@ -20,7 +20,7 @@ resource "aws_instance" "fred_instance" { provisioner "remote-exec" { inline = [ "chmod +x /tmp/script.sh", - "/tmp/script.sh ${var.gitlab_repo_username} ${var.gitlab_repo_password} ${var.identifier}", + "/tmp/script.sh ${var.gitlab_repo_username} ${var.gitlab_repo_password} ${var.identifier} ${var.fred_flags[count.index]}", ] } diff --git a/terraform/small-test/fred-node/setup_node.sh b/terraform/small-test/fred-node/setup_node.sh index 5b67964306e55925607db3c0aeaf154a47a16aef..d7800dcc107560ca7b8141622bbac88993abc13c 100644 --- a/terraform/small-test/fred-node/setup_node.sh +++ b/terraform/small-test/fred-node/setup_node.sh @@ -16,4 +16,4 @@ sudo docker run -it \ -p 80:9001 \ -p 5555:5555 \ -v /tmp/config.toml:/config.toml \ - gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:latest --config config.toml \ No newline at end of file + gitlab-registry.tubit.tu-berlin.de/mcc-fred/fred/fred:latest --config config.toml $4 \ No newline at end of file diff --git a/terraform/small-test/fred-node/variables.tf b/terraform/small-test/fred-node/variables.tf index c7bb1c05bab00c172db2d6d5bac316f299e4fa50..62d2a168c187d300dae09c0ceb7634491483cb51 100644 --- a/terraform/small-test/fred-node/variables.tf +++ b/terraform/small-test/fred-node/variables.tf @@ -40,4 +40,8 @@ variable "instance_count" { variable "identifier" { type = string +} + +variable "fred_flags" { + type = list(string) } \ No newline at end of file diff --git a/terraform/small-test/main.tf b/terraform/small-test/main.tf index d01171104e359654853f4a91fb97f4237947e695..dddf74e9e82b98d8e4514f9b150dcffec7412714 100644 --- a/terraform/small-test/main.tf +++ b/terraform/small-test/main.tf @@ -15,4 +15,6 @@ module "fred-node" { gitlab_repo_password = var.gitlab_repo_password gitlab_repo_username = var.gitlab_repo_username identifier = var.identifier + instance_type = var.instance_type + fred_flags = var.fred_flags } \ No newline at end of file diff --git a/terraform/small-test/variables.tf b/terraform/small-test/variables.tf index 5c4f7797ab46d9bcc52eeb105a131e54ded1d4f4..0d4d6fac036d92692b4600c78d6ea63eca626bd7 100644 --- a/terraform/small-test/variables.tf +++ b/terraform/small-test/variables.tf @@ -1,17 +1,26 @@ variable "aws_region" { + description = "AWS region to deploy infrastructure in." type = string default = "eu-central-1" } variable "identifier" { + description = "Identifier for the deployment." type = string } variable "instance_count" { + description = "Number of nodes to deploy." type = number default = 3 } +variable "instance_type" { + description = "Type of EC2 instance to use." + type = string + default = "t2.micro" +} + variable "aws_access_key" { description = "The AWS access key." } @@ -28,3 +37,8 @@ variable "gitlab_repo_password" { description = "The password for the GitLab registry." } +variable "fred_flags" { + description = "Flags to pass to FReD container." + default = ["","",""] + type = list(string) +}