Version information
This version is compatible with:
- Puppet Enterprise 2019.8.x, 2019.7.x, 2019.5.x, 2019.4.x, 2019.3.x, 2019.2.x, 2019.1.x, 2019.0.x, 2018.1.x
- Puppet >= 5.5.8 < 7.0.0
- , , ,
Start using this module
Add this module to your Puppetfile:
mod 'puppet-keepalived', '2.2.0'
Learn more about managing modules with a PuppetfileDocumentation
keepalived
Table of Contents
- Description
- Usage - Configuration options and additional functionality
- Limitations - OS compatibility, etc.
- Development - Guide for contributing to the module
Description
This puppet module manages keepalived. The main goal of keepalived is to provide simple and robust facilities for loadbalancing and high-availability to Linux system and Linux based infrastructures.
Usage
Basic IP-based VRRP failover
This configuration will fail-over when:
a. Master node is unavailable
node /node01/ {
include keepalived
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'MASTER',
virtual_router_id => '50',
priority => '101',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => [ '10.0.0.1/29' ],
track_interface => ['eth1','tun0'], # optional, monitor these interfaces.
}
}
node /node02/ {
include keepalived
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'BACKUP',
virtual_router_id => '50',
priority => '100',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => [ '10.0.0.1/29' ],
track_interface => ['eth1','tun0'], # optional, monitor these interfaces.
}
}
or hiera:
---
keepalived::vrrp_instance:
VI_50:
interface: 'eth1'
state: 'MASTER'
virtual_router_id: '50'
priority: '101'
auth_type: 'PASS'
auth_pass: 'secret'
virtual_ipaddress: '10.0.0.1/29'
track_interface:
- 'eth1'
- 'tun0'
Add floating routes
node /node01/ {
include keepalived
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'MASTER',
virtual_router_id => '50',
priority => '101',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => [ '10.0.0.1/29' ],
virtual_routes => [ { to => '168.168.2.0/24', via => '10.0.0.2' },
{ to => '168.168.3.0/24', via => '10.0.0.3' } ]
}
}
hiera:
---
keepalived::vrrp_instance:
VI_50:
interface: 'eth1'
state: 'MASTER'
virtual_router_id: '50'
priority: '101'
auth_type: 'PASS'
auth_pass: 'secret'
virtual_ipaddress: '10.0.0.1/29'
virtual_routes:
- to: '168.168.2.0/24'
via: '10.0.0.2'
- to: 168.168.3.0/24'
via: '10.0.0.3'
Detect application level failure
This configuration will fail-over when:
a. NGinX daemon is not running b. Master node is unavailable
node /node01/ {
include ::keepalived
keepalived::vrrp::script { 'check_nginx':
script => '/usr/bin/killall -0 nginx',
}
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'MASTER',
virtual_router_id => '50',
priority => '101',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => '10.0.0.1/29',
track_script => 'check_nginx',
}
}
node /node02/ {
include ::keepalived
keepalived::vrrp::script { 'check_nginx':
script => '/usr/bin/killall -0 nginx',
}
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'BACKUP',
virtual_router_id => '50',
priority => '100',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => '10.0.0.1/29',
track_script => 'check_nginx',
}
}
or hiera:
---
keepalived::vrrp_script:
check_nginx:
script: '/usr/bin/killall -0 nginx'
keepalived::vrrp_instance:
VI_50:
interface: 'eth1'
state: 'MASTER'
virtual_router_id: '50'
priority: '101'
auth_type: 'PASS'
auth_pass: 'secret'
virtual_ipaddress: '10.0.0.1/29'
track_script: check_nginx
or using process tracking (keepalived 2.0.11+):
node /node01/ {
include ::keepalived
keepalived::vrrp::track_process { 'check_nginx':
proc_name => 'nginx',
weight => 10,
quorum => 2,
delay => 10,
}
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'MASTER',
virtual_router_id => '50',
priority => '101',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => '10.0.0.1/29',
track_process => 'check_nginx',
}
}
IPv4 and IPv6 virtual IP, with application level failure detection
This configuration will fail-over both the IPv4 address and the IPv6 address when:
a. NGINX daemon is not running b. Master node is unavailable
It is not possible to configure both IPv4 and IPv6 addresses as virtual_ipaddresses in a single vrrp_instance; the reason is that the VRRP protocol doesn't support it. The two VRRP instances can both use the same virtual_router_id since VRRP IPv4 and IPv6 instances are completely independent of each other. Both nodes have state set to BACKUP, which will prevent them from entering MASTER state until the check script(s) have succeeded and the election has been held.
To ensure that the IPv4 and IPv6 vrrp_instances are always in the same state as each other, configure a vrrp_sync_group to include both the instances. The vrrp_sync_group require the global_tracking flag to be enabled to prevent keepalived from ignoring the tracking scripts for the vrrp_sync_group's vrrp_instance members.
Configure the vrrp_instance with the native_ipv6 flag to force the instance to use IPv6. An IPv6 vrrp_instance without the "native_ipv6" keyword does not configure the virtual IPv6 address with the "deprecated nodad" options.
RFC 3484, "Default Address Selection for Internet Protocol version 6 (IPv6)": Configure a /128 mask for the IPv6 address for keepliaved to set preferred_lft to 0 to avoid the VI to be used for outgoing connections.
RFC5798 section 5.2.9 requires that if the protocol is IPv6, then the first address must be the link local address of the virtual router.
IPv6 VRRP uses VRRP version 3, which does not support authentication, so the auth_type and auth_pass parameters are removed for the IPv6 VRRP instance.
node /node0x/ {
keepalived::vrrp::script { 'check_nginx':
script => '/usr/bin/pkill -0 nginx',
}
keepalived::vrrp::sync_group { 'VI_50':
group => [ 'VI_50_IPV4', 'VI_50_IPV6' ],
global_tracking => true,
}
keepalived::vrrp::instance { 'VI_50_IPV4':
interface => 'eth0',
state => 'BACKUP',
virtual_router_id => 50,
priority => 100,
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => '10.0.0.1/32',
track_script => 'check_nginx',
}
keepalived::vrrp::instance { 'VI_50_IPV6':
interface => 'eth0',
state => 'BACKUP',
virtual_router_id => 50,
priority => 100,
virtual_ipaddress => ['fe80::50/128', '2001:db8::50/128', ],
track_script => 'check_nginx',
native_ipv6 => true,
}
}
Global definitions
class { 'keepalived::global_defs':
notification_email => 'no@spam.tld',
notification_email_from => 'no@spam.tld',
smtp_server => 'localhost',
smtp_connect_timeout => '60',
router_id => 'your_router_instance_id',
}
Soft-restart the Keepalived daemon
class { '::keepalived':
service_restart => 'service keepalived reload', # When using SysV Init
# service_restart => 'systemctl reload keepalived', # When using SystemD
}
Opt out of having the service managed by the module
class { '::keepalived':
service_manage => false,
}
Unicast instead of Multicast
caution: unicast support has only been added to Keepalived since version 1.2.8
By default Keepalived will use multicast packets to determine failover conditions. However, in many cloud environments it is not possible to use multicast because of network restrictions. Keepalived can be configured to use unicast in such environments:
keepalived::vrrp::instance { 'VI_50':
interface => 'eth1',
state => 'BACKUP',
virtual_router_id => '50',
priority => '100',
auth_type => 'PASS',
auth_pass => 'secret',
virtual_ipaddress => '10.0.0.1/29',
track_script => 'check_nginx',
unicast_source_ip => $::ipaddress_eth1,
unicast_peers => ['10.0.0.1', '10.0.0.2']
}
The 'unicast_source_ip' parameter is optional as Keepalived will bind to the specified interface by default. The 'unicast_peers' parameter contains an array of ip addresses that correspond to the failover nodes.
Creating ip-based virtual server instances with two real servers
This sets up a virtual server www.example.com that directs traffic to example1.example.com and example2.example.com by matching on an IP address and port.
keepalived::lvs::virtual_server { 'www.example.com':
ip_address => '1.2.3.4',
port => '80',
delay_loop => '7',
lb_algo => 'wlc',
lb_kind => 'DR',
persistence_timeout => 86400,
virtualhost => 'www.example.com',
protocol => 'TCP'
}
keepalived::lvs::real_server { 'example1.example.com':
virtual_server => 'www.example.com',
ip_address => '1.2.3.8',
port => '80',
options => {
weight => '1000',
'TCP_CHECK' => {
connection_timeout => '3',
}
}
}
keepalived::lvs::real_server { 'example2.example.com':
virtual_server => 'www.example.com',
ip_address => '1.2.3.9',
port => '80',
options => {
weight => '1000',
'TCP_CHECK' => {
connection_timeout => '3',
}
}
}
or hiera:
---
keepalived::lvs_virtual_server:
www.example.com:
ip_address: '1.2.3.4'
port: 80
delay_loop: 7
lb_algo: 'wlc'
lb_kind: 'DR'
persistence_timeout: 86400
virtualhost: 'www.example.com'
protocol: 'TCP'
keepalived::lvs_real_server:
example1.example.com:
virtual_server: 'www.example.com'
ip_address: '1.2.3.8'
port: 80
options:
weight: '1000'
TCP_CHECK:
connect_timeout: 3
example2.example.com:
virtual_server: 'www.example.com'
ip_address: '1.2.3.9'
port: 80
options:
weight: '1000'
TCP_CHECK:
connect_timeout: 3
Creating firewall mark based virtual server instances with two real servers
This sets up a virtual server www.example.com that directs traffic to example1.example.com and example2.example.com by matching on a firewall mark set in iptables or something similar.
keepalived::lvs::virtual_server { 'www.example.com':
fwmark => '123',
delay_loop => '7',
lb_algo => 'wlc',
lb_kind => 'DR',
persistence_timeout => 86400,
virtualhost => 'www.example.com',
protocol => 'TCP'
}
keepalived::lvs::real_server { 'example1.example.com':
virtual_server => 'www.example.com',
ip_address => '1.2.3.8',
port => '80',
options => {
weight => '1000',
'TCP_CHECK' => {
connection_timeout => '3',
}
}
}
keepalived::lvs::real_server { 'example2.example.com':
virtual_server => 'www.example.com',
ip_address => '1.2.3.9',
port => '80',
options => {
weight => '1000',
'TCP_CHECK' => {
connection_timeout => '3',
}
}
}
Reference
Reference documentation coming soon.
Limitations
Details in metadata.json
.
Development
The contributing guide is in CONTRIBUTING.md.
Release Notes/Contributors/Etc.
Details in CHANGELOG.md
.
Migrated from https://github.com/arioch/puppet-keepalived to Vox Pupuli.
Changelog
All notable changes to this project will be documented in this file. Each new release typically also includes the latest modulesync defaults. These should not affect the functionality of the module.
v2.2.0 (2019-10-22)
Implemented enhancements:
- Add support for sh-port and sh-fallback flags to lvs virtual servers #198 (hkbakke)
- Add notify_script_master_rx_lower_pri option to the module #195 (salindaliyanage)
- Support for higher_prio_send_advert and garp_lower_prio_repeat #194 (foosinn)
- LVS hiera support #190 (7matd7)
Fixed bugs:
Closed issues:
- Not able to set sh-port and sh-fallback flags in virtual_server #192
- Add Ubuntu to Metadata #175
- Hiera lookups and this module #116
Merged pull requests:
- Add Ubuntu 16.04 and 18.04 to list of supported OSes #188 (alexjfisher)
- Add CentOS 7 to list of supported OSes #187 (alexjfisher)
v2.1.0 (2019-06-09)
Implemented enhancements:
- Please add support for "native_ipv6" vrrp_instance statement #183
- add support for native_ipv6 in vrrp instances #184 (sigbjorntux)
- feat: add quorum_up and quorum_down in virtual_server #174 (rotulet)
- add keepalived vrrp track_process support w/tests #172 (jontow)
Fixed bugs:
- Problem with keepalived::vrrp::track_process fullcommand #179
- Allow puppetlabs/concat 6.x, puppetlabs/stdlib 6.x #182 (dhoppe)
- Change the fullcommand parameter to full_command for keepalived::vrrp::track_process #180 (fduranti)
Closed issues:
- Fix wrong warning #141
Merged pull requests:
- remove leading colons from variables #176 (Dan33l)
- use rspec-puppet-facts #173 (Dan33l)
- Support for metric argument in vrrp_instancevirtual_routes #128 (KrzysztofHajdamowicz)
v2.0.0 (2019-03-18)
This is the first release since the module was migrated to the Vox Pupuli puppet
namespace.
Breaking changes:
- Use data types instead of validate functions #163 (alexjfisher)
- Drop support for Puppet 3, Puppet 4 and Debian 7 #162 (alexjfisher)
Closed issues:
- Review acceptance tests #156
- Target Concat_file with path or title '/keepalived.conf' or tag '_keepalived.conf not found in the catalog #143
- forge version 1.2.5 is outdated #131
- Concat issue #106
- Replace validate functions with data types #159
- No changelog available #148
Merged pull requests:
- * Allow user and group in vrrp::script #149 (SpoonOne)
- Add badges #166 (alexjfisher)
- Replace
create\_resources
with iteration #165 (alexjfisher) - Fix Github License detection #164 (alexjfisher)
- Allow latest concat/stdlib and bump minimum versions #160 (alexjfisher)
- Enable beaker tests and drop Debian 6 support #157 (Dan33l)
- some README cleanup #155 (Dan33l)
- Rubocop Fixes #154 (alexjfisher)
- clean up of metadata.json #152 (Dan33l)
1.3.0 (2018-09-06)
Closed issues:
- VIP for sandby ip ? #135
- Add "script_user" and "enable_script_security" options in global_defs class #130
- keepalived::vrrp::instance priority should support the value 255. #107
Merged pull requests:
- Fix 130 #134 (duritong)
- Avoid newline (and with this a refresh of service) for existing configs #115 (robertvargason)
1.2.5 (2016-09-23)
Closed issues:
- $ensure parameter to concat::fragment is deprecated #112
- Configuration option to use VMAC feature #108
- New release? #96
- misplaced curly brace #75
Merged pull requests:
- Support testing on Rubies \< 2.0.0 #113 (Phil-Friderici)
- Made virtual_ipaddress optional #101 (iwalz)
- simple ordering fix for #75 #97 (gattebury)
1.2.4 (2016-02-22)
Closed issues:
- Cannot add 2 ip's, each on different interfaces #84
- Comparison of: String \< Integer, is not possible #79
Merged pull requests:
- Extend hiera support #94 (mrdrup)
- Added mcast_src_ip option #93 (jkroepke)
- Keepalived should be restarted on Concat changes, not File #92 (ernetas)
- future parser: removed Class[ 'keepalived' ] #90 (hggh)
- Remove duplicate class parameter #89 (SanderKnape)
- Add instruction for hiera usage #87 (occelebi)
- Add hiera support #86 (occelebi)
1.2.3 (2015-11-06)
1.2.2 (2015-11-06)
Merged pull requests:
- Type cast strings to integers for puppet 4 #82 (danieldreier)
1.2.1 (2015-08-04)
Closed issues:
- order parameter contains invalid characters #70
Merged pull requests:
1.2.0 (2015-06-08)
Fixed bugs:
- keepalived_version fact not working #61
Closed issues:
- "Symlinks in modules are unsupported" failure installing 1.1.1 on puppet forge #64
Merged pull requests:
- Support broad range of puppet versions and fix tests #71 (duritong)
- Ignore .project files. #69 (arioch)
- instance scripts syntax fixed #68 (leftys)
1.1.1 (2015-02-01)
1.1.0 (2015-01-19)
1.0.4 (2015-01-05)
Closed issues:
1.0.3 (2014-12-03)
1.0.2 (2014-11-21)
Implemented enhancements:
- Reload keepalived on refresh instead of restart #52
1.0.1 (2014-10-28)
1.0.0 (2014-10-05)
0.1.2 (2014-09-25)
Closed issues:
- Error: Could not find dependent Exec[concat_/etc/keepalived/keepalived.conf] #46
0.1.1 (2014-08-15)
0.1.0 (2014-07-30)
Closed issues:
- global_def #43
0.0.16 (2014-07-08)
0.0.15 (2014-07-08)
Fixed bugs:
- keepalived::lvs::real_server options fails when using capital letters #38
Closed issues:
- Global_defs.pp depends on a not found Exec #40
0.0.14 (2014-06-16)
0.0.13 (2014-05-28)
0.0.12 (2014-05-22)
Closed issues:
0.0.11 (2014-05-08)
0.0.10 (2014-03-13)
0.0.9 (2014-03-12)
0.0.8 (2014-02-26)
0.0.7 (2014-02-18)
Closed issues:
- VirtualIP address not being overwritten on change #17
0.0.6 (2014-02-10)
0.0.5 (2013-12-09)
0.0.4 (2013-11-22)
0.0.3 (2013-10-25)
Merged pull requests:
0.0.1 (2013-07-25)
0.0.2 (2013-07-25)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/concat (>= 4.1.0 < 7.0.0)
- puppetlabs/stdlib (>= 4.25.1 < 7.0.0)
Copyright (C) 2012 Tom De Vylder Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright [yyyy] [name of copyright owner] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.