Commit fa743c5 1 parent 76c8cf5 commit fa743c5 Copy full SHA for fa743c5
File tree 12 files changed +182
-1
lines changed
infra/terraform/modules/standalone_apm_server
12 files changed +182
-1
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ module "standalone_apm_server" {
157
157
apm_instance_type = var. standalone_apm_server_instance_size
158
158
apm_volume_type = var. standalone_apm_server_volume_type
159
159
apm_volume_size = var. apm_server_tail_sampling ? coalesce (var. standalone_apm_server_volume_size , 60 ) : var. standalone_apm_server_volume_size
160
+ apm_iops = var. standalone_apm_server_iops
160
161
apm_server_bin_path = var. apm_server_bin_path
161
162
ea_managed = false
162
163
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.2xlarge"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 128g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 16g"
17
+ # Number of shards for the ES indices
18
+ apm_shards = 4
19
+
20
+ # Standalone
21
+
22
+ standalone_apm_server_instance_size = " c6id.2xlarge"
23
+ standalone_moxy_instance_size = " c6i.4xlarge"
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.large"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 16g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 1g"
17
+
18
+ # Standalone
19
+
20
+ standalone_apm_server_instance_size = " c6id.large"
21
+ standalone_moxy_instance_size = " c6i.xlarge"
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.large"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 16g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 2g"
17
+
18
+ # Standalone
19
+
20
+ standalone_apm_server_instance_size = " c6id.large"
21
+ standalone_moxy_instance_size = " c6i.xlarge"
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.4xlarge"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 256g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # Run the cluster with a dedicated master
16
+ elasticsearch_dedicated_masters = true
17
+ # APM server instance size
18
+ apm_server_size = " 32g"
19
+ # Number of shards for the ES indices
20
+ apm_shards = 4
21
+
22
+ # Standalone
23
+
24
+ standalone_apm_server_instance_size = " c6id.4xlarge"
25
+ standalone_moxy_instance_size = " c6i.8xlarge"
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ user_name = "USER"
2
2
3
3
# APM bench
4
4
5
- worker_instance_type = " c6i.2xlarge "
5
+ worker_instance_type = " c6i.4xlarge "
6
6
7
7
# Elastic Cloud
8
8
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.large"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 32g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 4g"
17
+
18
+ # Standalone
19
+
20
+ standalone_apm_server_instance_size = " c6id.large"
21
+ standalone_moxy_instance_size = " c6i.xlarge"
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.xlarge"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 64g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 8g"
17
+
18
+ # Standalone
19
+
20
+ standalone_apm_server_instance_size = " c6id.xlarge"
21
+ standalone_moxy_instance_size = " c6i.2xlarge"
Original file line number Diff line number Diff line change
1
+ user_name = " USER"
2
+
3
+ # APM bench
4
+
5
+ worker_instance_type = " c6i.xlarge"
6
+
7
+ # Elastic Cloud
8
+
9
+ # The number of AZs the APM Server should span.
10
+ apm_server_zone_count = 1
11
+ # The Elasticsearch cluster node size.
12
+ elasticsearch_size = " 64g"
13
+ # The number of AZs the Elasticsearch cluster should have.
14
+ elasticsearch_zone_count = 2
15
+ # APM server instance size
16
+ apm_server_size = " 8g"
17
+
18
+ # Standalone
19
+
20
+ standalone_apm_server_instance_size = " c6i.xlarge"
21
+ standalone_apm_server_volume_type = " io2"
22
+ standalone_apm_server_iops = 6000
23
+ standalone_moxy_instance_size = " c6i.2xlarge"
Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ variable "standalone_apm_server_volume_size" {
142
142
description = " Optional volume size in GB to use for APM Server VM"
143
143
}
144
144
145
+ variable "standalone_apm_server_iops" {
146
+ default = null
147
+ type = number
148
+ description = " Optional disk IOPS in GB to use for APM Server VM"
149
+ }
150
+
145
151
# # VPC Network settings
146
152
147
153
variable "vpc_cidr" {
Original file line number Diff line number Diff line change @@ -172,6 +172,7 @@ resource "aws_instance" "apm" {
172
172
root_block_device {
173
173
volume_type = var. apm_volume_type
174
174
volume_size = var. apm_volume_size
175
+ iops = var. apm_iops
175
176
}
176
177
177
178
connection {
@@ -181,6 +182,18 @@ resource "aws_instance" "apm" {
181
182
private_key = file (" ${ var . aws_provisioner_key_name } " )
182
183
}
183
184
185
+ // For instance types with 'd.' e.g. c6id.2xlarge, use the NVMe ssd as data disk.
186
+ provisioner "remote-exec" {
187
+ inline = length (regexall (" d[.]" , self. instance_type )) > 0 ? [
188
+ " sudo mkfs -t xfs /dev/nvme1n1" ,
189
+ " mkdir ~/data" ,
190
+ " sudo mount /dev/nvme1n1 ~/data" ,
191
+ " sudo chown $USER:$USER ~/data" ,
192
+ ] : [
193
+ " :" , // no-op
194
+ ]
195
+ }
196
+
184
197
provisioner "file" {
185
198
source = " ${ var . apm_server_bin_path } /apm-server"
186
199
destination = local. bin_path
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ variable "apm_volume_size" {
22
22
description = " Optional apm server volume size in GB override"
23
23
}
24
24
25
+ variable "apm_iops" {
26
+ default = null
27
+ type = number
28
+ description = " Optional apm server disk IOPS override"
29
+ }
30
+
25
31
variable "vpc_id" {
26
32
description = " VPC ID to provision the EC2 instance"
27
33
type = string
You can’t perform that action at this time.
0 commit comments