Skip to content

Commit

Permalink
RE-344 Fix some typos and conditionally forward 5353 on data
Browse files Browse the repository at this point in the history
  • Loading branch information
saxmfone1 committed Oct 25, 2019
1 parent 4597ed8 commit ca0d8b9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions terraform/examples/multi-node-cluster/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ module "data01" {
docker_registry_password = var.docker_registry_password
pop_id = var.data01_pop_id
server_id = var.data01_host
primary = false
cluster_id = 1
cluster_size = 3
data_peers = [var.data02_host, var.data03_host]
Expand All @@ -141,6 +142,7 @@ module "data02" {
docker_registry_password = var.docker_registry_password
pop_id = var.data02_pop_id
server_id = var.data02_host
primary = false
cluster_id = 2
cluster_size = 3
data_peers = [var.data01_host, var.data03_host]
Expand All @@ -160,6 +162,7 @@ module "data03" {
docker_registry_password = var.docker_registry_password
pop_id = var.data03_pop_id
server_id = var.data03_host
primary = false
cluster_id = 3
cluster_size = 3
data_peers = [var.data01_host, var.data02_host]
Expand Down
Binary file added terraform/examples/multi-node-cluster/qaenv.plan
Binary file not shown.
12 changes: 10 additions & 2 deletions terraform/modules/data/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ ${var.server_id}
${join(",", var.data_peers)}
%{endif~}
--enable_ops_metrics
${var.enable_ops_metrics~}
${var.enable_ops_metrics}
--expose_ops_metrics
${var.expose_ops_metrics~}
%{if var.telegraf_output_elasticsearch_data_host != null}
--telegraf_output_elasticsearch_data_host
${var.telegraf_output_elasticsearch_data_host~}
%{endif~}
%{if var.telegraf_output_elasticsearch_index != null}
--telegraf_output_elasticsearch_index 'qaenv-%Y.%m.%d'
--telegraf_output_elasticsearch_index
${var.telegraf_output_elasticsearch_index~}
%{endif~}
%{if var.cluster_id != null}
Expand Down Expand Up @@ -115,6 +115,14 @@ resource "docker_container" "data" {
external = 8686
}

dynamic "ports" {
for_each = var.cluster_id != null ? list(var.cluster_id) : []
content {
internal = 5353
external = 5353
}
}

# enable ipv6 for loopback
sysctls = {
"net.ipv6.conf.lo.disable_ipv6" = "0"
Expand Down

0 comments on commit ca0d8b9

Please sign in to comment.