influxdb_setup 1.0.0 → 1.0.1

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
  SHA1:
3
- metadata.gz: af774bd0bda065750d0b284e4bfb5dbcba4e6e44
4
- data.tar.gz: d28478b3420de3ed667969acd98f6644cd3714ed
3
+ metadata.gz: 292b9c53f779444476e2eadee7f3ebf6f7a211d7
4
+ data.tar.gz: e044cd782119b717f838ae936ac86c8784d7033d
5
5
  SHA512:
6
- metadata.gz: c287d4135601d44847afd6d98617054778600097e6ee68606a44239832516986de78bb4fd077aab66236ce112add87db143ff5e6bf47c98124b2acbb2b228a26
7
- data.tar.gz: d67ffd8c67f5221ccba1633370e0ec471707de5047941fa567d1e48e63227cc92bb2250108e0cd90280ea12713c5502227aa40c9682c878775e7e6a90b126ea9
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`. To
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 GitLab at
136
- https://github.com/avvo/influxdb_setup.
137
-
138
- ## Changelog
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
- v0.4.0 - Upgrade influxdb gem to handle InfluxDB v0.9.x and greater and remove shard space setup support
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: config.env,
8
+ rails_env: Config.env,
9
9
  commit: commit
10
10
  })
11
11
 
12
- log("Marked deploy: #{config.env} at sha #{commit}")
12
+ log("Marked deploy: #{Config.env} at sha #{commit}")
13
13
  end
14
14
  end
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module InfluxdbSetup
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  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.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-04-08 00:00:00.000000000 Z
11
+ date: 2016-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: influxdb