Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update source install versions #502

Merged
merged 14 commits into from
Jan 31, 2024
64 changes: 25 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,45 +23,33 @@ jobs:
strategy:
matrix:
os:
- "debian-9"
- "debian-10"
- "debian-11"
- "debian-12"
- "ubuntu-2004"
- "ubuntu-2204"
- "centos-7"
- "centos-8"
- "centos-stream-8"
- "centos-stream-9"
- "fedora-latest"
suite:
- config-2
- config-3
- config-acl
- config-array
- config-backend-search
- config-custom-template
- config-fastcgi
- config-resolver
- config-ssl-redirect
- "package"
- "source-18"
- "source-20"
- "source-22"
- "source-24"
- "source-26"
- "source-28"
- "source-29"
- "source-lua"
- "source-default"
- "source-openssl"
exclude:
# Excluded due to https://github.com/sous-chefs/haproxy/issues/475
- os: "fedora-latest"
suite: "source-18"
- os: "fedora-latest"
suite: "source-20"
- os: "fedora-latest"
suite: "source-22"
- os: "fedora-latest"
suite: "source-default"
- os: "fedora-latest"
suite: "source-openssl"
- os: "ubuntu-2204"
suite: "source-18"
- os: "ubuntu-2204"
suite: "source-20"
- os: "ubuntu-2204"
suite: "source-22"
- os: "ubuntu-2204"
suite: "source-24"
- os: "ubuntu-2204"
suite: "source-default"
- os: "ubuntu-2204"
suite: "source-openssl"
# - "source-openssl"
# OpenSSSL libraries are not currently compiling correctly
# see https://github.com/sous-chefs/haproxy/issues/503
fail-fast: false

steps:
Expand All @@ -84,12 +72,13 @@ jobs:
strategy:
matrix:
os:
- "amazonlinux-2"
- "amazonlinux-2023"
suite:
- "package"
- "source-18"
- "source-20"
- "source-22"
- "source-24"
- "source-26"
- "source-28"
- "source-29"
- "source-default"
fail-fast: false

Expand Down Expand Up @@ -141,11 +130,8 @@ jobs:
- "centos-7"
- "centos-stream-8"
suite:
- "config-1"
- "config-1-userlist"
- "config-2"
- "config-3"
- "config-4"
- "config-backend-search"
- "config-acl"
- "config-resolver"
Expand Down
2 changes: 2 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require:
- cookstyle
47 changes: 23 additions & 24 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,19 @@ This file is used to list changes made in each version of the haproxy cookbook.

## Unreleased

- Update default HAProxy source install verision to 2.8.5
- Update source install tests to include versions 2.4, 2.6, 2.8, 2.9
- Remove config-1 & config-4 examples from integration tests
- Remove `reqirep` and `reqrep` params to `haproxy_backend`, `haproxy_frontend`, and `haproxy_listen` resources.
- These params are no longer supported since HAProxy 2.1
- Fix HTTP 403 error page in tests
- HAProxy now requires headers on error files
- Format tests to use InSpec profiles so that we can inherit profiles
- Fix lua test
- Remove deprecated block option from ACL test
- Fix source lua tests on CentOS & Fedora
- Remove OpenSSL tests, as this is out of scope of the core cookbook currently

## 12.2.24 - *2024-01-31*

## 12.2.23 - *2023-10-26*
Expand Down Expand Up @@ -394,18 +407,6 @@ Standardise files with files in sous-chefs/repo-management

- `foodcritic` warning for not defining `name_property`.

## [v5.0.2] (2017-11-29)

### Fixed

- Typo in listen section, makes previously unprintable expressions, printable in http-request, http-response and `default_backend`.

## [v5.0.1] (2017-08-10)

### Removed

- useless blank space in generated config file haproxy.cfg

## [v5.0.0] (2017-08-07)

### Added
Expand Down Expand Up @@ -635,7 +636,7 @@ Standardise files with files in sous-chefs/repo-management
- New haproxy_config resource
- Guardfile
- Testing in Travis CI with a Rakefile that runs cookstyle, foodcritic, and ChefSpec as well as a Kitchen Dokken config that does integration testing of the package install
- New node['haproxy']['pool_members'] and node['haproxy']['pool_members_option'] attributes
- New `node['haproxy']['pool_members']` and `node['haproxy']['pool_members_option']` attributes

