Permalink
Browse files

Merge pull request #266 from tas50/cairoffi

Require Python 2.7 + Update dependencies to match the graphite docs
  • Loading branch information...
2 parents 6cebb4d + 8b667a5 commit aa5ce132c831f8069a7a0abeaf13de49b4fd6f3f @tas50 tas50 committed on GitHub Dec 9, 2016
Showing with 166 additions and 175 deletions.
  1. +20 −12 .kitchen.docker.yml
  2. +0 −3 .kitchen.yml
  3. +13 −33 .travis.yml
  4. +0 −1 Berksfile
  5. +21 −18 CHANGELOG.md
  6. +3 −5 CONTRIBUTING.md
  7. +28 −8 Guardfile
  8. +9 −11 README.md
  9. +6 −8 Rakefile
  10. +5 −5 attributes/default.rb
  11. +1 −1 attributes/uwsgi.rb
  12. +4 −6 example/graphite_example/recipes/single_node.rb
  13. +1 −1 libraries/chef_graphite.rb
  14. +1 −1 libraries/chef_graphite_carbon_config_converter.rb
  15. +1 −1 libraries/chef_graphite_ini_writer.rb
  16. +1 −1 libraries/chef_graphite_python.rb
  17. +1 −1 libraries/helpers.rb
  18. +1 −1 libraries/matchers.rb
  19. +1 −1 libraries/mixins.rb
  20. +1 −1 libraries/provider_carbon_conf_accumulator.rb
  21. +1 −1 libraries/provider_storage_conf_accumulator.rb
  22. +4 −6 metadata.rb
  23. +1 −1 providers/carbon_aggregator.rb
  24. +1 −1 providers/carbon_cache.rb
  25. +1 −1 providers/carbon_relay.rb
  26. +1 −1 providers/service_runit.rb
  27. +1 −1 providers/storage.rb
  28. +1 −1 providers/storage_schema.rb
  29. +1 −1 providers/web_config.rb
  30. +1 −1 recipes/_carbon_config.rb
  31. +1 −1 recipes/_carbon_packages.rb
  32. +3 −5 recipes/_directories.rb
  33. +1 −1 recipes/_user.rb
  34. +8 −12 recipes/_web_packages.rb
  35. +1 −1 recipes/carbon.rb
  36. +1 −1 recipes/default.rb
  37. +1 −1 recipes/packages.rb
  38. +1 −1 recipes/uwsgi.rb
  39. +1 −1 recipes/web.rb
  40. +1 −1 resources/carbon_aggregator.rb
  41. +1 −1 resources/carbon_cache.rb
  42. +1 −1 resources/carbon_conf_accumulator.rb
  43. +1 −1 resources/carbon_relay.rb
  44. +1 −1 resources/service.rb
  45. +1 −1 resources/storage.rb
  46. +1 −1 resources/storage_conf_accumulator.rb
  47. +1 −1 resources/storage_schema.rb
  48. +1 −1 resources/web_config.rb
  49. +1 −1 spec/recipes/_carbon_config_spec.rb
  50. +1 −1 spec/recipes/_carbon_package_spec.rb
  51. +1 −1 spec/recipes/_directories_spec.rb
  52. +1 −1 spec/recipes/_user_spec.rb
  53. +1 −1 spec/recipes/carbon_spec.rb
  54. +3 −2 spec/spec_helper.rb
  55. +0 −1 test/integration/default/default_spec.rb
