terrafying-components 1.12.5 → 1.12.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f3ddc8fc721c504ef88f9f63e64df62b6466acc699b706bb9b2ffcc38cab200
4
- data.tar.gz: 896634fe8548201f34038ba49df8957933573a5d01bdd8ebaa01058b22f5587d
3
+ metadata.gz: 207909717ddd31f5740ef36393a7e9350c69d8815682279a1024672de1b60775
4
+ data.tar.gz: a741a9a535b43229db3381b3bd08ce4bead27fb4c8fd5eb691082ebcd76b23ea
5
5
  SHA512:
6
- metadata.gz: 7898765a4482959af59d741c8ad509ae2eb04b952925c3227dd0fa704f25c8f86f4e091ba7318e17dfcee0ade69fc931c649a0fe5f649b9ec9e3dc2c43f542eb
7
- data.tar.gz: b0fc7c7db4d441f75bfa9fd4f8bad36b3317d175f5a8ba915af82a1f397b406d0210667407143af7fe10729c0ea7c1d444de87a636ce6eca3747bec25597fc40
6
+ metadata.gz: 1b7cb8553f9ee931d603c0aeea91b9e8832a5337a399bf87e6729ef050501609b3889c50ba57355f415e7523558dc9c838f8dd59c83efcb5d7c6f5a8b4d76601
7
+ data.tar.gz: d89ae30401610cc32b2386c4066fa26a502d05916d09664a53a05921f1d628164b19acecb52ff82948450d6c6a9f7b1dd5a97f4f8a126283c8f50cedcf91d1f1
@@ -24,7 +24,9 @@ module Terrafying
24
24
  prom_name: 'prometheus',
25
25
  prom_version: 'v2.10.0',
26
26
  instances: 2,
27
- instance_type: 't3a.small'
27
+ instance_type: 't3a.small',
28
+ thanos_instance_type: 't3a.small',
29
+ prometheus_tsdb_retention: '1d'
28
30
  )
29
31
  super()
30
32
  @vpc = vpc
@@ -33,7 +35,9 @@ module Terrafying
33
35
  @prom_name = prom_name
34
36
  @prom_version = prom_version
35
37
  @instances = instances
36
- @instance_type = instance_type
38
+ @prometheus_instance_type = instance_type
39
+ @thanos_instance_type = thanos_instance_type
40
+ @prometheus_tsdb_retention = prometheus_tsdb_retention
37
41
  end
38
42
 
39
43
  def find
@@ -46,7 +50,8 @@ module Terrafying
46
50
  def create
47
51
  prometheus_thanos_sidecar_hostname = tf_safe(@prom_name)
48
52
  prometheus_thanos_sidecar_srv_fqdn = "_grpc._tcp.#{@vpc.zone.qualify prometheus_thanos_sidecar_hostname}"
49
- @instance_vcpu_count = aws.instance_type_vcpu_count(@instance_type)
53
+ @prometheus_instance_vcpu_count = aws.instance_type_vcpu_count(@prometheus_instance_type)
54
+ @thanos_instance_vcpu_count = aws.instance_type_vcpu_count(@thanos_instance_type)
50
55
  @thanos = create_thanos(prometheus_thanos_sidecar_srv_fqdn)
51
56
  create_thanos_cloudwatch_alert(@thanos)
52
57
 
@@ -82,7 +87,7 @@ module Terrafying
82
87
  number: 10_901
83
88
  }
84
89
  ],
85
- instance_type: @instance_type,
90
+ instance_type: @prometheus_instance_type,
86
91
  iam_policy_statements: thanos_store_access,
87
92
  instances: [{}] * @instances,
88
93
  units: [prometheus_unit, thanos_sidecar_unit],
@@ -116,7 +121,7 @@ module Terrafying
116
121
  }
117
122
  }
118
123
  ],
119
- instance_type: @instance_type,
124
+ instance_type: @thanos_instance_type,
120
125
  units: [thanos_unit(prometheus_thanos_sidecar_srv_fqdn)],
121
126
  instances: [{}] * @instances,
122
127
  loadbalancer: true,
@@ -150,12 +155,12 @@ module Terrafying
150
155
  -v /opt/prometheus:/opt/prometheus \
151
156
  quay.io/prometheus/prometheus:#{@prom_version} \
152
157
  --storage.tsdb.path=/opt/prometheus/data \
153
- --storage.tsdb.retention.time=1d \
158
+ --storage.tsdb.retention.time=#{@prometheus_tsdb_retention} \
154
159
  --storage.tsdb.min-block-duration=2h \
155
160
  --storage.tsdb.max-block-duration=2h \
156
161
  --storage.tsdb.no-lockfile \
157
- --storage.remote.read-concurrent-limit=#{@instance_vcpu_count} \
158
- --query.max-concurrency=#{@instance_vcpu_count} \
162
+ --storage.remote.read-concurrent-limit=#{@prometheus_instance_vcpu_count} \
163
+ --query.max-concurrency=#{@prometheus_instance_vcpu_count} \
159
164
  --config.file=/opt/prometheus/prometheus.yml \
160
165
  --web.console.templates=/etc/prometheus/consoles \
161
166
  --web.console.libraries=/etc/prometheus/console_libraries \
@@ -271,7 +276,7 @@ module Terrafying
271
276
  improbable/thanos:#{@thanos_version} \
272
277
  query \
273
278
  --query.replica-label=replica \
274
- --query.max-concurrent=#{@instance_vcpu_count} \
279
+ --query.max-concurrent=#{@thanos_instance_vcpu_count} \
275
280
  --store=dnssrv+#{prometheus_thanos_sidecar_srv_fqdn} \
276
281
  --log.level=warn
277
282
  Restart=always
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Terrafying
4
4
  module Components
5
- VERSION = '1.12.5'
5
+ VERSION = '1.12.6'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: terrafying-components
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.5
4
+ version: 1.12.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - uSwitch Limited
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-30 00:00:00.000000000 Z
11
+ date: 2019-05-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler