Skip to content

Commit

Permalink
Custom resource with master (#188)
Browse files Browse the repository at this point in the history
* Allow server startup from app_lb recipe.

* Placeholder changelog.

* chef_version requires Chef >= 12.6.0.

* Added capacity to understand multiple address and ports with array for 'bind' attribute of haproxy_lb resource

* Add github templates

Signed-off-by: Tim Smith <tsmith@chef.io>

* Test with Delivery local

Signed-off-by: Tim Smith <tsmith@chef.io>

* Update Kitchen config and remove 12.04 testing

Signed-off-by: Tim Smith <tsmith@chef.io>

* Fix contributing doc typo

Signed-off-by: Tim Smith <tsmith@chef.io>

* Cookstyle fix

Signed-off-by: Tim Smith <tsmith@chef.io>

* Update kitchen config

Signed-off-by: Tim Smith <tsmith@chef.io>

* Chef 13 (#176)

* adding provisioner erorr for Chef-13
* Use parameters instead of reserved word, params
* Update cookbook for Chef-13 (Closes #175)

* updating to use bats/serverspec (#179)

* updating to use bats/serverspec

* setting verifier path

* Customize logging destination (#178)

* Allow global logging to be customized

* Modify attributes

* Fixx attributes, again

* And again

* Fix rubocop error

* Add in serverspec testing

* Add in serverspec testing

* updating for release, and fixing sudo (#180)

* updating for release, and fixing sudo

* fixing source path

* fixing changelog links (#181)

* Fix bug introduced in #174 (#182)

This fixes a bug that was introduced in #174 which doesn't honor the fact if the
bind parameter is nil don't include any bind line. In our case, we put in the
bind keyword in the parameters parameter so this added two bind statements and
made haproxy unhappy.

It looks like this was a copypasta originally as this was included in the prior
code.

* release update (#183)

* readme update (#185)

* removing extras

* fixing extras

* adding in two more fixes
  • Loading branch information
rshade authored Apr 18, 2017
1 parent be7c0a8 commit fc1b439
Show file tree
Hide file tree
Showing 7 changed files with 67 additions and 11 deletions.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
### Cookbook version
[Version of the cookbook where you are encountering the issue]

### Chef-client version
[Version of chef-client in your environment]

### Platform Details
[Operating system distribution and release version. Cloud provider if running in the cloud]

### Scenario:
[What you are trying to achieve and you can't?]

### Steps to Reproduce:
[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]

### Expected Result:
[What are you expecting to happen as the consequence of above reproduction steps?]

### Actual Result:
[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]
13 changes: 13 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
### Description

[Describe what this change achieves]

### Issues Resolved

[List any existing issues this PR resolves]

### Contribution Check List

- [ ] All tests pass.
- [ ] New functionality includes testing.
- [ ] New functionality has been documented in the README if applicable
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
sudo: required
dist: trusty

# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
addons:
apt:
sources:
Expand Down
30 changes: 27 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,32 @@

This file is used to list changes made in each version of the haproxy cookbook. (@sun77)

## v3.0.1 (2017-1-30)

## [Unreleased]
## [v3.0.4] (29-03-2017)
- Fix bug introduced in #174 [#182][]

## [v3.0.3] (28-03-2017)

- Multiple addresses and ports on listener and frontend [#174][]
- Customize logging destination [#178][]
- updating to use bats/serverspec [#179][]

## [v3.0.2] (27-03-2017)

- Allow server startup from `app_lb` recipe. [#171][]
- Use Delivery instead of Rake
- Make this cookbook compatible with Chef-13, note: `params` option is now `parameters` [#175][]

## [v3.0.1] (2017-1-30)

- Reload haproxy configuration on changes [#152][]
- merging in generic socket conf [#107][]
- updating config to use facilities hash dynamically [#102][]
- adding tproxy and splice per [#98][]
- removing members with nil ips from member array. [#79][]

## v3.0.0 (2017-1-24)
## [v3.0.0] (2017-1-24)

- Configurable debug options
- Merging [#123][] - CentOS7 compatibility
Expand All @@ -20,7 +37,7 @@ This file is used to list changes made in each version of the haproxy cookbook.
- Chef >= 12.1 required
- changing ['haproxy']['source']['target_os'], ['haproxy']['source']['target_cpu'] to use proper architecture, Issue: [#150][]

## v2.0.2 (2016-12-30)
## [v2.0.2] (2016-12-30)

- Cookstyle fixes
- Travis testing updates
Expand Down Expand Up @@ -204,3 +221,10 @@ This file is used to list changes made in each version of the haproxy cookbook.
## v1.0.0

- Use `node.chef_environment` instead of `node['app_environment']`

[Unreleased]: https://github.com/sous-chefs/haproxy/compare/v3.0.4...HEAD
[v3.0.4]: https://github.com/sous-chefs/haproxy/compare/v3.0.3...v3.0.4
[v3.0.3]: https://github.com/sous-chefs/haproxy/compare/v3.0.2...v3.0.3
[v3.0.2]: https://github.com/sous-chefs/haproxy/compare/v3.0.1...v3.0.2
[v3.0.1]: https://github.com/sous-chefs/haproxy/compare/v3.0.0...v3.0.1
[v3.0.0]: https://github.com/sous-chefs/haproxy/compare/v2.0.2...v3.0.0
3 changes: 1 addition & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@

### `master` branch

The master branch is the current comitted changes. These changes may not yet be released although we try to release often.
The master branch is the current committed changes. These changes may not yet be released although we try to release often.

## Tags

All releases are tagged in git. To see the releases available to you see the changelog or the tags directly.


## Pull requests

- <https://github.com/sous-chefs/haproxy/pulls>
Expand Down
2 changes: 1 addition & 1 deletion Guardfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ 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]
spec_paths: [spec_path],
}

guard 'rspec', rspec_guard_config do
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# haproxy Cookbook
## This cookbook is currently frozen at 3.0.4 for features. Critical bugs will be merged. We are focusing on 4.0. Please join chef chat and help. :)

[![Build Status](https://travis-ci.org/sous-chefs/haproxy.svg?branch=master)](https://travis-ci.org/sous-chefs/haproxy) [![Cookbook Version](https://img.shields.io/cookbook/v/haproxy.svg)](https://supermarket.chef.io/cookbooks/haproxy)

Expand Down Expand Up @@ -117,7 +118,7 @@ Installs haproxy from source. Used by the `default` and `app_lb` recipes.

### haproxy_lb

Configure a part of haproxy (`frontend|backend|listen`). It is used in `manual` and `app_lb` recipes to configure default frontends and backends. Several common options can be set as attributes of the LWRP. Others can always be set with the `params` attribute. For instance,
Configure a part of haproxy (`frontend|backend|listen`). It is used in `manual` and `app_lb` recipes to configure default frontends and backends. Several common options can be set as attributes of the LWRP. Others can always be set with the `parameters` attribute. For instance,

```ruby
haproxy_lb 'rabbitmq' do
Expand All @@ -126,7 +127,7 @@ haproxy_lb 'rabbitmq' do
servers (1..4).map do |i|
"rmq#{i} 10.0.0.#{i}:5672 check inter 10s rise 2 fall 3"
end
params({
parameters({
'maxconn' => 20000,
'balance' => 'roundrobin'
})
Expand All @@ -147,11 +148,11 @@ listen rabbitmq'
balance roundrobin
```

All options can also be set in the params instead. In that case, you might want to provide an array to params attributes to avoid conflicts for options occuring several times.
All options can also be set in the parameters instead. In that case, you might want to provide an array to parameters attributes to avoid conflicts for options occuring several times.

```ruby
haproxy_lb 'rabbitmq' do
params([
parameters([
'bind 0.0.0.0:5672',
'mode tcp',
'rmq1 10.0.0.1:5672 check inter 10s rise 2 fall 3',
Expand Down

0 comments on commit fc1b439

Please sign in to comment.