### Changed

Expand Down Expand Up @@ -684,11 +685,11 @@ Standardise files with files in sous-chefs/repo-management

### Added

- [COOK-3135](https://tickets.chef.io/browse/COOK-3135) - Allow setting of members with default recipe without changing the template.
- Allow setting of members with default recipe without changing the template.

### Fixed

- [COOK-3424](https://tickets.chef.io/browse/COOK-3424) - Haproxy cookbook attempts to alter an immutable attribute.
- Haproxy cookbook attempts to alter an immutable attribute.

## v1.6.0

Expand All @@ -700,18 +701,18 @@ Standardise files with files in sous-chefs/repo-management

### Added

- [COOK-3660](https://tickets.chef.io/browse/COOK-3660) - Make haproxy socket default user group configurable
- [COOK-3537](https://tickets.chef.io/browse/COOK-3537) - Add OpenSSL and zlib source configurations
- [COOK-2384](https://tickets.chef.io/browse/COOK-2384) - Add LWRP for multiple haproxy sites/configs
- Make haproxy socket default user group configurable
- Add OpenSSL and zlib source configurations
- Add LWRP for multiple haproxy sites/configs

## v1.4.0

### Added

- [COOK-3237](https://tickets.chef.io/browse/COOK-3237) - Enable cookie-based persistence in a backend
- [COOK-3216](https://tickets.chef.io/browse/COOK-3216) - Metadata attributes
- [COOK-3211](https://tickets.chef.io/browse/COOK-3211) - Support RHEL
- [COOK-3133](https://tickets.chef.io/browse/COOK-3133) - Allow configuration of a global stats socket
- Enable cookie-based persistence in a backend
- Metadata attributes
- Support RHEL
- Allow configuration of a global stats socket

## v1.3.2

Expand Down Expand Up @@ -814,8 +815,6 @@ Standardise files with files in sous-chefs/repo-management
[v4.6.0]: https://github.com/sous-chefs/haproxy/compare/v4.5.0...v4.6.0
[v4.6.1]: https://github.com/sous-chefs/haproxy/compare/v4.6.0...v4.6.1
[v5.0.0]: https://github.com/sous-chefs/haproxy/compare/v4.6.1...v5.0.0
[v5.0.1]: https://github.com/sous-chefs/haproxy/compare/v5.0.0...v5.0.1
[v5.0.2]: https://github.com/sous-chefs/haproxy/compare/v5.0.1...v5.0.2
[v5.0.3]: https://github.com/sous-chefs/haproxy/compare/v5.0.2...v5.0.3
[v5.0.4]: https://github.com/sous-chefs/haproxy/compare/v5.0.3...v5.0.4
[v6.0.0]: https://github.com/sous-chefs/haproxy/compare/v5.0.4...v6.0.0
Expand Down
2 changes: 1 addition & 1 deletion Dangerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if !git.modified_files.include?('CHANGELOG.md') && code_changes?
end

# Require Major Minor Patch version labels
unless github.pr_labels.grep /minor|major|patch/i
unless github.pr_labels.grep(/minor|major|patch/i)
warn 'Please add a release label to this pull request'
end

Expand Down
10 changes: 5 additions & 5 deletions Guardfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
require 'cookstyle'
require "cookstyle"

guard :rubocop, keep_failed: false, cli: '-r finstyle' do
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
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'
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
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|
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PRs are welcome to add support for additional platforms.

### Examples

Please check for working examples in [TEST](./test/fixtures/cookbooks/test/)
Please check for working examples in [the test cookbook](test/cookbooks/test).

## Common Resource Features

Expand Down Expand Up @@ -100,7 +100,6 @@ The `haproxy.cfg` file has a few specific rule orderings that will generate vali
tcp-request session
tcp-request content
monitor fail
block (deprecated)
http-request
reqxxx (any req excluding reqadd, e.g. reqdeny, reqallow)
reqadd
Expand Down
16 changes: 7 additions & 9 deletions documentation/haproxy_acl.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

---

# haproxy_acl

[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

Access Control Lists creates a new ACL `<aclname>` or completes an existing one with new tests.

The actions generally consist in blocking a request, selecting a backend, or adding a header.
Expand All @@ -17,11 +15,11 @@ Introduced: v4.2.0

## Properties

| Name | Type | Default | Description | Allowed Values |
| -------------- | ------------- | -------------------------- | ------------------------------------------------------------ | ------------------------------- |
| `acl` | String, Array | None | The access control list items | Allowed HAProxy acl values |
| `section` | String | None | The section where the acl(s) should be applied | `frontend`, `listen`, `backend` |
| `section_name` | String | None | The name of the specific frontend, listen or backend section |
| Name | Type | Default | Description | Allowed Values |
|----------------|---------------|---------|--------------------------------------------------------------|---------------------------------|
| `acl` | String, Array | None | The access control list items | Allowed HAProxy acl values |
| `section` | String | None | The section where the acl(s) should be applied | `frontend`, `listen`, `backend` |
| `section_name` | String | None | The name of the specific frontend, listen or backend section | |

## Examples

Expand Down
18 changes: 7 additions & 11 deletions documentation/haproxy_backend.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

---

# haproxy_backend

[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

Backend describes a set of servers to which the proxy will connect to forward incoming connections.

Introduced: v4.0.0
Expand All @@ -21,15 +19,13 @@ This resource also uses the following partial resources:
* [_extra_options](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_extra_options.md)

| Name | Type | Default | Description | Allowed Values |
| --------------- | ------------- | ------- | ------------------------------------------------------------------ | -------------------------- |
|-----------------|---------------|---------|--------------------------------------------------------------------|----------------------------|
| `mode` | String | None | Set the running mode or protocol of the instance | `http`, `tcp` |
| `server` | String, Array | None | Servers the backend routes to |
| `tcp_request` | String, Array | None | HAProxy `tcp-request` settings |
| `reqrep` | String, Array | None | Replace a regular expression with a string in an HTTP request line |
| `reqirep` | String, Array | None | `reqrep` ignoring case |
| `server` | String, Array | None | Servers the backend routes to | |
| `tcp_request` | String, Array | None | HAProxy `tcp-request` settings | |
| `acl` | Array | None | Access control list items | Allowed HAProxy acl values |
| `option` | Array | None | Array of HAProxy `option` directives |
| `extra_options` | Hash | None | Used for setting any HAProxy directives |
| `option` | Array | None | Array of HAProxy `option` directives | |
| `extra_options` | Hash | None | Used for setting any HAProxy directives | |
| `hash_type` | String | None | Specify a method to use for mapping hashes to servers | `consistent`, `map-based` |

## Examples
Expand Down
16 changes: 7 additions & 9 deletions documentation/haproxy_cache.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

---

# haproxy_cache

[Back To Resource List](https://github.com/sous-chefs/haproxy#resources)

Cache describes a shared cache for small objects such as CSS, JS and icon files. Useful for web application acceleration. Available in HAProxy version 1.8 and later, and `max_object_size` in 1.9 and later.

Introduced: v6.3.0
Expand All @@ -20,11 +18,11 @@ This resource also uses the following partial resources:
* [_config_file](https://github.com/sous-chefs/haproxy/tree/master/documentation/partial_config_file.md)

| Name | Type | Default | Description | Allowed Values |
| ----------------- | ------- | ------------- | --------------------------------------------------- | -------------- |
| `cache_name` | String | name_property | Name of the cache |
| `total_max_size` | Integer | None | Define the size in RAM of the cache in megabytes |
| `max_object_size` | Integer | None | Define the maximum size of the objects to be cached |
| `max_age` | Integer | None | Define the maximum expiration duration in seconds |
|-------------------|---------|---------------|-----------------------------------------------------|----------------|
| `cache_name` | String | name_property | Name of the cache | |
| `total_max_size` | Integer | None | Define the size in RAM of the cache in megabytes | |
| `max_object_size` | Integer | None | Define the maximum size of the objects to be cached | |
| `max_age` | Integer | None | Define the maximum expiration duration in seconds | |

## Examples

Expand Down
Loading
Loading