-
-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
557 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
guard 'rake', :task => 'lint' do | ||
watch(/(.*).pp$/) | ||
end | ||
|
||
guard 'rake', :task => 'syntax' do | ||
watch(/(.*).pp$/) | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ | |
|
||
## Tested on... | ||
|
||
* Debian 7 (Wheezy) | ||
* Debian 6 (Squeeze) | ||
* RHEL 6 | ||
|
||
|
@@ -32,7 +33,7 @@ node /node01/ { | |
priority => '101', | ||
auth_type => 'PASS', | ||
auth_pass => 'secret', | ||
virtual_ipaddress => '10.0.0.1/29', | ||
virtual_ipaddress => [ '10.0.0.1/29' ], | ||
track_interface => ['eth1','tun0'], # optional, monitor these interfaces. | ||
} | ||
} | ||
|
@@ -47,12 +48,32 @@ node /node02/ { | |
priority => '100', | ||
auth_type => 'PASS', | ||
auth_pass => 'secret', | ||
virtual_ipaddress => '10.0.0.1/29', | ||
virtual_ipaddress => [ '10.0.0.1/29' ], | ||
track_interface => ['eth1','tun0'], # optional, monitor these interfaces. | ||
} | ||
} | ||
``` | ||
|
||
### Add floating routes | ||
|
||
```puppet | ||
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' } ] | ||
} | ||
} | ||
``` | ||
|
||
### Detect application level failure | ||
|
||
This configuration will fail-over when: | ||
|
@@ -100,15 +121,27 @@ node /node02/ { | |
} | ||
``` | ||
|
||
###I'd like to opt out of having the service controlled; we use another tool for that. | ||
### Global definitions | ||
|
||
```puppet | ||
class { 'keepalived::global_defs': | ||
ensure => present, | ||
notification_email => '[email protected]', | ||
notification_email_from => '[email protected]', | ||
smtp_server => 'localhost', | ||
smtp_connect_timeout => '60', | ||
router_id => 'your_router_instance_id', | ||
} | ||
``` | ||
|
||
### Opt out of having the service managed by the module | ||
|
||
```puppet | ||
class { '::keepalived': | ||
service_manage => false, | ||
} | ||
``` | ||
|
||
|
||
## Unit testing | ||
|
||
Plain RSpec: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.