scaltainer 0.1.2 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Dockerfile +9 -0
- data/README.md +1 -1
- data/lib/scaltainer/command.rb +1 -2
- data/lib/scaltainer/service_types/web.rb +2 -2
- data/lib/scaltainer/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e83fe8588dcb50e60dd1b55b3fccefa1957f553b
|
|
4
|
+
data.tar.gz: fcaca1ceaa70b6145ce7c0de83246775cfb14627
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e92dad052350902b89d6a1055daea1aedbb72b217a851767008b74cc7b5ad50f14124148eeb02ed3198480f39c428cb87b142dff733033e5fc8a1f6abcb8a8a2
|
|
7
|
+
data.tar.gz: 290abee67df29b3bde1517d4f331b6562f58064312d6406463f45f7b3f2f9fc66dbfbd23a768c4f7fc3f46521473a379dd3bbec644b2b61aa2f2e6c4e399cea2
|
data/Dockerfile
ADDED
data/README.md
CHANGED
|
@@ -57,7 +57,7 @@ set `HIREFIRE_TOKEN` environment variable before invoking
|
|
|
57
57
|
endpoint (see below) to get the number of jobs per queue
|
|
58
58
|
for each worker.
|
|
59
59
|
|
|
60
|
-
- `
|
|
60
|
+
- `NEW_RELIC_API_KEY`: New Relic API key. Currently New Relic
|
|
61
61
|
is used to retrieve average response time metric for web services.
|
|
62
62
|
More monitoring services can be added in the future.
|
|
63
63
|
|
data/lib/scaltainer/command.rb
CHANGED
|
@@ -18,7 +18,7 @@ module Scaltainer
|
|
|
18
18
|
puts "\nEnvironment variables: \n"
|
|
19
19
|
puts "- DOCKER_URL: defaults to local socket"
|
|
20
20
|
puts "- HIREFIRE_TOKEN"
|
|
21
|
-
puts "-
|
|
21
|
+
puts "- NEW_RELIC_API_KEY"
|
|
22
22
|
puts "- RESPONSE_TIME_WINDOW: defaults to 5"
|
|
23
23
|
puts "- LOG_LEVEL: defaults to INFO"
|
|
24
24
|
puts "- DOCKER_SECRETS_PATH_GLOB: path glob containing env files to load"
|
|
@@ -48,7 +48,6 @@ module Scaltainer
|
|
|
48
48
|
unless files.empty?
|
|
49
49
|
require 'dotenv'
|
|
50
50
|
Dotenv.load(*files)
|
|
51
|
-
puts ENV['NEW_RELIC_LICENSE_KEY']
|
|
52
51
|
end
|
|
53
52
|
end
|
|
54
53
|
end
|
|
@@ -6,8 +6,8 @@ module Scaltainer
|
|
|
6
6
|
|
|
7
7
|
def get_metrics(services)
|
|
8
8
|
super
|
|
9
|
-
nr_key = ENV['
|
|
10
|
-
raise ConfigurationError.new '
|
|
9
|
+
nr_key = ENV['NEW_RELIC_API_KEY']
|
|
10
|
+
raise ConfigurationError.new 'NEW_RELIC_API_KEY not set in environment' unless nr_key
|
|
11
11
|
nr = Newrelic::Metrics.new nr_key
|
|
12
12
|
to = Time.now
|
|
13
13
|
from = to - (ENV['RESPONSE_TIME_WINDOW'] || '5').to_i * 60
|
data/lib/scaltainer/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scaltainer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Hossam Hammady
|
|
@@ -135,6 +135,7 @@ files:
|
|
|
135
135
|
- ".gitignore"
|
|
136
136
|
- ".rspec"
|
|
137
137
|
- ".travis.yml"
|
|
138
|
+
- Dockerfile
|
|
138
139
|
- Gemfile
|
|
139
140
|
- LICENSE.txt
|
|
140
141
|
- README.md
|