-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvariables.tf
More file actions
296 lines (247 loc) · 7.64 KB
/
variables.tf
File metadata and controls
296 lines (247 loc) · 7.64 KB
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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
variable "service_account_key_path" {
type = string
description = "Path to STACKIT service account key JSON"
default = "~/.ssh/cmf-sa.json"
}
variable "bootstrap_project_id" {
type = string
description = "Existing project ID used to discover parent container for creating a new project"
default = ""
}
variable "create_project" {
type = bool
description = "Whether to create a dedicated project for this example"
default = true
}
variable "target_project_name" {
type = string
description = "Name of the terraform-created project"
default = "cmf-rehost-springboot"
}
variable "target_project_owner_email" {
type = string
description = "Owner email for terraform-created project (defaults to service account email when empty)"
default = ""
}
variable "parent_container_id" {
type = string
description = "Optional explicit parent container ID/UUID for project creation; skips bootstrap project lookup when set"
default = ""
}
variable "project_id" {
type = string
description = "Existing STACKIT project id (used only when create_project=false)"
default = ""
}
variable "region" {
type = string
description = "STACKIT region"
default = "eu01"
}
variable "availability_zone" {
type = string
description = "STACKIT availability zone"
default = "eu01-1"
}
variable "server_name" {
type = string
default = "rehost-springboot-vm"
}
variable "machine_type" {
type = string
description = "STACKIT flavor id"
default = ""
}
variable "image_id" {
type = string
description = "Boot image id"
default = ""
}
variable "auto_discover_compute_defaults" {
type = bool
description = "Try to auto-discover image and machine type via beta data sources"
default = false
}
variable "public_ssh_key_path" {
type = string
default = "~/.ssh/id_rsa.pub"
}
variable "private_ssh_key_path" {
type = string
default = "~/.ssh/id_rsa"
}
variable "ssh_user" {
type = string
default = "ubuntu"
}
variable "jar_local_path" {
type = string
description = "Path to Spring Boot JAR on local machine"
default = "ansible/files/springboot-app.jar"
}
variable "run_ansible" {
type = bool
description = "Whether terraform should execute ansible-playbook after provisioning"
default = true
}
variable "enable_observability" {
type = bool
description = "Enable provisioning of a STACKIT Observability instance and scrape jobs"
default = false
}
variable "observability_instance_name" {
type = string
description = "Name of the STACKIT Observability instance"
default = "rehost-observability"
}
variable "observability_plan_name" {
type = string
description = "Plan name for STACKIT Observability instance"
default = "Observability-Starter-EU01"
}
variable "observability_scrape_interval" {
type = string
description = "Scrape interval used for Observability scrape jobs"
default = "30s"
}
variable "observability_scrape_timeout" {
type = string
description = "Scrape timeout used for Observability scrape jobs (must be smaller than scrape interval)"
default = "10s"
}
variable "enable_node_exporter" {
type = bool
description = "Install node exporter on the VM and create scrape config"
default = true
}
variable "node_exporter_port" {
type = number
description = "Node exporter listen port"
default = 9100
}
variable "expose_node_exporter_port" {
type = bool
description = "Open node exporter port on the security group"
default = true
}
variable "springboot_app_port" {
type = number
description = "Spring Boot application port used by local health probe"
default = 8080
}
variable "enable_local_postgresql" {
type = bool
description = "Install and configure PostgreSQL on the target VM for the Spring Boot app"
default = false
}
variable "postgresql_vm_listen_port" {
type = number
description = "PostgreSQL port used by the Spring Boot datasource configuration"
default = 5432
}
variable "postgresql_db_name" {
type = string
description = "PostgreSQL database name used by the application"
default = "springmusic"
}
variable "postgresql_app_username" {
type = string
description = "PostgreSQL application username created on the VM"
default = "springmusic"
}
variable "postgresql_app_password" {
type = string
description = "PostgreSQL application password created on the VM"
default = "change-me"
sensitive = true
}
variable "postgresql_source_dump_local_path" {
type = string
description = "Optional local path to a PostgreSQL dump file that should be copied to the VM"
default = ""
}
variable "postgresql_vm_dump_path" {
type = string
description = "Target dump file path on the VM"
default = "/tmp/source-postgresql.dump"
}
variable "postgresql_restore_after_copy" {
type = bool
description = "When true and a dump file is provided, restore the dump into the target database"
default = false
}
variable "enable_local_load_generator" {
type = bool
description = "Enable local irregular request generation against the Spring Boot app from within the VM"
default = false
}
variable "springboot_loadgen_target_path" {
type = string
description = "HTTP path used by the local load generator"
default = "/"
}
variable "springboot_loadgen_base_interval_seconds" {
type = number
description = "Base interval in seconds for the systemd timer of the local load generator"
default = 8
}
variable "springboot_loadgen_randomized_delay_seconds" {
type = number
description = "Additional randomized delay in seconds for the local load generator timer"
default = 8
}
variable "springboot_loadgen_burst_min_requests" {
type = number
description = "Minimum number of HTTP requests per generated load burst"
default = 40
}
variable "springboot_loadgen_burst_max_requests" {
type = number
description = "Maximum number of HTTP requests per generated load burst"
default = 160
}
variable "springboot_loadgen_enable_stress" {
type = bool
description = "Enable CPU and memory stress during each generated load burst"
default = true
}
variable "springboot_loadgen_stress_cpu_workers" {
type = number
description = "Number of stress-ng CPU workers executed per load burst"
default = 2
}
variable "springboot_loadgen_stress_vm_workers" {
type = number
description = "Number of stress-ng VM workers executed per load burst"
default = 1
}
variable "springboot_loadgen_stress_vm_bytes" {
type = string
description = "Memory size per VM worker for stress-ng, for example 256M or 40%"
default = "40%"
}
variable "springboot_loadgen_stress_timeout_seconds" {
type = number
description = "Duration in seconds of CPU and memory stress per generated load burst"
default = 15
}
variable "enable_springboot_metrics_scrape" {
type = bool
description = "Create scrape config for Spring Boot metrics endpoint"
default = false
}
variable "springboot_metrics_port" {
type = number
description = "Port of Spring Boot metrics endpoint"
default = 8080
}
variable "springboot_metrics_path" {
type = string
description = "Path of Spring Boot Prometheus metrics endpoint"
default = "/actuator/prometheus"
}
variable "create_grafana_dashboard" {
type = bool
description = "Create default Grafana dashboard for VM and app metrics"
default = true
}