Skip to content
This repository was archived by the owner on Nov 18, 2017. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .fixtures.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
---
fixtures:
repositories:
inifile: https://github.com/puppetlabs/puppetlabs-inifile
staging: https://github.com/nanliu/puppet-staging
symlinks:
influxdb: "#{source_dir}"
15 changes: 8 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ branches:
language: ruby
rvm:
- 2.0.0
env:
- PUPPET_VERSION="3.2.4"
- PUPPET_VERSION="3.3.2"
- PUPPET_VERSION="3.4.3"
- PUPPET_VERSION="3.5.1"
- PUPPET_VERSION="3.6.2"
- PUPPET_VERSION="3.7.3"
sudo: false
bundler_args: --without development
script: bundle exec rake spec SPEC_OPTS='--format documentation'
env:
matrix:
- PUPPET_VERSION="2.7.25"
- PUPPET_VERSION="3.1.1"
- PUPPET_VERSION="3.2.4"
- PUPPET_VERSION="3.3.2"
- PUPPET_VERSION="3.4.2"
notifications:
email:
- justin@downing.us
8 changes: 4 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
source 'https://rubygems.org'

puppetversion = ENV.key?('PUPPET_GEM_VERSION') ? "= #{ENV['PUPPET_GEM_VERSION']}" : ['>= 3.4']

gem 'rake'
gem 'librarian-puppet'
gem 'puppet', puppetversion
gem 'puppet-blacksmith'
gem 'metadata-json-lint'
gem 'puppet', ENV['PUPPET_VERSION'] || '~> 3.7.0'
gem 'puppet-lint'
gem 'puppet-syntax'
gem 'puppetlabs_spec_helper'
gem 'rspec-puppet', :git => 'https://github.com/rodjek/rspec-puppet.git'
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2014 Justin Downing
Copyright (c) 2014-2015 Justin Downing

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
Expand Down
5 changes: 2 additions & 3 deletions Puppetfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
forge 'http://forge.puppetlabs.com'
forge 'https://forgeapi.puppetlabs.com'

mod 'nanliu/staging', '>= 0.4.0'
mod 'puppetlabs/inifile', '>= 1.0.0'
metadata
8 changes: 3 additions & 5 deletions Puppetfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
FORGE
remote: http://forge.puppetlabs.com
remote: https://forgeapi.puppetlabs.com
specs:
nanliu/staging (0.4.0)
puppetlabs/inifile (1.0.3)
nanliu-staging (0.4.0)

DEPENDENCIES
nanliu/staging (>= 0.4.0)
puppetlabs/inifile (>= 1.0.0)
nanliu-staging (< 0.4.1, >= 0.4.0)

27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@ you have any ideas or contributions, feel free to open a pull request!

Most of the configuration is parameterized, so you can freely adjust settings.

## Plugins

InfluxDB ships with three input plugins. These can be configured from the Puppet module:

#### collectd
```
class { 'influxdb':
input_plugins_collectd => true
}
```

#### graphite
```
class { 'influxdb':
input_plugins_graphite => true
}
```

#### udp
```
class { 'influxdb':
input_plugins_udp => true
}
```

