-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from yakirgb/firewall
Add firewall manifest
- Loading branch information
Showing
6 changed files
with
64 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# Class scylla::firewalld | ||
# | ||
# Uses crayfishx/puppet-firewalld module to open scylla listen port | ||
# | ||
class scylla::firewalld { | ||
|
||
if $::scylla::manage_firewall { | ||
firewalld::custom_service{'scylla': | ||
short => 'scylla', | ||
port => [ | ||
{ | ||
'port' => $::scylla::native_transport_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::rpc_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::api_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::jmx_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::prometheus_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::storage_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::ssl_storage_port, | ||
'protocol' => 'tcp', | ||
}, | ||
{ | ||
'port' => $::scylla::node_exporter_port, | ||
'protocol' => 'tcp', | ||
}, | ||
] | ||
} | ||
|
||
-> firewalld_service{ 'Allow scylla access from the internal zone': | ||
ensure => 'present', | ||
service => 'scylla', | ||
zone => 'internal' | ||
} | ||
} | ||
} |
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 |
---|---|---|
|
@@ -49,4 +49,7 @@ | |
# node_exporter | ||
$node_exporter_port = 9100 | ||
|
||
# Manage firewall | ||
$manage_firewall = true | ||
|
||
} |
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