View
@@ -19,60 +19,68 @@ platforms:
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
- - RUN /usr/bin/apt-get install lsb-release procps -y
+ - RUN /usr/bin/apt-get install lsb-release procps net-tools -y
- name: debian-8
driver:
image: debian:8
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
- - RUN /usr/bin/apt-get install lsb-release -y
-
-- name: centos-6
- driver:
- image: centos:6
- platform: rhel
- pid_one_command: /sbin/init
- intermediate_instructions:
- - RUN yum -y install which initscripts
+ - RUN /usr/bin/apt-get install lsb-release procs net-tools -y
- name: centos-7
driver:
image: centos:7
platform: rhel
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN yum -y install lsof which systemd-sysv initscripts
+ - RUN yum -y install lsof which systemd-sysv initscripts wget net-tools
- name: fedora-latest
driver:
image: fedora:latest
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- - RUN dnf -y install yum which systemd-sysv initscripts
+ - RUN dnf -y install yum which systemd-sysv initscripts wget net-tools
- name: ubuntu-12.04
driver:
image: ubuntu-upstart:12.04
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: ubuntu-14.04
driver:
image: ubuntu-upstart:14.04
pid_one_command: /sbin/init
intermediate_instructions:
- RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
- name: ubuntu-16.04
driver:
image: ubuntu:16.04
pid_one_command: /bin/systemd
intermediate_instructions:
- RUN /usr/bin/apt-get update
+ - RUN /usr/bin/apt-get install apt-transport-https lsb-release procps net-tools -y
+
+- name: opensuse-13.2
+ driver:
+ image: opensuse:13.2
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which net-tools
+- name: opensuse-42.1
+ driver:
+ image: opensuse:42.1
+ pid_one_command: /bin/systemd
+ intermediate_instructions:
+ - RUN zypper --non-interactive install aaa_base perl-Getopt-Long-Descriptive which hostname
suites:
- name: default
View
@@ -8,12 +8,9 @@ verifier:
name: inspec
platforms:
- - name: centos-6.8
- name: centos-7.2
- name: debian-7.11
- name: debian-8.5
- - name: fedora-24
- run_list: yum::dnf_yum_compat
- name: ubuntu-12.04
- name: ubuntu-14.04
- name: ubuntu-16.04
View
@@ -1,47 +1,27 @@
-sudo: required
-dist: trusty
-
-# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
+# Use Travis's cointainer based infrastructure
+sudo: false
addons:
apt:
sources:
- - chef-current-trusty
+ - chef-current-precise
packages:
- chefdk
-# Don't `bundle install` which takes about 1.5 mins
+# Don't `bundle install`
install: echo "skip bundle install"
branches:
only:
- - develop
- master
-services: docker
-
-env:
- matrix:
- - INSTANCE=default-centos-6
- - INSTANCE=default-centos-7
- - INSTANCE=default-debian-7
- - INSTANCE=default-debian-8
- - INSTANCE=default-ubuntu-1204
- - INSTANCE=default-ubuntu-1404
- - INSTANCE=default-ubuntu-1604
-
+# Ensure we make ChefDK's Ruby the default
before_script:
- - sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER )
- eval "$(/opt/chefdk/bin/chef shell-init bash)"
-
-script: KITCHEN_LOCAL_YAML=.kitchen.docker.yml /opt/chefdk/embedded/bin/kitchen verify ${INSTANCE}
-
-matrix:
- include:
- - before_script:
- - eval "$(/opt/chefdk/bin/chef shell-init bash)"
- - /opt/chefdk/embedded/bin/chef --version
- - /opt/chefdk/embedded/bin/cookstyle --version
- - /opt/chefdk/embedded/bin/foodcritic --version
- - script:
- - /opt/chefdk/bin/chef exec rake
- env: UNIT_AND_LINT=1
+ # We have to install chef-sugar for ChefSpec
+ - /opt/chefdk/embedded/bin/chef gem install chef-sugar
+
+script:
+ - /opt/chefdk/embedded/bin/chef --version
+ - /opt/chefdk/embedded/bin/cookstyle --version
+ - /opt/chefdk/embedded/bin/foodcritic --version
+ - /opt/chefdk/bin/chef exec rake
View
@@ -3,6 +3,5 @@ source 'https://supermarket.chef.io'
metadata
group :integration do
- cookbook 'yum'
cookbook 'graphite_example', path: './example/graphite_example'
end
View
@@ -1,39 +1,42 @@
-Graphite CHANGELOG
-===================
+# Graphite CHANGELOG
This file is used to list changes made in each version of the graphite cookbook.
## 1.0.4
+
- Syntax and styling updates
- Use full Twisted version number
- Manage graphite nofile ulimit
- Fixes carbon source
- Adds License and Code of Conduct
+
### Known Issues
-- Reordering of Carbon .ini [241](https://github.com/hw-cookbooks/graphite/issues/241)
-- Graphite web timeout when restarting [224](https://github.com/hw-cookbooks/graphite/issues/224)
+
+- Reordering of Carbon .ini [241](https://github.com/sous-chefs/graphite/issues/241)
+- Graphite web timeout when restarting [224](https://github.com/sous-chefs/graphite/issues/224)
## 1.0.2
-- README improvements to address resource usage and removal of Apache
- dependency ([@webframp][], [#187][])
-- restart graphite-web in graphite_example sample recipe ([@obazoud][], [#182][])
-- remove unused `['graphite']['web_server']` attribute ([@obazoud][], [#181][])
+
+- README improvements to address resource usage and removal of Apache dependency ([@webframp], [#187])
+- restart graphite-web in graphite_example sample recipe ([@obazoud], [#182])
+- remove unused `['graphite']['web_server']` attribute ([@obazoud], [#181])
## 1.0.1
+
- Readme improvements.
## 1.0.0
+
### Breaking Changes
-- Initial release of graphite library style cookbook. Complete rewrite
- of cookbook to provide reusable resources. Breaks backward
- compatibility with cookbook version prior 1.0. ([@webframp][], [@fnichol][],
- [@agoddard][])
-
-<!--- The following link definition list is generated by PimpMyChangelog --->
-[#181]: https://github.com/hw-cookbooks/graphite/issues/181
-[#182]: https://github.com/hw-cookbooks/graphite/issues/182
-[#187]: https://github.com/hw-cookbooks/graphite/issues/187
+
+- Initial release of graphite library style cookbook. Complete rewrite of cookbook to provide reusable resources. Breaks backward compatibility with cookbook version prior 1.0\. ([@webframp], [@fnichol], [@agoddard])
+
+<!-- - The following link definition list is generated by PimpMyChangelog - -->
+
+[#181]: https://github.com/sous-chefs/graphite/issues/181
+[#182]: https://github.com/sous-chefs/graphite/issues/182
+[#187]: https://github.com/sous-chefs/graphite/issues/187
[@agoddard]: https://github.com/agoddard
[@fnichol]: https://github.com/fnichol
[@obazoud]: https://github.com/obazoud
-[@webframp]: https://github.com/webframp
+[@webframp]: https://github.com/webframp
View
@@ -12,14 +12,12 @@ The develop branch is the current edge of development.
## Pull requests
-* https://github.com/hw-cookbooks/graphite/pulls
+- <https://github.com/sous-chefs/graphite-cookbook/pulls>
-Please base all pull requests of the `develop` branch. Merges to
-`master` only occur through the `develop` branch. Pull requests
-based on `master` will likely be cherry picked.
+Please base all pull requests of the `develop` branch. Merges to `master` only occur through the `develop` branch. Pull requests based on `master` will likely be cherry picked.
## Issues
Need to report an issue? Use the github issues:
-* https://github.com/hw-cookbooks/graphite/issues
+- <https://github.com/sous-chefs/graphite-cookbook/issues>
View
@@ -1,11 +1,31 @@
-# -*- mode: ruby -*-
-# vi: set ft=ruby :
+#!/usr/bin/env ruby
+# ^syntax detection
-opts = '--color --format progress'
+require 'cookstyle'
-guard 'rspec', cmd: "bundle exec rspec #{opts}" do
- watch(%r{^spec/.+_spec\.rb$})
- watch(%r{^(libraries|providers|recipes|resources)/(.+)\.rb$}) { |m| "spec/#{m[1]}/#{m[2]}_spec.rb" }
- watch('spec/spec_helper.rb') { 'spec' }
- watch(%r{^spec/fixtures/.+$}) { 'spec' }
+guard :rubocop, keep_failed: false, cli: '-r finstyle' do
+ watch(/.+\.rb$/) { |m| m[0] }
+ watch(%r{(?:.+/)?\.rubocop\.yml$}) { |m| File.dirname(m[0]) }
+end
+
+guard 'foodcritic', cookbook_paths: '.', cli: '-C -t ~FC001' do
+ watch(%r{attributes/.+\.rb$})
+ watch(%r{providers/.+\.rb$})
+ watch(%r{recipes/.+\.rb$})
+ watch(%r{resources/.+\.rb$})
+end
+
+spec_path = 'test/unit'
+rspec_guard_config = {
+ cmd: "bundle exec rspec --color --format progress --default-path=#{spec_path}",
+ all_on_start: true,
+ spec_paths: [spec_path]
+}
+
+guard 'rspec', rspec_guard_config do
+ watch(%r{^#{spec_path}/.+_spec\.rb$})
+ watch("#{spec_path}/spec_helper.rb") { spec_path }
+ watch(%r{^(libraries|providers|recipes|resources)/(.+)\.rb$}) do |m|
+ "#{spec_path}/#{m[2]}_spec.rb"
+ end
end
View
@@ -1,6 +1,6 @@
# Graphite Cookbook
-[![Build Status](https://travis-ci.org/hw-cookbooks/graphite.svg?branch=master)](https://travis-ci.org/hw-cookbooks/graphite) [![Code Climate](https://codeclimate.com/github/hw-cookbooks/graphite/badges/gpa.svg)](https://codeclimate.com/github/hw-cookbooks/graphite) [![Cookbook Version](https://img.shields.io/cookbook/v/graphite.svg)](https://supermarket.chef.io/cookbooks/graphite)
+[![Build Status](https://travis-ci.org/sous-chefs/graphite.svg?branch=master)](https://travis-ci.org/sous-chefs/graphite) [![Code Climate](https://codeclimate.com/github/sous-chefs/graphite/badges/gpa.svg)](https://codeclimate.com/github/sous-chefs/graphite) [![Cookbook Version](https://img.shields.io/cookbook/v/graphite.svg)](https://supermarket.chef.io/cookbooks/graphite)
## Description
@@ -17,22 +17,22 @@ Consult the Graphite documentation for more information:
- Ubuntu
- Debian
-- RHEL and derivatives (Centos, Amazon Linux, Oracle Linux, Scientific Linux)
-- Fedora
+- RHEL 7+ (RHEL 6 lacks Python 2.7)
### Chef
- Chef 11+
### Cookbooks
+
- python
- runit
- build-essential
- yum-epel
## Attributes
-See [default attributes](https://github.com/hw-cookbooks/graphite/blob/master/attributes/default.rb#L48) for platform specific packages installed.
+See [default attributes](https://github.com/sous-chefs/graphite/blob/master/attributes/default.rb#L48) for platform specific packages installed.
- `node['graphite']['version']` - package version to install, defaults to '0.9.12'
- `node['graphite']['twisted_version']` - twisted version to pin to, defaults to '13.1'
@@ -106,9 +106,9 @@ Write the configuration file for [Graphite Web](https://github.com/graphite-proj
- `graphite_web_config`: data driven python config file writer for graphite web. Assumes the whole file is managed, typically this is the path to local_settings.py. Custom python code can be placed in the optional 'dynamic template', by default a file named 'local_settings_dynamic.py' that is optimistically loaded if present.
-Yes it's [writing python via ruby](https://github.com/hw-cookbooks/graphite/blob/master/libraries/chef_graphite_python.rb#L14).
+Yes it's [writing python via ruby](https://github.com/sous-chefs/graphite/blob/master/libraries/chef_graphite_python.rb#L14).
-A runit service definition is provided to [start a uwsgi process](https://github.com/hw-cookbooks/graphite/blob/master/example/graphite_example/recipes/single_node.rb#L105), but note that choice of web server for proxying to the application server is left up to you. No more hard Apache dependency!
+A runit service definition is provided to [start a uwsgi process](https://github.com/sous-chefs/graphite/blob/master/example/graphite_example/recipes/single_node.rb#L105), but note that choice of web server for proxying to the application server is left up to you. No more hard Apache dependency!
### Accumulators
@@ -117,7 +117,7 @@ Due to the graphite config file format, the data driven resources use an accumul
- `graphite_carbon_conf_accumulator`: lookup named carbon resources in run context and gather config
- `graphite_storage_conf_accumulator`: lookup named storage schema resources in run context and gather config
-If you look at the [example cookbook recipe](https://github.com/hw-cookbooks/graphite/blob/master/example/graphite_example/recipes/single_node.rb#L6) you probably notice that many of the resources simply take a single `config` attribute, which is basically a hash of the configuration to be written.
+If you look at the [example cookbook recipe](https://github.com/sous-chefs/graphite/blob/master/example/graphite_example/recipes/single_node.rb#L6) you probably notice that many of the resources simply take a single `config` attribute, which is basically a hash of the configuration to be written.
This can come from attributes in a wrapper cookbook or via data bags if you like. Be as creative as you can tolerate.
@@ -129,13 +129,11 @@ It's a library cookbook, intended to be used in your custom wrapper cookbook to
We have purposefully left out web server configuration to remove the dependency, so you're free to use whatever works in your environment. This avoids the need for this cookbook to keep up to date with configuration that isn't really graphite specific.
-For example usage consult the reference cookbook [example](https://github.com/hw-cookbooks/graphite/tree/master/example/graphite_example/recipes)
-
-Feel free to ask us questions anytime on irc: #heavywater on freenode
+For example usage consult the reference cookbook [example](https://github.com/sous-chefs/graphite/tree/master/example/graphite_example/recipes)
## Examples
-You can find example usage in the graphite_example cookbook that is included in the [git repository](https://github.com/hw-cookbooks/graphite/blob/master/example/graphite_example/recipes/single_node.rb).
+You can find example usage in the graphite_example cookbook that is included in the [git repository](https://github.com/sous-chefs/graphite/blob/master/example/graphite_example/recipes/single_node.rb).
## Data Bags
Oops, something went wrong.

0 comments on commit aa5ce13

Please sign in to comment.