influxdb_setup 1.0.0 → 1.0.1
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/CHANGELOG.md +15 -0
- data/README.md +21 -21
- data/lib/influxdb_setup/config.rb +4 -4
- data/lib/influxdb_setup/mark_deploy.rb +2 -2
- data/lib/influxdb_setup/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 292b9c53f779444476e2eadee7f3ebf6f7a211d7
|
4
|
+
data.tar.gz: e044cd782119b717f838ae936ac86c8784d7033d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c470a19810295c2054edf8e73d1e12b57816b081612e7022903faecb387312f07470fee78ad2eded4c4188fb269aef604059079ade032831fdf1057b610e8379
|
7
|
+
data.tar.gz: 7f9d34ab5a87195f8f1600adb190cd4296db22c95afc067c4a1a768413600d57960a990ac7ee62807d770f588a3bd5d919b427d23bb8215b7f11814ff841c6cd
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@ CHANGELOG inspiration from http://keepachangelog.com/.
|
|
5
5
|
|
6
6
|
## Unreleased
|
7
7
|
|
8
|
+
## [1.0.1] - May 20, 2016
|
9
|
+
* Fix Config.env method to be class, so that Config.config works if you don't set it first.
|
10
|
+
|
11
|
+
## [1.0.0] - April 8, 2016
|
12
|
+
* Public release
|
13
|
+
|
8
14
|
## [0.5.0] - March 17, 2016
|
9
15
|
* Update influxdb_queries.yml and LoadQueries for InfluxDB 0.10
|
10
16
|
|
@@ -12,3 +18,12 @@ CHANGELOG inspiration from http://keepachangelog.com/.
|
|
12
18
|
* Skip loading continuous queries if influxdb_queries.yml file doesn't exist.
|
13
19
|
* Use a real logger object, this will cause timestamps to be printed, and makes
|
14
20
|
testing easier.
|
21
|
+
|
22
|
+
## [0.4.0]
|
23
|
+
* Upgrade influxdb gem to handle InfluxDB v0.9.x and greater and remove shard space setup support
|
24
|
+
|
25
|
+
## [0.3.1]
|
26
|
+
* automatically skip influxdb setup on a rollback
|
27
|
+
|
28
|
+
## [0.3.0]
|
29
|
+
* added the ability to skip influxdb setup by setting the capistrano variable skip_influx_setup
|
data/README.md
CHANGED
@@ -7,8 +7,6 @@ For configuring the influxdb database, and continuous queries.
|
|
7
7
|
Add these lines to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
source 'http://gems.corp.avvo.com'
|
11
|
-
|
12
10
|
gem 'influxdb_setup'
|
13
11
|
```
|
14
12
|
|
@@ -90,6 +88,17 @@ Make sure your queries match what the server coerces them into (no spaces
|
|
90
88
|
after commas) by running the `rake influxdb:load_queries` task multiple times.
|
91
89
|
If there's queries to update the task will not do anything.
|
92
90
|
|
91
|
+
### ERB enabled continuous queries
|
92
|
+
|
93
|
+
The `db/influxdb_queries.yml` file is ERB-enabled, so you can de-duplicate some
|
94
|
+
metrics:
|
95
|
+
|
96
|
+
```yaml
|
97
|
+
---
|
98
|
+
prod_perc_95:
|
99
|
+
SELECT count(value) as count, percentile("value", 95) AS overall, <%= %w[cache db].map {|name| "percentile(\"#{name}\", 95) AS #{name}" } %> INTO prod_perc_95 FROM "response_times" WHERE "rails_env"='production' GROUP BY time(30m)
|
100
|
+
```
|
101
|
+
|
93
102
|
## Rake tasks
|
94
103
|
|
95
104
|
`rake influxdb:create_db`
|
@@ -117,30 +126,21 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
117
126
|
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
118
127
|
prompt that will allow you to experiment.
|
119
128
|
|
120
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
121
|
-
release a new version, update the version number in `version.rb`, and then run
|
122
|
-
`bundle exec rake release`, which will create a git tag for the version, push
|
123
|
-
git commits and tags, and push the `.gem` file to
|
124
|
-
[rubygems.org](https://rubygems.org).
|
125
|
-
|
126
|
-
To cut a gem:
|
127
|
-
|
128
|
-
1. Bump the version in `lib/influxdb_setup/version.rb`
|
129
|
-
2. Build the gem `gem_push=no rake release`
|
130
|
-
3. Push to geminabox `gem inabox pkg/influxdb_setup-0.1.0.gem` (or whatever
|
131
|
-
version you just cut.)
|
129
|
+
To install this gem onto your local machine, run `bundle exec rake install`.
|
132
130
|
|
133
131
|
## Contributing
|
134
132
|
|
135
|
-
Bug reports and pull requests are welcome on
|
136
|
-
https://github.com/avvo/influxdb_setup.
|
137
|
-
|
138
|
-
|
133
|
+
Bug reports and pull requests are welcome on GitHub at
|
134
|
+
https://github.com/avvo/influxdb_setup. Please update the CHANGELOG
|
135
|
+
**unreleased** section with your changes. Please do not update version file in
|
136
|
+
pull request.
|
139
137
|
|
140
|
-
|
141
|
-
v0.3.1 - automatically skip influxdb setup on a rollback
|
142
|
-
v0.3.0 - added the ability to skip influxdb setup by setting the capistrano variable skip_influx_setup
|
138
|
+
## Release Process
|
143
139
|
|
140
|
+
1. The version.rb file should only ever be updated in master, don't update it in your branch.
|
141
|
+
2. Once changes have been merged to master:
|
142
|
+
3. Update CHANGELOG.md and version.rb file with new version. Commit as "Bump version".
|
143
|
+
4. Run `rake release`, which will create a git tag for the version, push git commits and tags.
|
144
144
|
|
145
145
|
## License
|
146
146
|
|
@@ -12,6 +12,10 @@ module InfluxdbSetup
|
|
12
12
|
@config ||= YAML.load(ERB.new(File.read("config/influxdb.yml")).result)[env]
|
13
13
|
end
|
14
14
|
|
15
|
+
def self.env
|
16
|
+
defined?(Rails) ? Rails.env : ENV.fetch('RAILS_ENV', 'development')
|
17
|
+
end
|
18
|
+
|
15
19
|
attr_accessor :logger
|
16
20
|
|
17
21
|
def initialize(config: self.class.config, logger: Logger.new(STDOUT))
|
@@ -19,10 +23,6 @@ module InfluxdbSetup
|
|
19
23
|
@logger = logger
|
20
24
|
end
|
21
25
|
|
22
|
-
def env
|
23
|
-
defined?(Rails) ? Rails.env : ENV.fetch('RAILS_ENV', 'development')
|
24
|
-
end
|
25
|
-
|
26
26
|
def db_name
|
27
27
|
@config['db_name']
|
28
28
|
end
|
@@ -5,11 +5,11 @@ module InfluxdbSetup
|
|
5
5
|
root = @config.build_client(db)
|
6
6
|
|
7
7
|
root.write_point("deploys", values: {
|
8
|
-
rails_env:
|
8
|
+
rails_env: Config.env,
|
9
9
|
commit: commit
|
10
10
|
})
|
11
11
|
|
12
|
-
log("Marked deploy: #{
|
12
|
+
log("Marked deploy: #{Config.env} at sha #{commit}")
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: influxdb_setup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Donald Plummer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: influxdb
|