cookbook 'influxdb', '= 4.0.0'
influxdb
(28) Versions
4.0.0
-
Follow13
InfluxDB, a timeseries database
cookbook 'influxdb', '= 4.0.0', :supermarket
knife supermarket install influxdb
knife supermarket download influxdb
InfluxDB
Chef cookbook to install and configure InfluxDB.
Usage
To install InfluxDB and place its configuration file, include the
influxdb::default
recipe in your node's run_list
. The default
recipe
installs the necessary dependencies to use the custom resources defined in this
cookbook.
For rendering the config set the parameter under
node['influxdb']['config']
default['influxdb']['config']['MyParameter'] = 'val'
Resources
The following gems are used by the custom resources and are installed by the
default
recipe:
This cookbook ships with five custom resources for managing the configuration
file, users, databases, cluster admins, and retention policies:
influxdb_config
This resource writes a configuration file for InfluxDB based on the passed
configuration hash:
influxdb_config node['influxdb']['config_file_path'] do config node['influxdb']['config'] action :create end
This resource is used by the default
recipe to place the configuration
defined in node['influxdb']['config']
.
influxdb_database
Configures an InfluxDB database.
influxdb_database 'my_db' do action :create end
influxdb_user
This resources configures a user to interact with InfluxDB databases.
influxdb_user 'user' do password 'changeme' databases ['my_db'] action :create end
influxdb_admin
This resources configures a cluster admin to interact with InfluxDB.
influxdb_admin 'admin' do password 'changeme' action :create end
influxdb_retention_policy
This resources configures a retention policy on a given database. The name
attribute is not used, the database and policy name provide the unique names
used by InfluxDB.
influxdb_retention_policy "foodb default retention policy" do policy_name 'default' database 'foodb' duration '1w' replication 1 action :create end
Client Libraries
Right now, this cookbook only supports the Ruby and CLI client libraries so as
not to add too many dependencies. That might change in the near future. By
default both flavors are disabled. Enable e.g. Ruby via:
node.default['influxdb']['client']['ruby']['enable'] = true
Finally include the influxdb::client
in your node's run_list
to install the
clients.
Tests
To run tests, install all dependencies with bundler:
bundle install
Then to run tests:
rake # Quick tests only (rubocop + minitest)
rake test:complete # All tests (rubocop + minitest + kitchen)
Author and License
Simple Finance ops@simple.com
Apache License, Version 2.0
Dependent cookbooks
nodejs ~> 2.4 |
chef_handler >= 0.0.0 |
apt ~> 2.7 |
yum ~> 3.6 |
compat_resource >= 0.0.0 |
Contingent cookbooks
There are no cookbooks that are contingent upon this one.
CHANGELOG
3.0.0
- Update to influxdb gem 0.2.x, which is not backwards compatible (contributed by @cmjosh)
2.7.0
- Add :stop action, remove :delete action from influxdb resource (contributed by @alvaromorales)
2.6.2
- Allow configuration options for databases (contributed by @wosc)
2.6.1
- Enable custom version of influxdb gem (contributed by @kri5)
2.6.0
- Support for 0.9.x release of InfluxDB (contributed by @rberger)
2.5.0
- Move influxdb resource actions to an attribute (contributed by @directionless)
2.4.0
- Update default config for 0.8.5 and up (contributed by @tjwallace)
2.3.0
- Update checksums for 0.8.6 (contributed by @tjwallace)
2.2.2
- Touch logfile if it does not exist (contributed by @odolbeau)
2.2.1
- Updated
latest
checksum to be accurate (contributed by @nomadium)
2.2.0
- Added
dbadmin
parameter toinfluxdb_user
, allowing granular control of which users are admins for which databases (contributed by @BarthV)
2.1.1
- User and admin deletion now idempotent (contributed by @flowboard)
2.1.0
- Multiple style and testing updates (contribued by @odolbeau)
2.0.4
- Default logfile path is now the Debian package default (contributed by @masarakki)
2.0.3
- Fixed typo in cluster admin check per InfluxDB 0.6.0 (contributed by @Chelo)
Foodcritic Metric
4.0.0 failed this metric
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/admin.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/config.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/database.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/retention_policy.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/user.rb:1
4.0.0 failed this metric
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/config.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/database.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/retention_policy.rb:1
FC016: LWRP does not declare a default action: /tmp/cook/3807c5d6ab6c99086ab74809/influxdb/resources/user.rb:1