-
Notifications
You must be signed in to change notification settings - Fork 5
/
metadata.rb
178 lines (159 loc) · 6.9 KB
/
metadata.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
# frozen_string_literal: true
name 'rs-haproxy'
maintainer 'RightScale, Inc.'
maintainer_email '[email protected]'
license 'Apache-2.0'
description 'Application cookbook to set up HAProxy on a RightScale environment'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.1.6'
issues_url 'https://github.com/rightscale-cookbooks/rs-haproxy/issues'
source_url 'https://github.com/rightscale-cookbooks/rs-haproxy'
chef_version '>= 12.0' if respond_to?(:chef_version)
supports 'ubuntu'
supports 'centos'
depends 'haproxy', '= 3.0.4'
depends 'collectd'
depends 'rightscale_tag'
depends 'machine_tag', '~> 2.0.4'
depends 'rs-base'
depends 'rsc_remote_recipe'
depends 'sysctl'
depends 'limits'
recipe 'rs-haproxy::default', 'Installs HAProxy and sets up monitoring for the HAProxy process.'
recipe 'rs-haproxy::tags', 'Adds load balancer related machine tags to the load balancer server.'
recipe 'rs-haproxy::collectd', 'Configures monitoring by setting up collectd plugin for HAProxy.'
recipe 'rs-haproxy::frontend', 'Queries for application servers in the deployment and adds them' \
' to the corresponding backend pools served by the load balancer.'
recipe 'rs-haproxy::schedule', 'Configure cron to periodically run rs-haproxy::frontend.'
recipe 'rs-haproxy::hatop', 'installs hatop on the server'
recipe 'rs-haproxy::tuning', 'tunes sysctl and limits'
attribute 'rs-haproxy/pools',
display_name: 'Load Balance Pools',
description: 'List of application pools for which the load balancer' \
' will create backend pools to answer website requests. The order of the' \
' items in the list will be preserved when answering to requests.' \
' Last entry will be considered as the default backend and will answer for all' \
' requests. Application servers can provide any number of URIs or FQDNs (virtual host paths)' \
' to join corresponding server pool backends. The pool names can have only' \
' alphanumeric characters and underscores. Example: mysite, _api, default123',
type: 'array',
required: 'recommended',
default: ['default'],
recipes: [
'rs-haproxy::default',
'rs-haproxy::tags',
'rs-haproxy::frontend',
]
attribute 'rs-haproxy/incoming_port',
display_name: 'HAProxy HTTP Listen Port',
description: 'The port on which HAProxy listens for HTTP requests.',
required: 'optional',
recipes: [
'rs-haproxy::default',
'rs-haproxy::frontend',
]
attribute 'rs-haproxy/ssl_cert',
display_name: 'HAProxy SSL Certificate',
description: 'PEM formatted string containing SSL certificates and keys for SSL encryption.' \
' Unset this to configure HAProxy without SSL encryption.',
required: 'optional',
recipes: [
'rs-haproxy::default',
'rs-haproxy::frontend',
]
attribute 'rs-haproxy/ssl_incoming_port',
display_name: 'HAProxy HTTPS Listen Port',
description: 'The port on which HAProxy listens for HTTPS requests',
required: 'optional',
recipes: [
'rs-haproxy::default',
'rs-haproxy::frontend',
]
attribute 'rs-haproxy/stats_uri',
display_name: 'Statistics URI',
description: 'The URI for the load balancer statistics report page.' \
' This page lists the current session, queued session, response error,' \
' health check error, server status, etc. for each load balancer group.' \
' Example: /haproxy-status',
required: 'optional',
default: '/haproxy-status',
recipes: ['rs-haproxy::default']
attribute 'rs-haproxy/stats_user',
display_name: 'Statistics Page Username',
description: 'The username that is required to access the load balancer' \
' statistics report page. Example: cred:STATS_USER',
required: 'optional',
recipes: ['rs-haproxy::default']
attribute 'rs-haproxy/stats_password',
display_name: 'Statistics Page Password',
description: 'The password that is required to access the load balancer statistics' \
' report page. Example: cred:STATS_PASSWORD',
required: 'optional',
recipes: ['rs-haproxy::default']
attribute 'rs-haproxy/session_stickiness',
display_name: 'Use Session Stickiness',
description: "Determines session stickiness. Set to 'true' to use session stickiness," \
' where the load balancer will reconnect a session to the last server it' \
" was connected to (via a cookie). Set to 'false' if you do not want to" \
' use sticky sessions; the load balancer will establish a connection' \
' with the next available server. Example: true',
required: 'optional',
choice: %w(true false),
default: 'true',
recipes: [
'rs-haproxy::default',
'rs-haproxy::frontend',
]
attribute 'rs-haproxy/health_check_uri',
display_name: 'Health Check URI',
description: 'The URI that the load balancer will use to check the health of a server.' \
' It is only used for HTTP (not HTTPS) requests. Example: /',
required: 'optional',
default: '/',
recipes: ['rs-haproxy::default']
attribute 'rs-haproxy/balance_algorithm',
display_name: 'Load Balancing Algorithm',
description: 'The algorithm that the load balancer will use to direct traffic.' \
' Example: roundrobin',
required: 'optional',
default: 'roundrobin',
choice: %w(roundrobin leastconn source),
recipes: ['rs-haproxy::default']
attribute 'rs-haproxy/schedule/enable',
display_name: 'Periodic Queries of Application Server',
description: 'Enable or disable periodic queries of application servers in the deployment.',
required: 'optional',
choice: %w(true false),
default: 'true',
recipes: ['rs-haproxy::schedule']
attribute 'rs-haproxy/schedule/interval',
display_name: 'Interval for Periodic Queries',
description: 'Interval in minutes to run periodic queries of application servers in the deployment.' \
' Example: 15',
required: 'optional',
default: '15',
recipes: ['rs-haproxy::schedule']
attribute 'rs-haproxy/backend/fall',
display_name: 'backend fall',
description: 'The "fall" parameter states that a server will be considered as dead after
<count> consecutive unsuccessful health checks. This value defaults to 3 if
unspecified. See also the "check", "inter" and "rise" parameters.',
required: 'optional',
default: '2'
attribute 'rs-haproxy/backend/rise',
display_name: 'backend rise',
description: 'The "rise" parameter states that a server will be considered as operational
after <count> consecutive successful health checks. This value defaults to 2',
required: 'optional',
default: '3'
attribute 'rs-haproxy/backend/inter',
display_name: 'backend inter',
description: 'The "inter" parameter sets the interval between two consecutive health checks
to <delay> milliseconds. If left unspecified, the delay defaults to 2000 ms.',
required: 'optional',
default: '300'
attribute 'rs-haproxy/maxconn',
display_name: 'max connections for haproxy',
description: 'max connections for haproxy',
required: 'optional',
default: '4096'