Skip to content

Commit fc1b439

Browse files
authored
Custom resource with master (#188)
* 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 <[email protected]> * Test with Delivery local Signed-off-by: Tim Smith <[email protected]> * Update Kitchen config and remove 12.04 testing Signed-off-by: Tim Smith <[email protected]> * Fix contributing doc typo Signed-off-by: Tim Smith <[email protected]> * Cookstyle fix Signed-off-by: Tim Smith <[email protected]> * Update kitchen config Signed-off-by: Tim Smith <[email protected]> * 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
1 parent be7c0a8 commit fc1b439

File tree

7 files changed

+67
-11
lines changed

7 files changed

+67
-11
lines changed

.github/ISSUE_TEMPLATE.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
### Cookbook version
2+
[Version of the cookbook where you are encountering the issue]
3+
4+
### Chef-client version
5+
[Version of chef-client in your environment]
6+
7+
### Platform Details
8+
[Operating system distribution and release version. Cloud provider if running in the cloud]
9+
10+
### Scenario:
11+
[What you are trying to achieve and you can't?]
12+
13+
### Steps to Reproduce:
14+
[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?]
15+
16+
### Expected Result:
17+
[What are you expecting to happen as the consequence of above reproduction steps?]
18+
19+
### Actual Result:
20+
[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
### Description
2+
3+
[Describe what this change achieves]
4+
5+
### Issues Resolved
6+
7+
[List any existing issues this PR resolves]
8+
9+
### Contribution Check List
10+
11+
- [ ] All tests pass.
12+
- [ ] New functionality includes testing.
13+
- [ ] New functionality has been documented in the README if applicable

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
sudo: required
22
dist: trusty
33

4-
# install the pre-release chef-dk. Use chef-stable-trusty to install the stable release
54
addons:
65
apt:
76
sources:

CHANGELOG.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,32 @@
22

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

5-
## v3.0.1 (2017-1-30)
5+
6+
## [Unreleased]
7+
## [v3.0.4] (29-03-2017)
8+
- Fix bug introduced in #174 [#182][]
9+
10+
## [v3.0.3] (28-03-2017)
11+
12+
- Multiple addresses and ports on listener and frontend [#174][]
13+
- Customize logging destination [#178][]
14+
- updating to use bats/serverspec [#179][]
15+
16+
## [v3.0.2] (27-03-2017)
17+
18+
- Allow server startup from `app_lb` recipe. [#171][]
19+
- Use Delivery instead of Rake
20+
- Make this cookbook compatible with Chef-13, note: `params` option is now `parameters` [#175][]
21+
22+
## [v3.0.1] (2017-1-30)
623

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

13-
## v3.0.0 (2017-1-24)
30+
## [v3.0.0] (2017-1-24)
1431

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

23-
## v2.0.2 (2016-12-30)
40+
## [v2.0.2] (2016-12-30)
2441

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

206223
- Use `node.chef_environment` instead of `node['app_environment']`
224+
225+
[Unreleased]: https://github.com/sous-chefs/haproxy/compare/v3.0.4...HEAD
226+
[v3.0.4]: https://github.com/sous-chefs/haproxy/compare/v3.0.3...v3.0.4
227+
[v3.0.3]: https://github.com/sous-chefs/haproxy/compare/v3.0.2...v3.0.3
228+
[v3.0.2]: https://github.com/sous-chefs/haproxy/compare/v3.0.1...v3.0.2
229+
[v3.0.1]: https://github.com/sous-chefs/haproxy/compare/v3.0.0...v3.0.1
230+
[v3.0.0]: https://github.com/sous-chefs/haproxy/compare/v2.0.2...v3.0.0

CONTRIBUTING.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,12 @@
44

55
### `master` branch
66

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

99
## Tags
1010

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

13-
1413
## Pull requests
1514

1615
- <https://github.com/sous-chefs/haproxy/pulls>

Guardfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spec_path = 'test/unit'
1616
rspec_guard_config = {
1717
cmd: "bundle exec rspec --color --format progress --default-path=#{spec_path}",
1818
all_on_start: true,
19-
spec_paths: [spec_path]
19+
spec_paths: [spec_path],
2020
}
2121

2222
guard 'rspec', rspec_guard_config do

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# haproxy Cookbook
2+
## 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. :)
23

34
[![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)
45

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

118119
### haproxy_lb
119120

120-
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,
121+
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,
121122

122123
```ruby
123124
haproxy_lb 'rabbitmq' do
@@ -126,7 +127,7 @@ haproxy_lb 'rabbitmq' do
126127
servers (1..4).map do |i|
127128
"rmq#{i} 10.0.0.#{i}:5672 check inter 10s rise 2 fall 3"
128129
end
129-
params({
130+
parameters({
130131
'maxconn' => 20000,
131132
'balance' => 'roundrobin'
132133
})
@@ -147,11 +148,11 @@ listen rabbitmq'
147148
balance roundrobin
148149
```
149150

150-
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.
151+
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.
151152

152153
```ruby
153154
haproxy_lb 'rabbitmq' do
154-
params([
155+
parameters([
155156
'bind 0.0.0.0:5672',
156157
'mode tcp',
157158
'rmq1 10.0.0.1:5672 check inter 10s rise 2 fall 3',

0 commit comments

Comments
 (0)