-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathlocals.tf
107 lines (98 loc) · 2.8 KB
/
locals.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
locals {
druid_image = "${format("%s/%s:%s", var.druid_image_registry, var.druid_image_repository, var.druid_image_tag)}"
postgres_url = var.postgres_host
zookeeper_server = var.zookeeper_host
# labels
broker_labels = { app = "broker" }
overlord_labels = { app = "overlord" }
middlemanager_labels = { app = "middlemanager" }
historical_labels = { app = "historical" }
coordinator_labels = { app = "coordinator" }
router_labels = { app = "router" }
# JVM settings
common_JVM = "-Duser.timezone=UTC -Dfile.encoding=UTF-8 -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager"
broker_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.broker_port
},
{
name = "DRUID_SERVICE"
value = "broker"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s -XX:+UseG1GC", replace(var.broker_limits_memory, "i", ""), replace(var.broker_limits_memory, "i", ""))
}
]
overlord_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.overlord_port
},
{
name = "DRUID_SERVICE"
value = "overlord"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s", replace(var.overlord_limits_memory, "i", ""), replace(var.overlord_limits_memory, "i", ""))
}
]
middlemanager_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.middlemanager_port
},
{
name = "DRUID_SERVICE"
value = "middleManager"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s", replace(var.middlemanager_limits_memory, "i", ""), replace(var.middlemanager_limits_memory, "i", ""))
}
]
historical_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.historical_port
},
{
name = "DRUID_SERVICE"
value = "historical"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s", replace(var.historical_limits_memory, "i", ""), replace(var.historical_limits_memory, "i", ""))
}
]
coordinator_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.coordinator_port
},
{
name = "DRUID_SERVICE"
value = "coordinator"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s", replace(var.coordinator_limits_memory, "i", ""), replace(var.coordinator_limits_memory, "i", ""))
}
]
router_env_variables = [
{
name = "DRUID_SERVICE_PORT"
value = var.router_port
},
{
name = "DRUID_SERVICE"
value = "router"
},
{
name = "DRUID_JVM_ARGS"
value = format("-server -Xms%s -Xmx%s", replace(var.router_limits_memory, "i", ""), replace(var.router_limits_memory, "i", ""))
}
]
}