zanui/chef-thumbor — pull request #7 by vkhatri (2014-10-12 13:46:50+00:00)
Title: multiple refactor changes

## Thumbor

* thumbor is now versioned by a release `tag` instead of `master` branch
`master` branch triggers setup on every commit

* added init style attribute `node['thumbor']['init_style']` to make init setup
optional for init.d or upstart

* added different install methods via attribute `node['thumbor']['install_method']`
options: pip package

* added `thumbor` service user limit & attributes using cookbook `ulimit`

* added attribute `node['thumbor']['proxy']` to give an option to use
`nginx` or `haproxy`, default set to `nginx`

* attribute `node['thumbor']['options']['RESULT_STORAGE']` default value is set to `thumbor.result_storages.file_storage`
Earlier default config expected user to have AWS Account and S3 bucket, which may not comply for everyone

* attribute `node['thumbor']['options']['STORAGE']` default value is set to `thumbor.storages.file_storage`
Earlier default config expected user to have AWS Account and S3 bucket, which may not comply for everyone

* added attribute for `respawn` for `thumbor` service configuration `node['thumbor']['upstart_respawn']`

* enabled `monit` check for `nginx` and `thumbor` by default, seems to be a good idea

* added attributes to `thumbor.worker.erb` template

* added attributes to `thumbor.default.erb` template

* thumbor service by default now runs on local net, configurable by attribute `node['thumbor']['listen_address']`

* added attribute for thumbor key and config file - `node['thumbor']['conf_file']` `node['thumbor']['key_file']`

## APT Repo Setup

- move apt repo lwrp confiuration parameters to node attribute
for more info, check attribute file - `repo`

- `multiverse` repo has issues with ppa, moved default to `archive.ubuntu.com`
need to check whether it breaks things for others, tested on ubuntu 12 LTS

## Nginx

* `nginx` setup is done using `nginx` cookbook

* added attributes for `nginx` thumbor vhost, now user can override
cookbook template using `node['thumbor']['nginx']['vhost']['cookbook']`,
`node['thumbor']['nginx']['vhost']['template']` and
`node['thumbor']['nginx']['vhost']['variables']`

* added vhost attribute `node['thumbor']['nginx']['client_max_body_size']`

* renamed thumbor vhost template file to `nginx.thumbor.vhost.erb`

## Redis

* `redis` setup is not done by `redisio` cookbook

* added attribute `node['thumbor']['setup_redis']` to setup local redis instance

## User Management

* added `user` recipe

* `user` setup is optional now and depends upon node attribute `node['thumbor']['setup_user']`

* added `user` attributes

## Monit

* monit setup is done using cookbook `monit-ng` lwrp for nginx and thumbor service

* removed thumbor monit template `thumbor.monitrc.erb`

* removed nginx monit template `nginx.monitrc.erb`

* added default email notification template

## Cookbook Dependency

* added ulimit

* added monit-ng

* added redisio

## Recipe Changes

* recipe `thumbor::default` now wraps all other recipes

* moves recipe `thumbor::experimental` apt repo and packages resources to new
recipe `thumbor::install`

* packages to install are now platform family dependent, rhel family packages yet to add

* moved recipe `thumbor::experimental` to new recipe `thumbor::user`

* removed pip package notify to `thumbor` as pip packages are dependency for service
and must be installed prior starting the service

* moved & updated recipe `thumbor::experimental` nginx resources to new recipe `thumbor::nginx`

* moved recipe `thumbor::experimental` `thumbor` configuration resources to new recipe `thumbor::config`

* added `thumbor` service provider attribute `node['thumbor']['init_style']`

* added `thumbor` service user limit in recipe `thumbor::config`

* added recipe `thumbor::haproxy` as an alternative to nginx proxy, TODO item

* removed empty recipe file `thumbor::source`

* removed empty recipe file `thumbor::nginx`

* added new recipe `thumbor::nginx` for nginx thumbor vhost setup

* added new recipe `thumbor::monit` for `thumbor` & `nginx` service

* removed recipe file `thumbor::nginx_monit`, merged into recipe `thumbor::monit`

* added new attribute file `thumbor::redis` for cookbook `redisio` minimal configuration

* added new recipe `thumbor::redis` to setup redis using cookbook `redisio`

* added new recipe `thumbor::user` for user management

* thumbor service monit check now respects init style

* apt repository now can be add/remove/modified via node attribute*

I was able to test the cookbook on Ubuntu 12 LTS.

I have added/updated certain configuration to keep it generic. Kindly let me know if something needs to be modified, i will be more than happy to submit another PR.