You can read more about the other input-plugins configuration options in [manifests/init.pp](https://github.com/justindowning/puppet-influxdb/blob/master/manifests/init.pp) and [templats/config.toml.erb](https://github.com/justindowning/puppet-influxdb/blob/master/templates/config.toml.erb).

## Testing

```
Expand Down
13 changes: 7 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
require 'bundler'
Bundler.require(:rake)

require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
require 'puppet_blacksmith/rake_tasks'
require 'puppet-syntax/tasks/puppet-syntax'

Rake::Task[:lint].clear
PuppetLint::RakeTask.new :lint do |config|
config.ignore_paths = ["modules/**/**/*.pp","pkg/**/**/*.pp"]
config.log_format = '%{path}:%{linenumber}:%{KIND}: %{message}'
config.disable_checks = [ "80chars", 'autoloader_layout', 'class_inherits_from_params_class']
config.disable_checks = [ 'autoloader_layout', 'class_inherits_from_params_class']
end

task :metadata do
sh "metadata-json-lint metadata.json"
end

task :default => [:spec, :lint]
task :default => [ :syntax, :lint, :spec, :metadata ]
8 changes: 4 additions & 4 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ Vagrant.configure("2") do |config|
config.vm.synced_folder "modules", "/tmp/puppet-modules", type: "rsync", rsync__exclude: ".git/"
config.vm.synced_folder ".", "/tmp/puppet-modules/influxdb", type: "rsync", rsync__exclude: ".git/"

config.vm.define "centos", primary: true do |centos|
centos.vm.box = "puppetlabs/centos-6.5-64-puppet"
config.vm.define "centos", autostart: false do |centos|
centos.vm.box = 'puppetlabs/centos-7.0-64-puppet'
centos.vm.provision :puppet do |puppet|
puppet.manifests_path = "tests"
puppet.manifest_file = "vagrant.pp"
puppet.options = ["--modulepath", "/tmp/puppet-modules"]
end
end

config.vm.define "ubuntu", autostart: false do |ubuntu|
ubuntu.vm.box = "puppetlabs/ubuntu-14.04-64-puppet"
config.vm.define "ubuntu", primary: true do |ubuntu|
ubuntu.vm.box = 'puppetlabs/ubuntu-14.04-64-puppet'
ubuntu.vm.provision :puppet do |puppet|
puppet.manifests_path = "tests"
puppet.manifest_file = "vagrant.pp"
Expand Down
216 changes: 7 additions & 209 deletions manifests/config.pp
Original file line number Diff line number Diff line change
@@ -1,213 +1,11 @@
# == Class: influxdb::config
# More information on these settings available at: http://influxdb.org/docs/configuration.html
class influxdb::config {
ini_setting { 'hostname':
section => '',
setting => 'hostname',
value => "\"${influxdb::hostname}\"",
}

ini_setting { 'bind_address':
section => '',
setting => 'bind-address',
value => "\"${influxdb::bind_address}\"",
}

# [logging]
ini_setting { 'logging_level':
section => 'logging',
setting => 'level',
value => "\"${influxdb::logging_level}\"",
}

ini_setting { 'logging_file':
section => 'logging',
setting => 'file',
value => "\"${influxdb::logging_file}\"",
}

# [admin]
ini_setting { 'admin_port':
section => 'admin',
setting => 'port',
value => $influxdb::admin_port,
}

ini_setting { 'admin_assets':
section => 'admin',
setting => 'assets',
value => "\"${influxdb::admin_assets}\"",
}

# [api]
ini_setting { 'api_port':
section => 'api',
setting => 'port',
value => $influxdb::api_port,
}

ini_setting { 'api_read_timeout':
section => 'api',
setting => 'read-timeout',
value => "\"${influxdb::api_read_timeout}\"",
}

# [raft]
ini_setting { 'raft_port':
section => 'raft',
setting => 'port',
value => $influxdb::raft_port,
}

ini_setting { 'raft_dir':
section => 'raft',
setting => 'dir',
value => "\"${influxdb::raft_dir}\"",
}

ini_setting { 'raft_election_timeout':
section => 'raft',
setting => 'election-timeout',
value => "\"${influxdb::raft_election_timeout}\"",
}

# [storage]
ini_setting { 'storage_dir':
section => 'storage',
setting => 'dir',
value => "\"${influxdb::storage_dir}\"",
}

ini_setting { 'storage_write_buffer_size':
section => 'storage',
setting => 'write-buffer-size',
value => $influxdb::storage_write_buffer_size,
}

# [cluster]
ini_setting { 'cluster_seed_servers':
section => 'cluster',
setting => 'seed-servers',
value => $influxdb::cluster_seed_servers,
}

ini_setting { 'cluster_protobuf_port':
section => 'cluster',
setting => 'protobuf_port',
value => $influxdb::cluster_protobuf_port,
}

ini_setting { 'cluster_protobuf_timeout':
section => 'cluster',
setting => 'protobuf_timeout',
value => "\"${influxdb::cluster_protobuf_timeout}\"",
}

ini_setting { 'cluster_protobuf_heartbeat':
section => 'cluster',
setting => 'protobuf_heartbeat',
value => "\"${influxdb::cluster_protobuf_heartbeat}\"",
}

ini_setting { 'cluster_protobuf_min_backoff':
section => 'cluster',
setting => 'protobuf_min_backoff',
value => "\"${influxdb::cluster_protobuf_min_backoff}\"",
}

ini_setting { 'cluster_protobuf_max_backoff':
section => 'cluster',
setting => 'protobuf_max_backoff',
value => "\"${influxdb::cluster_protobuf_max_backoff}\"",
}

ini_setting { 'cluster_write_buffer_size':
section => 'cluster',
setting => 'write-buffer-size',
value => $influxdb::cluster_write_buffer_size,
}

ini_setting { 'cluster_max_response_buffer_size':
section => 'cluster',
setting => 'max-response-buffer-size',
value => $influxdb::cluster_max_response_buffer_size,
}

ini_setting { 'cluster_concurrent_shard_query_limit':
section => 'cluster',
setting => 'concurrent-shard-query-limit',
value => $influxdb::cluster_concurrent_shard_query_limit,
}

# [leveldb]
ini_setting { 'leveldb_max_open_files':
section => 'leveldb',
setting => 'max-open-files',
value => $influxdb::leveldb_max_open_files,
}

ini_setting { 'leveldb_lru_cache_size':
section => 'leveldb',
setting => 'lru-cache-size',
value => "\"${influxdb::leveldb_lru_cache_size}\"",
}

ini_setting { 'leveldb_max_open_shards':
section => 'leveldb',
setting => 'max-open-shards',
value => $influxdb::leveldb_max_open_shards,
}

ini_setting { 'leveldb_point_batch_size':
section => 'leveldb',
setting => 'point-batch-size',
value => $influxdb::leveldb_point_batch_size,
}

ini_setting { 'leveldb_point_write_size':
section => 'leveldb',
setting => 'point-write-size',
value => $influxdb::leveldb_point_write_size,
}

# [sharding]

# [wal]
ini_setting { 'wal_dir':
section => 'wal',
setting => 'dir',
value => "\"${influxdb::wal_dir}\"",
}

ini_setting { 'wal_flush_after':
section => 'wal',
setting => 'flush-after',
value => $influxdb::wal_flush_after,
}

ini_setting { 'wal_bookmark_after':
section => 'wal',
setting => 'bookmark-after',
value => $influxdb::wal_bookmark_after,
}

ini_setting { 'wal_index_after':
section => 'wal',
setting => 'index-after',
value => $influxdb::wal_index_after,
}

ini_setting { 'wal_requests_per_logfile':
section => 'wal',
setting => 'requests-per-logfile',
value => $influxdb::wal_requests_per_logfile,
}

# defaults for all settings
Ini_setting {
ensure => present,
path => $influxdb::config_path,
notify => Service['influxdb'],
require => Package['influxdb'],
file { $influxdb::config_path:
content => template('influxdb/config.toml.erb'),
owner => 'influxdb',
group => 'influxdb',
mode => '0644',
require => Class['influxdb::install'],
notify => Class['influxdb::service'],
}
}
Loading