Compare commits
53 Commits
8685a0b589
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
78b2a3963e | ||
|
|
abac5926d4 | ||
| 6c1b999d4b | |||
|
|
67b1681012 | ||
|
|
8070426dd7 | ||
| 014c663e30 | |||
|
|
958caf7c66 | ||
|
|
fa9138acb9 | ||
| 541e3672b7 | |||
|
|
7cfeb74c91 | ||
|
|
c20f099570 | ||
| ad2428456a | |||
|
|
9dcbd4dc96 | ||
|
|
1173a0f1ea | ||
| 7df6938b04 | |||
|
|
7eca92f312 | ||
|
|
57aa6620ef | ||
| 6fef250c0d | |||
|
|
3ba353aef4 | ||
|
|
cfed955ac1 | ||
| 06dbd0fbd0 | |||
|
|
95feb25654 | ||
|
|
711d817cfb | ||
| a399dde784 | |||
|
|
1467a2d6a3 | ||
|
|
9c72dfbff2 | ||
| cb54dad12a | |||
|
|
a05a469ea0 | ||
| 281ce92cd8 | |||
|
|
aa92f1c5a5 | ||
|
|
b9997604a2 | ||
| 2e46d610cb | |||
| af0ddb9f36 | |||
|
|
aab08293a7 | ||
|
|
2004d2b7e7 | ||
| 5b20bf27ac | |||
| 04e35b6d1d | |||
|
|
2ebe772103 | ||
|
|
f7ac79b193 | ||
| 83422e8563 | |||
|
|
357bfd29e3 | ||
| fa133ffd63 | |||
| 44660e2b9e | |||
|
|
257ab516f3 | ||
|
|
0743e79bfd | ||
| 234c24d5f5 | |||
| f689b7038f | |||
| 8477cdf7f8 | |||
|
|
52f6420fa5 | ||
|
|
e9e68175c8 | ||
|
|
11134b2730 | ||
| 3feb7eb25a | |||
|
|
9017955d1c |
2
.puppet-lint.rc
Normal file
2
.puppet-lint.rc
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
--no-variable_scope-check
|
||||||
|
--no-top_scope_facts
|
||||||
13
.vscode/settings.json
vendored
13
.vscode/settings.json
vendored
@@ -1,13 +0,0 @@
|
|||||||
{
|
|
||||||
"cSpell.words": [
|
|
||||||
"dontlognull",
|
|
||||||
"dport",
|
|
||||||
"httplog",
|
|
||||||
"maxconn",
|
|
||||||
"nologin",
|
|
||||||
"redispatch",
|
|
||||||
"sess",
|
|
||||||
"tcplog",
|
|
||||||
"userlist"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
105
Jenkinsfile
vendored
105
Jenkinsfile
vendored
@@ -1,105 +0,0 @@
|
|||||||
pipeline {
|
|
||||||
agent {
|
|
||||||
label 'puppet'
|
|
||||||
}
|
|
||||||
|
|
||||||
post {
|
|
||||||
always {
|
|
||||||
deleteDir() /* clean up our workspace */
|
|
||||||
}
|
|
||||||
success {
|
|
||||||
updateGitlabCommitStatus state: 'success'
|
|
||||||
}
|
|
||||||
failure {
|
|
||||||
updateGitlabCommitStatus state: 'failed'
|
|
||||||
step([$class: 'Mailer', notifyEveryUnstableBuild: true, recipients: 'support@confdroid.com', sendToIndividuals: true])
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
options {
|
|
||||||
gitLabConnection('gitlab.confdroid.com')
|
|
||||||
}
|
|
||||||
|
|
||||||
stages {
|
|
||||||
|
|
||||||
stage('pull master') {
|
|
||||||
steps {
|
|
||||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
|
||||||
sh '''
|
|
||||||
git config user.name "Jenkins Server"
|
|
||||||
git config user.email jenkins@confdroid.com
|
|
||||||
# Ensure we're on the development branch (triggered by push)
|
|
||||||
git checkout development
|
|
||||||
# Create jenkins branch from development
|
|
||||||
git checkout -b jenkins-build-$BUILD_NUMBER
|
|
||||||
# Optionally merge master into jenkins to ensure compatibility
|
|
||||||
git merge origin/master --no-ff || { echo "Merge conflict detected"; exit 1; }
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('puppet parser') {
|
|
||||||
steps {
|
|
||||||
sh '''for file in $(find . -iname \'*.pp\'); do
|
|
||||||
/opt/puppetlabs/bin/puppet parser validate --color false --render-as s --modulepath=modules $file || exit 1;
|
|
||||||
done;'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('check templates') {
|
|
||||||
steps{
|
|
||||||
sh '''for file in $(find . -iname \'*.erb\');
|
|
||||||
do erb -P -x -T "-" $file | ruby -c || exit 1;
|
|
||||||
done;'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('puppet-lint') {
|
|
||||||
steps {
|
|
||||||
sh '''/usr/local/bin/puppet-lint . \\
|
|
||||||
--no-variable_scope-check \\
|
|
||||||
|| { echo "Puppet lint failed"; exit 1; }
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('SonarScan') {
|
|
||||||
steps {
|
|
||||||
withCredentials([string(credentialsId: 'sonar-token', variable: 'SONAR_TOKEN')]) {
|
|
||||||
sh '''
|
|
||||||
/opt/sonar-scanner/bin/sonar-scanner \
|
|
||||||
-Dsonar.projectKey=haproxy_cd \
|
|
||||||
-Dsonar.sources=. \
|
|
||||||
-Dsonar.host.url=https://sonarqube.confdroid.com \
|
|
||||||
-Dsonar.token=$SONAR_TOKEN
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('create Puppet documentation') {
|
|
||||||
steps {
|
|
||||||
sh '/opt/puppetlabs/bin/puppet strings'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage('update repo') {
|
|
||||||
steps {
|
|
||||||
sshagent(['edd05eb6-26b5-4c7b-a5cc-ea2ab899f4fa']) {
|
|
||||||
sh '''
|
|
||||||
git config user.name "Jenkins Server"
|
|
||||||
git config user.email jenkins@confdroid.com
|
|
||||||
git add -A && git commit -am "Recommit for updates in build $BUILD_NUMBER" || echo "No changes to commit"
|
|
||||||
git push -o merge_request.create \
|
|
||||||
-o merge_request.target=master \
|
|
||||||
-o merge_request.title="Auto-merge for build $BUILD_NUMBER" \
|
|
||||||
-o merge_request.description="Automated changes from Jenkins build $BUILD_NUMBER" \
|
|
||||||
-o merge_request.merge_when_pipeline_succeeds=true \
|
|
||||||
origin jenkins-build-$BUILD_NUMBER
|
|
||||||
'''
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
112
README.md
112
README.md
@@ -1,14 +1,30 @@
|
|||||||
# Readme
|
# Readme
|
||||||
|
|
||||||
[](https://jenkins.confdroid.com/job/haproxy_cd/)|
|
[](https://jenkins.confdroid.com/job/confdroid_haproxy/)
|
||||||
|
[](https://sonarqube.confdroid.com/dashboard?id=confdroid_haproxy)
|
||||||
|
[](https://deepwiki.com/grizzlycoda/puppet_collection)
|
||||||
|
|
||||||
[[_TOC_]]
|
- [Readme](#readme)
|
||||||
|
- [Synopsis](#synopsis)
|
||||||
|
- [WARNING](#warning)
|
||||||
|
- [Features](#features)
|
||||||
|
- [Dependencies](#dependencies)
|
||||||
|
- [Deployment](#deployment)
|
||||||
|
- [Parameters](#parameters)
|
||||||
|
- [Proxy Configuration](#proxy-configuration)
|
||||||
|
- [TLS](#tls)
|
||||||
|
- [SELINUX](#selinux)
|
||||||
|
- [Known Problems](#known-problems)
|
||||||
|
- [Support](#support)
|
||||||
|
- [Tests](#tests)
|
||||||
|
- [Contact Us](#contact-us)
|
||||||
|
- [Disclaimer](#disclaimer)
|
||||||
|
|
||||||
## Synopsis
|
## Synopsis
|
||||||
|
|
||||||
`HA Proxy` is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.
|
`HA Proxy` is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.
|
||||||
|
|
||||||
`haproxy_cd` automates installation and configuration of `HA proxy` including self-healing, monitoring and firewall etc.
|
`confdroid_haproxy` automates installation and configuration of `HA proxy` including self-healing, monitoring and firewall etc.
|
||||||
|
|
||||||
## WARNING
|
## WARNING
|
||||||
|
|
||||||
@@ -18,46 +34,48 @@
|
|||||||
|
|
||||||
INSTALLATION
|
INSTALLATION
|
||||||
|
|
||||||
* install rpm binaries
|
- install rpm binaries
|
||||||
|
|
||||||
CONFIGURATION
|
CONFIGURATION
|
||||||
|
|
||||||
* manage haproxy user
|
- manage haproxy user
|
||||||
* manage directories (file system permissions, selinux context)
|
- manage directories (file system permissions, selinux context)
|
||||||
* manage files (file system permissions, content, selinux context)
|
- manage files (file system permissions, content, selinux context)
|
||||||
* manage proxy instances through a define
|
- manage proxy instances through a define
|
||||||
* front-end options
|
- front-end options
|
||||||
* back-end options
|
- back-end options
|
||||||
* ACL options
|
- ACL options
|
||||||
* manage fail2ban integration (optional, requires fail2ban_cd module)
|
- adds haproxy logs to rsyslog for remote logging where used
|
||||||
|
- manage fail2ban integration (optional, requires `confdroid_fail2ban` module)
|
||||||
|
- manage nagios integration (optional, requires `confdroid-nagios` module)
|
||||||
|
|
||||||
SERVICE
|
SERVICE
|
||||||
|
|
||||||
* manage haproxy service
|
- manage haproxy service
|
||||||
* restart service after changes in the configuration
|
- restart service after changes in the configuration
|
||||||
|
- stats are enabled on port 8404 with uri /haproxy?stats and strict private mode, set `hy_stats_auth` to something meaningful.
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
|
|
||||||
All dependencies must be included in the catalogue.
|
All dependencies must be included in the catalogue.
|
||||||
|
|
||||||
* [cd_resources](https://gitlab.confdroid.com/puppet/cd_resources) for managing yum base repos
|
- [concat](https://github.com/puppetlabs/puppetlabs-concat) for managing file fragments
|
||||||
* [concat](https://github.com/puppetlabs/puppetlabs-concat) for managing file fragments
|
|
||||||
|
|
||||||
## Deployment
|
## Deployment
|
||||||
|
|
||||||
* native Puppet deployment
|
- native Puppet deployment
|
||||||
|
|
||||||
via site.pp or nodes.pp
|
via site.pp or nodes.pp
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
node 'example.example.net' {
|
node 'example.example.net' {
|
||||||
include haproxy_cd
|
include confdroid_haproxy
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
* through Foreman:
|
- through Foreman:
|
||||||
|
|
||||||
In order to apply parameters through Foreman, **__haproxy_cd::params__** must be added to the host or host group in question.
|
In order to apply parameters through Foreman, **confdroid_haproxy::params**- must be added to the host or host group in question.
|
||||||
|
|
||||||
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
See [more details about class deployment on Confdroid.com](https://confdroid.com/2017/05/deploying-our-puppet-modules/).
|
||||||
|
|
||||||
@@ -70,8 +88,10 @@ The parameters are documented via puppet strings and [listed here](/docs/index.h
|
|||||||
The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module.
|
The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module.
|
||||||
In order to create proxy instances, you will need an external class, which addresses the define, like so:
|
In order to create proxy instances, you will need an external class, which addresses the define, like so:
|
||||||
|
|
||||||
|
ACL rule:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
haproxy_cd::server::proxy { 'testing':
|
confdroid_haproxy::server::proxy { 'testing':
|
||||||
haproxy_fqdn => 'node.example.net',
|
haproxy_fqdn => 'node.example.net',
|
||||||
frontend_name => 'test01-frontend',
|
frontend_name => 'test01-frontend',
|
||||||
frontend_mode => 'http',
|
frontend_mode => 'http',
|
||||||
@@ -81,34 +101,62 @@ In order to create proxy instances, you will need an external class, which addre
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
real Proxy for https:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
haproxy_cd::server::proxy { 'https-in':
|
||||||
|
haproxy_fqdn => 'node.example.net',
|
||||||
|
frontend_name => 'https-in',
|
||||||
|
frontend_mode => 'http',
|
||||||
|
fe_bind_mode => '*:443 ssl crt /etc/haproxy/certs/',
|
||||||
|
fe_option => 'forwardfor',
|
||||||
|
fe_http_request => 'add-header X-Forwarded-Proto https',
|
||||||
|
acl_rule_front => 'host_grafana hdr(host) -i grafana.example.net',
|
||||||
|
fe_use_backend => 'grafana_backend if host_grafana',
|
||||||
|
backend_configs => [
|
||||||
|
{
|
||||||
|
'backend_name' => 'grafana_backend',
|
||||||
|
'be_mode' => 'http',
|
||||||
|
'be_balance' => 'roundrobin',
|
||||||
|
'be_server_name_array' => ['node1 10.0.1.1:8080 check'],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
default_backend => 'error_backend',
|
||||||
|
```
|
||||||
|
|
||||||
This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made.
|
This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made.
|
||||||
`haproxy_fqdn` **__must__** contain the fqdn of the haproxy **__server__** where this should be configured, otherwise the templates are not being populated.
|
`haproxy_fqdn` **must**- contain the fqdn of the haproxy **server**- where this should be configured, otherwise the templates are not being populated.
|
||||||
Multiple ACLs need to be added as array, and will create one line each.
|
Multiple ACLs need to be added as array, and will create one line each.
|
||||||
|
|
||||||
|
## TLS
|
||||||
|
|
||||||
|
Haproxy can manage all sorts of proxies including http and https. It also can terminate https requests and send the requests within a private network unencrypted, which is quite common. **This module is NOT managing certificates**, as there are many ways to manage this, including Kubernetes cert-manager, Let's encrypt or other ways.
|
||||||
|
|
||||||
## SELINUX
|
## SELINUX
|
||||||
|
|
||||||
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
|
All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.
|
||||||
|
If selinux is set to `enforce` (not controlled within this module), the parameter `hy_selinux_allow_stats` must also be set to `true`, else the haproxy service will not start as selinux will not allow it. This is the default setting.
|
||||||
|
|
||||||
## Known Problems
|
## Known Problems
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
* OS: Rocky 9
|
- OS: Rocky 9
|
||||||
* Puppet 8
|
- Puppet 8
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
* Puppet Lint
|
- Puppet Lint
|
||||||
* excluded tests:
|
- excluded tests:
|
||||||
* `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
- `--no-variable_scope-check`: not applicable as we are inheriting parameters from params class. the lint check does not distinguish between facts and inherited parameters.
|
||||||
* Puppet Parser
|
- Puppet Parser
|
||||||
* ERB Template Parser
|
- ERB Template Parser
|
||||||
* Sonar Quality Gate
|
- Sonar Quality Gate
|
||||||
|
|
||||||
## Contact Us
|
## Contact Us
|
||||||
|
|
||||||
[contact Us](https://confdroid.com/contact/)
|
- [contact Us](https://confdroid.com/contact/)
|
||||||
[Feedback Portal](https://feedback.confdroid.com/)
|
- [Feedback Portal](https://feedback.confdroid.com/)
|
||||||
|
|
||||||
## Disclaimer
|
## Disclaimer
|
||||||
|
|
||||||
|
|||||||
@@ -64,57 +64,62 @@
|
|||||||
<td valign='top' width="33%">
|
<td valign='top' width="33%">
|
||||||
|
|
||||||
|
|
||||||
<ul id="alpha_H" class="alpha">
|
<ul id="alpha_C" class="alpha">
|
||||||
<li class="letter">H</li>
|
<li class="letter">C</li>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd.html" title="puppet_classes::haproxy_cd (puppet_class)">haproxy_cd</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy.html" title="puppet_classes::confdroid_haproxy (puppet_class)">confdroid_haproxy</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::haproxy_cd::firewall::iptables (puppet_class)">haproxy_cd::firewall::iptables</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_haproxy::firewall::iptables (puppet_class)">confdroid_haproxy::firewall::iptables</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::haproxy_cd::main::config (puppet_class)">haproxy_cd::main::config</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_haproxy::main::config (puppet_class)">confdroid_haproxy::main::config</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Adirs.html" title="puppet_classes::haproxy_cd::main::dirs (puppet_class)">haproxy_cd::main::dirs</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_haproxy::main::dirs (puppet_class)">confdroid_haproxy::main::dirs</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Afiles.html" title="puppet_classes::haproxy_cd::main::files (puppet_class)">haproxy_cd::main::files</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_haproxy::main::files (puppet_class)">confdroid_haproxy::main::files</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::haproxy_cd::main::install (puppet_class)">haproxy_cd::main::install</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_haproxy::main::install (puppet_class)">confdroid_haproxy::main::install</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::haproxy_cd::main::user (puppet_class)">haproxy_cd::main::user</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Auser.html" title="puppet_classes::confdroid_haproxy::main::user (puppet_class)">confdroid_haproxy::main::user</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::haproxy_cd::monitoring::fail2ban (puppet_class)">haproxy_cd::monitoring::fail2ban</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::confdroid_haproxy::monitoring::fail2ban (puppet_class)">confdroid_haproxy::monitoring::fail2ban</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_haproxy::monitoring::target (puppet_class)">confdroid_haproxy::monitoring::target</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::haproxy_cd::server::service (puppet_class)">haproxy_cd::server::service</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_haproxy::server::service (puppet_class)">confdroid_haproxy::server::service</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
@@ -135,12 +140,12 @@
|
|||||||
<td valign='top' width="33%">
|
<td valign='top' width="33%">
|
||||||
|
|
||||||
|
|
||||||
<ul id="alpha_H" class="alpha">
|
<ul id="alpha_C" class="alpha">
|
||||||
<li class="letter">H</li>
|
<li class="letter">C</li>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_defined_types/haproxy_cd_3A_3Aserver_3A_3Aproxy.html" title="puppet_defined_types::haproxy_cd::server::proxy (puppet_defined_type)">haproxy_cd::server::proxy</a></span>
|
<span class='object_link'><a href="puppet_defined_types/confdroid_haproxy_3A_3Aserver_3A_3Aproxy.html" title="puppet_defined_types::confdroid_haproxy::server::proxy (puppet_defined_type)">confdroid_haproxy::server::proxy</a></span>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -60,15 +60,44 @@
|
|||||||
<div id="content"><div id='filecontents'>
|
<div id="content"><div id='filecontents'>
|
||||||
<h1 id="label-Readme">Readme</h1>
|
<h1 id="label-Readme">Readme</h1>
|
||||||
|
|
||||||
<p><a href="https://jenkins.confdroid.com/job/haproxy_cd/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=haproxy_cd"></a>|</p>
|
<p><a href="https://jenkins.confdroid.com/job/confdroid_haproxy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_haproxy&style=plastic"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_haproxy"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_haproxy&metric=security_hotspots&token=sqb_0205ee61c907f77ebdc1c717b8f4ff568c3724cf"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
|
||||||
|
<ul><li>
|
||||||
<p>[[<em>TOC</em>]]</p>
|
<p><a href="#readme">Readme</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#synopsis">Synopsis</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#warning">WARNING</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#features">Features</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#dependencies">Dependencies</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#deployment">Deployment</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#parameters">Parameters</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#proxy-configuration">Proxy Configuration</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#tls">TLS</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#selinux">SELINUX</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#known-problems">Known Problems</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#support">Support</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#tests">Tests</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#contact-us">Contact Us</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#disclaimer">Disclaimer</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Synopsis">Synopsis</h2>
|
<h2 id="label-Synopsis">Synopsis</h2>
|
||||||
|
|
||||||
<p><code>HA Proxy</code> is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.</p>
|
<p><code>HA Proxy</code> is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.</p>
|
||||||
|
|
||||||
<p><code>haproxy_cd</code> automates installation and configuration of <code>HA proxy</code> including self-healing, monitoring and firewall etc.</p>
|
<p><code>confdroid_haproxy</code> automates installation and configuration of <code>HA proxy</code> including self-healing, monitoring and firewall etc.</p>
|
||||||
|
|
||||||
<h2 id="label-WARNING">WARNING</h2>
|
<h2 id="label-WARNING">WARNING</h2>
|
||||||
|
|
||||||
@@ -99,7 +128,11 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p>ACL options</p>
|
<p>ACL options</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manage fail2ban integration (optional, requires fail2ban_cd module)</p>
|
<p>adds haproxy logs to rsyslog for remote logging where used</p>
|
||||||
|
</li><li>
|
||||||
|
<p>manage fail2ban integration (optional, requires <code>confdroid_fail2ban</code> module)</p>
|
||||||
|
</li><li>
|
||||||
|
<p>manage nagios integration (optional, requires <code>confdroid-nagios</code> module)</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<p>SERVICE</p>
|
<p>SERVICE</p>
|
||||||
@@ -107,14 +140,14 @@
|
|||||||
<p>manage haproxy service</p>
|
<p>manage haproxy service</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>restart service after changes in the configuration</p>
|
<p>restart service after changes in the configuration</p>
|
||||||
|
</li><li>
|
||||||
|
<p>stats are enabled on port 8404 with uri /haproxy?stats and strict private mode, set <code>hy_stats_auth</code> to something meaningful.</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Dependencies">Dependencies</h2>
|
<h2 id="label-Dependencies">Dependencies</h2>
|
||||||
|
|
||||||
<p>All dependencies must be included in the catalogue.</p>
|
<p>All dependencies must be included in the catalogue.</p>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p><a href="https://gitlab.confdroid.com/puppet/cd_resources">cd_resources</a> for managing yum base repos</p>
|
|
||||||
</li><li>
|
|
||||||
<p><a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for managing file fragments</p>
|
<p><a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for managing file fragments</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
@@ -126,14 +159,14 @@
|
|||||||
<p>via site.pp or nodes.pp</p>
|
<p>via site.pp or nodes.pp</p>
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">node 'example.example.net' {
|
<pre class="code ruby"><code class="ruby">node 'example.example.net' {
|
||||||
include haproxy_cd
|
include confdroid_haproxy
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>through Foreman:</p>
|
<p>through Foreman:</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<p>In order to apply parameters through Foreman, <strong>haproxy_cd::params</strong> must be added to the host or host group in question.</p>
|
<p>In order to apply parameters through Foreman, <strong>confdroid_haproxy::params</strong>- must be added to the host or host group in question.</p>
|
||||||
|
|
||||||
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
|
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
|
||||||
|
|
||||||
@@ -145,7 +178,9 @@
|
|||||||
|
|
||||||
<p>The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module. In order to create proxy instances, you will need an external class, which addresses the define, like so:</p>
|
<p>The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module. In order to create proxy instances, you will need an external class, which addresses the define, like so:</p>
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">haproxy_cd::server::proxy { 'testing':
|
<p>ACL rule:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby">confdroid_haproxy::server::proxy { 'testing':
|
||||||
haproxy_fqdn => 'node.example.net',
|
haproxy_fqdn => 'node.example.net',
|
||||||
frontend_name => 'test01-frontend',
|
frontend_name => 'test01-frontend',
|
||||||
frontend_mode => 'http',
|
frontend_mode => 'http',
|
||||||
@@ -155,11 +190,37 @@
|
|||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made. <code>haproxy_fqdn</code> <strong>must</strong> contain the fqdn of the haproxy <strong>server</strong> where this should be configured, otherwise the templates are not being populated. Multiple ACLs need to be added as array, and will create one line each.</p>
|
<p>real Proxy for https:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby">haproxy_cd::server::proxy { 'https-in':
|
||||||
|
haproxy_fqdn => 'node.example.net',
|
||||||
|
frontend_name => 'https-in',
|
||||||
|
frontend_mode => 'http',
|
||||||
|
fe_bind_mode => '*:443 ssl crt /etc/haproxy/certs/',
|
||||||
|
fe_option => 'forwardfor',
|
||||||
|
fe_http_request => 'add-header X-Forwarded-Proto https',
|
||||||
|
acl_rule_front => 'host_grafana hdr(host) -i grafana.example.net',
|
||||||
|
fe_use_backend => 'grafana_backend if host_grafana',
|
||||||
|
backend_configs => [
|
||||||
|
{
|
||||||
|
'backend_name' => 'grafana_backend',
|
||||||
|
'be_mode' => 'http',
|
||||||
|
'be_balance' => 'roundrobin',
|
||||||
|
'be_server_name_array' => ['node1 10.0.1.1:8080 check'],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
default_backend => 'error_backend',
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made. <code>haproxy_fqdn</code> <strong>must</strong>- contain the fqdn of the haproxy <strong>server</strong>- where this should be configured, otherwise the templates are not being populated. Multiple ACLs need to be added as array, and will create one line each.</p>
|
||||||
|
|
||||||
|
<h2 id="label-TLS">TLS</h2>
|
||||||
|
|
||||||
|
<p>Haproxy can manage all sorts of proxies including http and https. It also can terminate https requests and send the requests within a private network unencrypted, which is quite common. <strong>This module is NOT managing certificates</strong>, as there are many ways to manage this, including Kubernetes cert-manager, Let’s encrypt or other ways.</p>
|
||||||
|
|
||||||
<h2 id="label-SELINUX">SELINUX</h2>
|
<h2 id="label-SELINUX">SELINUX</h2>
|
||||||
|
|
||||||
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.</p>
|
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. If selinux is set to <code>enforce</code> (not controlled within this module), the parameter <code>hy_selinux_allow_stats</code> must also be set to <code>true</code>, else the haproxy service will not start as selinux will not allow it. This is the default setting.</p>
|
||||||
|
|
||||||
<h2 id="label-Known+Problems">Known Problems</h2>
|
<h2 id="label-Known+Problems">Known Problems</h2>
|
||||||
|
|
||||||
@@ -187,8 +248,11 @@
|
|||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Contact+Us">Contact Us</h2>
|
<h2 id="label-Contact+Us">Contact Us</h2>
|
||||||
|
<ul><li>
|
||||||
<p><a href="https://confdroid.com/contact/">contact Us</a> <a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
|
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Disclaimer">Disclaimer</h2>
|
<h2 id="label-Disclaimer">Disclaimer</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -60,15 +60,44 @@
|
|||||||
<div id="content"><div id='filecontents'>
|
<div id="content"><div id='filecontents'>
|
||||||
<h1 id="label-Readme">Readme</h1>
|
<h1 id="label-Readme">Readme</h1>
|
||||||
|
|
||||||
<p><a href="https://jenkins.confdroid.com/job/haproxy_cd/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=haproxy_cd"></a>|</p>
|
<p><a href="https://jenkins.confdroid.com/job/confdroid_haproxy/"><img src="https://jenkins.confdroid.com/buildStatus/icon?job=confdroid_haproxy&style=plastic"></a> <a href="https://sonarqube.confdroid.com/dashboard?id=confdroid_haproxy"><img src="https://sonarqube.confdroid.com/api/project_badges/measure?project=confdroid_haproxy&metric=security_hotspots&token=sqb_0205ee61c907f77ebdc1c717b8f4ff568c3724cf"></a> <a href="https://deepwiki.com/grizzlycoda/puppet_collection"><img src="https://deepwiki.com/badge.svg"></a></p>
|
||||||
|
<ul><li>
|
||||||
<p>[[<em>TOC</em>]]</p>
|
<p><a href="#readme">Readme</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#synopsis">Synopsis</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#warning">WARNING</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#features">Features</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#dependencies">Dependencies</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#deployment">Deployment</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#parameters">Parameters</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#proxy-configuration">Proxy Configuration</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#tls">TLS</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#selinux">SELINUX</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#known-problems">Known Problems</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#support">Support</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#tests">Tests</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#contact-us">Contact Us</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="#disclaimer">Disclaimer</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Synopsis">Synopsis</h2>
|
<h2 id="label-Synopsis">Synopsis</h2>
|
||||||
|
|
||||||
<p><code>HA Proxy</code> is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.</p>
|
<p><code>HA Proxy</code> is a very powerful and popular open source load balancer to balance incoming requests between multiple instances of web-, application- or database servers etc.</p>
|
||||||
|
|
||||||
<p><code>haproxy_cd</code> automates installation and configuration of <code>HA proxy</code> including self-healing, monitoring and firewall etc.</p>
|
<p><code>confdroid_haproxy</code> automates installation and configuration of <code>HA proxy</code> including self-healing, monitoring and firewall etc.</p>
|
||||||
|
|
||||||
<h2 id="label-WARNING">WARNING</h2>
|
<h2 id="label-WARNING">WARNING</h2>
|
||||||
|
|
||||||
@@ -99,7 +128,11 @@
|
|||||||
</li><li>
|
</li><li>
|
||||||
<p>ACL options</p>
|
<p>ACL options</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manage fail2ban integration (optional, requires fail2ban_cd module)</p>
|
<p>adds haproxy logs to rsyslog for remote logging where used</p>
|
||||||
|
</li><li>
|
||||||
|
<p>manage fail2ban integration (optional, requires <code>confdroid_fail2ban</code> module)</p>
|
||||||
|
</li><li>
|
||||||
|
<p>manage nagios integration (optional, requires <code>confdroid-nagios</code> module)</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<p>SERVICE</p>
|
<p>SERVICE</p>
|
||||||
@@ -107,14 +140,14 @@
|
|||||||
<p>manage haproxy service</p>
|
<p>manage haproxy service</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>restart service after changes in the configuration</p>
|
<p>restart service after changes in the configuration</p>
|
||||||
|
</li><li>
|
||||||
|
<p>stats are enabled on port 8404 with uri /haproxy?stats and strict private mode, set <code>hy_stats_auth</code> to something meaningful.</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Dependencies">Dependencies</h2>
|
<h2 id="label-Dependencies">Dependencies</h2>
|
||||||
|
|
||||||
<p>All dependencies must be included in the catalogue.</p>
|
<p>All dependencies must be included in the catalogue.</p>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p><a href="https://gitlab.confdroid.com/puppet/cd_resources">cd_resources</a> for managing yum base repos</p>
|
|
||||||
</li><li>
|
|
||||||
<p><a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for managing file fragments</p>
|
<p><a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for managing file fragments</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
@@ -126,14 +159,14 @@
|
|||||||
<p>via site.pp or nodes.pp</p>
|
<p>via site.pp or nodes.pp</p>
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">node 'example.example.net' {
|
<pre class="code ruby"><code class="ruby">node 'example.example.net' {
|
||||||
include haproxy_cd
|
include confdroid_haproxy
|
||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>through Foreman:</p>
|
<p>through Foreman:</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<p>In order to apply parameters through Foreman, <strong>haproxy_cd::params</strong> must be added to the host or host group in question.</p>
|
<p>In order to apply parameters through Foreman, <strong>confdroid_haproxy::params</strong>- must be added to the host or host group in question.</p>
|
||||||
|
|
||||||
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
|
<p>See <a href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more details about class deployment on Confdroid.com</a>.</p>
|
||||||
|
|
||||||
@@ -145,7 +178,9 @@
|
|||||||
|
|
||||||
<p>The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module. In order to create proxy instances, you will need an external class, which addresses the define, like so:</p>
|
<p>The proxy instances are configured in /etc/haproxy/haproxy.cfg, which is concatenated from various templates through a define in this puppet module. In order to create proxy instances, you will need an external class, which addresses the define, like so:</p>
|
||||||
|
|
||||||
<pre class="code ruby"><code class="ruby">haproxy_cd::server::proxy { 'testing':
|
<p>ACL rule:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby">confdroid_haproxy::server::proxy { 'testing':
|
||||||
haproxy_fqdn => 'node.example.net',
|
haproxy_fqdn => 'node.example.net',
|
||||||
frontend_name => 'test01-frontend',
|
frontend_name => 'test01-frontend',
|
||||||
frontend_mode => 'http',
|
frontend_mode => 'http',
|
||||||
@@ -155,11 +190,37 @@
|
|||||||
}
|
}
|
||||||
</code></pre>
|
</code></pre>
|
||||||
|
|
||||||
<p>This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made. <code>haproxy_fqdn</code> <strong>must</strong> contain the fqdn of the haproxy <strong>server</strong> where this should be configured, otherwise the templates are not being populated. Multiple ACLs need to be added as array, and will create one line each.</p>
|
<p>real Proxy for https:</p>
|
||||||
|
|
||||||
|
<pre class="code ruby"><code class="ruby">haproxy_cd::server::proxy { 'https-in':
|
||||||
|
haproxy_fqdn => 'node.example.net',
|
||||||
|
frontend_name => 'https-in',
|
||||||
|
frontend_mode => 'http',
|
||||||
|
fe_bind_mode => '*:443 ssl crt /etc/haproxy/certs/',
|
||||||
|
fe_option => 'forwardfor',
|
||||||
|
fe_http_request => 'add-header X-Forwarded-Proto https',
|
||||||
|
acl_rule_front => 'host_grafana hdr(host) -i grafana.example.net',
|
||||||
|
fe_use_backend => 'grafana_backend if host_grafana',
|
||||||
|
backend_configs => [
|
||||||
|
{
|
||||||
|
'backend_name' => 'grafana_backend',
|
||||||
|
'be_mode' => 'http',
|
||||||
|
'be_balance' => 'roundrobin',
|
||||||
|
'be_server_name_array' => ['node1 10.0.1.1:8080 check'],
|
||||||
|
}
|
||||||
|
]
|
||||||
|
default_backend => 'error_backend',
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
<p>This allows the puppet module to create the sections in the configuration file as required. The haproxy service will be restarted after the changes in the configuration file are made. <code>haproxy_fqdn</code> <strong>must</strong>- contain the fqdn of the haproxy <strong>server</strong>- where this should be configured, otherwise the templates are not being populated. Multiple ACLs need to be added as array, and will create one line each.</p>
|
||||||
|
|
||||||
|
<h2 id="label-TLS">TLS</h2>
|
||||||
|
|
||||||
|
<p>Haproxy can manage all sorts of proxies including http and https. It also can terminate https requests and send the requests within a private network unencrypted, which is quite common. <strong>This module is NOT managing certificates</strong>, as there are many ways to manage this, including Kubernetes cert-manager, Let’s encrypt or other ways.</p>
|
||||||
|
|
||||||
<h2 id="label-SELINUX">SELINUX</h2>
|
<h2 id="label-SELINUX">SELINUX</h2>
|
||||||
|
|
||||||
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored.</p>
|
<p>All files and directories are configured with correct selinux context. If selinux is disabled, these contexts are ignored. If selinux is set to <code>enforce</code> (not controlled within this module), the parameter <code>hy_selinux_allow_stats</code> must also be set to <code>true</code>, else the haproxy service will not start as selinux will not allow it. This is the default setting.</p>
|
||||||
|
|
||||||
<h2 id="label-Known+Problems">Known Problems</h2>
|
<h2 id="label-Known+Problems">Known Problems</h2>
|
||||||
|
|
||||||
@@ -187,8 +248,11 @@
|
|||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Contact+Us">Contact Us</h2>
|
<h2 id="label-Contact+Us">Contact Us</h2>
|
||||||
|
<ul><li>
|
||||||
<p><a href="https://confdroid.com/contact/">contact Us</a> <a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
|
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
|
||||||
|
</li><li>
|
||||||
|
<p><a href="https://feedback.confdroid.com/">Feedback Portal</a></p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Disclaimer">Disclaimer</h2>
|
<h2 id="label-Disclaimer">Disclaimer</h2>
|
||||||
|
|
||||||
|
|||||||
@@ -40,72 +40,79 @@
|
|||||||
<ul id="full_list" class="puppet_class">
|
<ul id="full_list" class="puppet_class">
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd" class="odd">
|
<li id="object_puppet_classes::confdroid_haproxy" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd.html" title="puppet_classes::haproxy_cd (puppet_class)">haproxy_cd</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy.html" title="puppet_classes::confdroid_haproxy (puppet_class)">confdroid_haproxy</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::firewall::iptables" class="even">
|
<li id="object_puppet_classes::confdroid_haproxy::firewall::iptables" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::haproxy_cd::firewall::iptables (puppet_class)">haproxy_cd::firewall::iptables</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_haproxy::firewall::iptables (puppet_class)">confdroid_haproxy::firewall::iptables</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::main::config" class="odd">
|
<li id="object_puppet_classes::confdroid_haproxy::main::config" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::haproxy_cd::main::config (puppet_class)">haproxy_cd::main::config</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_haproxy::main::config (puppet_class)">confdroid_haproxy::main::config</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::main::dirs" class="even">
|
<li id="object_puppet_classes::confdroid_haproxy::main::dirs" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Adirs.html" title="puppet_classes::haproxy_cd::main::dirs (puppet_class)">haproxy_cd::main::dirs</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_haproxy::main::dirs (puppet_class)">confdroid_haproxy::main::dirs</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::main::files" class="odd">
|
<li id="object_puppet_classes::confdroid_haproxy::main::files" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Afiles.html" title="puppet_classes::haproxy_cd::main::files (puppet_class)">haproxy_cd::main::files</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_haproxy::main::files (puppet_class)">confdroid_haproxy::main::files</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::main::install" class="even">
|
<li id="object_puppet_classes::confdroid_haproxy::main::install" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::haproxy_cd::main::install (puppet_class)">haproxy_cd::main::install</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_haproxy::main::install (puppet_class)">confdroid_haproxy::main::install</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::main::user" class="odd">
|
<li id="object_puppet_classes::confdroid_haproxy::main::user" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::haproxy_cd::main::user (puppet_class)">haproxy_cd::main::user</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amain_3A_3Auser.html" title="puppet_classes::confdroid_haproxy::main::user (puppet_class)">confdroid_haproxy::main::user</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::monitoring::fail2ban" class="even">
|
<li id="object_puppet_classes::confdroid_haproxy::monitoring::fail2ban" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::haproxy_cd::monitoring::fail2ban (puppet_class)">haproxy_cd::monitoring::fail2ban</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::confdroid_haproxy::monitoring::fail2ban (puppet_class)">confdroid_haproxy::monitoring::fail2ban</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::params" class="odd">
|
<li id="object_puppet_classes::confdroid_haproxy::monitoring::target" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_haproxy::monitoring::target (puppet_class)">confdroid_haproxy::monitoring::target</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::haproxy_cd::server::service" class="even">
|
<li id="object_puppet_classes::confdroid_haproxy::params" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/haproxy_cd_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::haproxy_cd::server::service (puppet_class)">haproxy_cd::server::service</a></span>
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
<li id="object_puppet_classes::confdroid_haproxy::server::service" class="odd">
|
||||||
|
<div class="item">
|
||||||
|
<span class='object_link'><a href="puppet_classes/confdroid_haproxy_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_haproxy::server::service (puppet_class)">confdroid_haproxy::server::service</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd
|
Puppet Class: confdroid_haproxy
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd";
|
pathId = "puppet_classes::confdroid_haproxy";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd</span>
|
<span class="title">confdroid_haproxy</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
|
|
||||||
@@ -72,13 +72,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class initializes the haproxy_cd module.
|
Class initializes the confdroid_haproxy module.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::init.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::init.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,8 +103,8 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/init.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/init.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd {
|
class confdroid_haproxy {
|
||||||
include haproxy_cd::params
|
include confdroid_haproxy::params
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::firewall::iptables
|
Puppet Class: confdroid_haproxy::firewall::iptables
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::firewall::iptables";
|
pathId = "puppet_classes::confdroid_haproxy::firewall::iptables";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::firewall::iptables</span>
|
<span class="title">confdroid_haproxy::firewall::iptables</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::firewall::iptables</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::firewall::iptables</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::firewall::iptables.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::firewall::iptables.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -128,9 +128,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/firewall/iptables.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::firewall::iptables (
|
class confdroid_haproxy::firewall::iptables (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if ($fqdn == $hy_host_fqdn) and ($hy_manage_fw == true) {
|
if ($fqdn == $hy_host_fqdn) and ($hy_manage_fw == true) {
|
||||||
firewall { "${hy_fw_order_no}${hy_http_port} tcp port ${hy_http_port}":
|
firewall { "${hy_fw_order_no}${hy_http_port} tcp port ${hy_http_port}":
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
@@ -144,9 +144,9 @@ class haproxy_cd::firewall::iptables (
|
|||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
|
|
||||||
firewall { "${hy_fw_order_no}9000 tcp port minio-api":
|
firewall { "${hy_fw_order_no}${hy_stats_port} tcp port ${hy_stats_port}":
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
dport => '9000',
|
dport => $hy_stats_port,
|
||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::main::config
|
Puppet Class: confdroid_haproxy::main::config
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::main::config";
|
pathId = "puppet_classes::confdroid_haproxy::main::config";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::main::config</span>
|
<span class="title">confdroid_haproxy::main::config</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::main::config</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::main::config</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages module logic for haproxy_cd.
|
Class manages module logic for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::main::config.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::main::config.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -109,18 +109,40 @@
|
|||||||
11
|
11
|
||||||
12
|
12
|
||||||
13
|
13
|
||||||
14</pre>
|
14
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
19
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
23
|
||||||
|
24
|
||||||
|
25</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/config.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::main::config (
|
class confdroid_haproxy::main::config (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
include haproxy_cd::server::service
|
include confdroid_haproxy::server::service
|
||||||
|
|
||||||
if $hy_manage_fail2ban == true {
|
if $hy_manage_fail2ban == true {
|
||||||
include haproxy_cd::monitoring::fail2ban
|
include confdroid_haproxy::monitoring::fail2ban
|
||||||
|
}
|
||||||
|
|
||||||
|
if $hy_manage_nagios == true {
|
||||||
|
include confdroid_haproxy::monitoring::target
|
||||||
|
}
|
||||||
|
|
||||||
|
if $hy_selinux_allow_stats == true {
|
||||||
|
exec { 'setsebool haproxy_connect_any on':
|
||||||
|
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||||
|
onlyif => '/usr/sbin/getsebool haproxy_connect_any | /usr/bin/grep -q " --> off$"',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::main::dirs
|
Puppet Class: confdroid_haproxy::main::dirs
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::main::dirs";
|
pathId = "puppet_classes::confdroid_haproxy::main::dirs";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::main::dirs</span>
|
<span class="title">confdroid_haproxy::main::dirs</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::main::dirs</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::main::dirs</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages all directories required for haproxy_cd.
|
Class manages all directories required for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::main::dirs.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::main::dirs.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -148,11 +148,11 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/dirs.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::main::dirs (
|
class confdroid_haproxy::main::dirs (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::user
|
require confdroid_haproxy::main::user
|
||||||
|
|
||||||
# main dir
|
# main dir
|
||||||
file { $hy_main_dir:
|
file { $hy_main_dir:
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::main::files
|
Puppet Class: confdroid_haproxy::main::files
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::main::files";
|
pathId = "puppet_classes::confdroid_haproxy::main::files";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::main::files</span>
|
<span class="title">confdroid_haproxy::main::files</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::main::files</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::main::files</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages all configuration files required for haproxy_cd.
|
Class manages all configuration files required for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::main::files.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::main::files.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -258,11 +258,11 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/files.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::main::files (
|
class confdroid_haproxy::main::files (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::dirs
|
require confdroid_haproxy::main::dirs
|
||||||
|
|
||||||
# create the concat target
|
# create the concat target
|
||||||
concat { $hy_main_config:
|
concat { $hy_main_config:
|
||||||
@@ -406,7 +406,7 @@ class haproxy_cd::main::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => syslog_conf_t,
|
seltype => syslog_conf_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/rsyslog/10_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/rsyslog/10_haproxy.conf.erb'),
|
||||||
# notify => Service['rsyslog'], # only if using rsyslog_cd module
|
# notify => Service['rsyslog'], # only if using rsyslog_cd module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::main::install
|
Puppet Class: confdroid_haproxy::main::install
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::main::install";
|
pathId = "puppet_classes::confdroid_haproxy::main::install";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::main::install</span>
|
<span class="title">confdroid_haproxy::main::install</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::main::install</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::main::install</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class installs binaries required for haproxy_cd
|
Class installs binaries required for confdroid_haproxy
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::main::install.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::main::install.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -114,9 +114,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/install.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::main::install (
|
class confdroid_haproxy::main::install (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
ensure => $pkg_ensure,
|
ensure => $pkg_ensure,
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::main::user
|
Puppet Class: confdroid_haproxy::main::user
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::main::user";
|
pathId = "puppet_classes::confdroid_haproxy::main::user";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::main::user</span>
|
<span class="title">confdroid_haproxy::main::user</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::main::user</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::main::user</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages service users for haproxy_cd.
|
Class manages service users for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::main::user.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
|
<p>confdroid_haproxy::main::user.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,11 +130,11 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/main/user.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::main::user (
|
class confdroid_haproxy::main::user (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::install
|
require confdroid_haproxy::main::install
|
||||||
|
|
||||||
# manage user
|
# manage user
|
||||||
user { $hy_user_name:
|
user { $hy_user_name:
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::monitoring::fail2ban
|
Puppet Class: confdroid_haproxy::monitoring::fail2ban
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::monitoring::fail2ban";
|
pathId = "puppet_classes::confdroid_haproxy::monitoring::fail2ban";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::monitoring::fail2ban</span>
|
<span class="title">confdroid_haproxy::monitoring::fail2ban</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::monitoring::fail2ban</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::monitoring::fail2ban</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@
|
|||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -140,9 +140,9 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/monitoring/fail2ban.pp', line 5</span>
|
<pre class="code"><span class="info file"># File 'manifests/monitoring/fail2ban.pp', line 5</span>
|
||||||
|
|
||||||
class haproxy_cd::monitoring::fail2ban (
|
class confdroid_haproxy::monitoring::fail2ban (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $hy_manage_fail2ban == true {
|
if $hy_manage_fail2ban == true {
|
||||||
require confdroid_fail2ban # (external module)
|
require confdroid_fail2ban # (external module)
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ class haproxy_cd::monitoring::fail2ban (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/fail2ban/f2b_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/fail2ban/f2b_haproxy.conf.erb'),
|
||||||
notify => Service['fail2ban'],
|
notify => Service['fail2ban'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ class haproxy_cd::monitoring::fail2ban (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/fail2ban/010_jail.d_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/fail2ban/010_jail.d_haproxy.conf.erb'),
|
||||||
notify => Service['fail2ban'],
|
notify => Service['fail2ban'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,156 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>
|
||||||
|
Puppet Class: confdroid_haproxy::monitoring::target
|
||||||
|
|
||||||
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
|
</title>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../css/style.css" type="text/css" />
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
pathId = "puppet_classes::confdroid_haproxy::monitoring::target";
|
||||||
|
relpath = '../';
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
||||||
|
|
||||||
|
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div class="nav_wrap">
|
||||||
|
<iframe id="nav" src="../puppet_class_list.html?1"></iframe>
|
||||||
|
<div id="resizer"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="main" tabindex="-1">
|
||||||
|
<div id="header">
|
||||||
|
<div id="menu">
|
||||||
|
|
||||||
|
<a href="../_index.html">Index (c)</a> »
|
||||||
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
|
»
|
||||||
|
<span class="title">confdroid_haproxy::monitoring::target</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="search">
|
||||||
|
|
||||||
|
<a class="full_list_link" id="puppet_class_list_link"
|
||||||
|
href="../puppet_class_list.html">
|
||||||
|
|
||||||
|
<svg width="24" height="24">
|
||||||
|
<rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
|
||||||
|
<rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
|
||||||
|
<rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
|
||||||
|
</svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="clear"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::monitoring::target</h1>
|
||||||
|
<div class="box_info">
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>Inherits:</dt>
|
||||||
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>Defined in:</dt>
|
||||||
|
<dd>
|
||||||
|
manifests/monitoring/target.pp
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<h2>Summary</h2>
|
||||||
|
class manages exports for nagios monitoring
|
||||||
|
|
||||||
|
<h2>Overview</h2>
|
||||||
|
<div class="docstring">
|
||||||
|
<div class="discussion">
|
||||||
|
|
||||||
|
<p>confdroid_haproxy::monitoring::target.pp Module name: confdroid_haproxy Author: 12ww1160 (12ww1160@puppetsoft.com)</p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="tags">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div><div class="method_details_list">
|
||||||
|
<table class="source_code">
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
|
6
|
||||||
|
7
|
||||||
|
8
|
||||||
|
9
|
||||||
|
10
|
||||||
|
11
|
||||||
|
12
|
||||||
|
13
|
||||||
|
14
|
||||||
|
15
|
||||||
|
16
|
||||||
|
17
|
||||||
|
18
|
||||||
|
19
|
||||||
|
20
|
||||||
|
21
|
||||||
|
22
|
||||||
|
23</pre>
|
||||||
|
</td>
|
||||||
|
<td>
|
||||||
|
<pre class="code"><span class="info file"># File 'manifests/monitoring/target.pp', line 6</span>
|
||||||
|
|
||||||
|
class confdroid_haproxy::monitoring::target (
|
||||||
|
|
||||||
|
) inherits confdroid_haproxy::params {
|
||||||
|
if $hy_manage_nagios == true {
|
||||||
|
@@nagios_service { "check_haproxy_${fqdn}":
|
||||||
|
check_command => "check_nrpe!check_haproxy!${hy_procs_allowed}!haproxy",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${fqdn}_check_haproxy",
|
||||||
|
target => $hy_target_service,
|
||||||
|
owner => 'nagios',
|
||||||
|
group => 'nagios',
|
||||||
|
mode => '0640',
|
||||||
|
contacts => $hy_target_contacts,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}</pre>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div id="footer">
|
||||||
|
Generated by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>.
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::params
|
Puppet Class: confdroid_haproxy::params
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::params";
|
pathId = "puppet_classes::confdroid_haproxy::params";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::params</span>
|
<span class="title">confdroid_haproxy::params</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::params</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::params</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
|
|
||||||
@@ -67,21 +67,23 @@
|
|||||||
<dt>Inherited by:</dt>
|
<dt>Inherited by:</dt>
|
||||||
<dd>
|
<dd>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amain_3A_3Adirs.html" title="puppet_classes::haproxy_cd::main::dirs (puppet_class)">haproxy_cd::main::dirs</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amain_3A_3Adirs.html" title="puppet_classes::confdroid_haproxy::main::dirs (puppet_class)">confdroid_haproxy::main::dirs</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::haproxy_cd::main::user (puppet_class)">haproxy_cd::main::user</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amain_3A_3Auser.html" title="puppet_classes::confdroid_haproxy::main::user (puppet_class)">confdroid_haproxy::main::user</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amain_3A_3Afiles.html" title="puppet_classes::haproxy_cd::main::files (puppet_class)">haproxy_cd::main::files</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amain_3A_3Afiles.html" title="puppet_classes::confdroid_haproxy::main::files (puppet_class)">confdroid_haproxy::main::files</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::haproxy_cd::main::config (puppet_class)">haproxy_cd::main::config</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::confdroid_haproxy::main::config (puppet_class)">confdroid_haproxy::main::config</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::haproxy_cd::main::install (puppet_class)">haproxy_cd::main::install</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amain_3A_3Ainstall.html" title="puppet_classes::confdroid_haproxy::main::install (puppet_class)">confdroid_haproxy::main::install</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::haproxy_cd::server::service (puppet_class)">haproxy_cd::server::service</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::confdroid_haproxy::server::service (puppet_class)">confdroid_haproxy::server::service</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::haproxy_cd::firewall::iptables (puppet_class)">haproxy_cd::firewall::iptables</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Afirewall_3A_3Aiptables.html" title="puppet_classes::confdroid_haproxy::firewall::iptables (puppet_class)">confdroid_haproxy::firewall::iptables</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="haproxy_cd_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::haproxy_cd::monitoring::fail2ban (puppet_class)">haproxy_cd::monitoring::fail2ban</a></span><br/>
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amonitoring_3A_3Atarget.html" title="puppet_classes::confdroid_haproxy::monitoring::target (puppet_class)">confdroid_haproxy::monitoring::target</a></span><br/>
|
||||||
|
|
||||||
|
<span class='object_link'><a href="confdroid_haproxy_3A_3Amonitoring_3A_3Afail2ban.html" title="puppet_classes::confdroid_haproxy::monitoring::fail2ban (puppet_class)">confdroid_haproxy::monitoring::fail2ban</a></span><br/>
|
||||||
|
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
@@ -98,7 +100,7 @@
|
|||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::params.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::params.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -397,24 +399,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>hy_show_stats</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>whether we want to display the statistics page</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>hy_stats_socket</span>
|
<span class='name'>hy_stats_socket</span>
|
||||||
@@ -865,6 +849,109 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_selinux_allow_stats</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>true</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>whether to allow stats in selinux</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_stats_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8404'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the port to use for stats. used in firewall settings</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_manage_nagios</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>whether to manage nagios service checks</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_target_service</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'/etc/nagios/conf.d/haproxy_service.cfg'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the path to the nagios service check file</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_target_contacts</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Array</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>['nagiosadmin']</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the contacts to use for nagios service checks</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>hy_procs_allowed</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'1:'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
@@ -876,10 +963,6 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
58
|
|
||||||
59
|
|
||||||
60
|
|
||||||
61
|
|
||||||
62
|
62
|
||||||
63
|
63
|
||||||
64
|
64
|
||||||
@@ -964,12 +1047,25 @@
|
|||||||
143
|
143
|
||||||
144
|
144
|
||||||
145
|
145
|
||||||
146</pre>
|
146
|
||||||
|
147
|
||||||
|
148
|
||||||
|
149
|
||||||
|
150
|
||||||
|
151
|
||||||
|
152
|
||||||
|
153
|
||||||
|
154
|
||||||
|
155
|
||||||
|
156
|
||||||
|
157
|
||||||
|
158
|
||||||
|
159</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 58</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 62</span>
|
||||||
|
|
||||||
class haproxy_cd::params (
|
class confdroid_haproxy::params (
|
||||||
|
|
||||||
String $pkg_ensure = 'latest',
|
String $pkg_ensure = 'latest',
|
||||||
Array $reqpackages = ['haproxy','httpd-tools'],
|
Array $reqpackages = ['haproxy','httpd-tools'],
|
||||||
@@ -983,13 +1079,16 @@ class haproxy_cd::params (
|
|||||||
# fail2ban
|
# fail2ban
|
||||||
Boolean $hy_manage_fail2ban = false,
|
Boolean $hy_manage_fail2ban = false,
|
||||||
|
|
||||||
|
# selinux
|
||||||
|
Boolean $hy_selinux_allow_stats = true,
|
||||||
|
|
||||||
# main config
|
# main config
|
||||||
String $hy_http_port = '80',
|
String $hy_http_port = '80',
|
||||||
String $hy_https_port = '443',
|
String $hy_https_port = '443',
|
||||||
|
String $hy_stats_port = '8404',
|
||||||
String $hy_chroot = '/var/lib/haproxy',
|
String $hy_chroot = '/var/lib/haproxy',
|
||||||
String $hy_pid = '/var/run/haproxy.pid',
|
String $hy_pid = '/var/run/haproxy.pid',
|
||||||
String $hy_maxconn = '4000',
|
String $hy_maxconn = '4000',
|
||||||
Boolean $hy_show_stats = false,
|
|
||||||
String $hy_stats_socket = '/var/lib/haproxy/stats',
|
String $hy_stats_socket = '/var/lib/haproxy/stats',
|
||||||
String $hy_default_mode = 'tcp',
|
String $hy_default_mode = 'tcp',
|
||||||
Boolean $hy_use_http_server_close = false,
|
Boolean $hy_use_http_server_close = false,
|
||||||
@@ -1025,6 +1124,12 @@ class haproxy_cd::params (
|
|||||||
Boolean $hy_manage_be_users = false,
|
Boolean $hy_manage_be_users = false,
|
||||||
String $hy_be_userlist = '####',
|
String $hy_be_userlist = '####',
|
||||||
|
|
||||||
|
# nagios
|
||||||
|
Boolean $hy_manage_nagios = false,
|
||||||
|
String $hy_target_service = '/etc/nagios/conf.d/haproxy_service.cfg',
|
||||||
|
Array $hy_target_contacts = ['nagiosadmin'],
|
||||||
|
String $hy_procs_allowed = '1:'
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|
||||||
@@ -1038,25 +1143,25 @@ class haproxy_cd::params (
|
|||||||
|
|
||||||
# files
|
# files
|
||||||
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
|
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
|
||||||
$hy_config_head_erb = 'haproxy_cd/haproxy_head.erb'
|
$hy_config_head_erb = 'confdroid_haproxy/haproxy_head.erb'
|
||||||
$hy_config_tail_erb = 'haproxy_cd/haproxy_tail.erb'
|
$hy_config_tail_erb = 'confdroid_haproxy/haproxy_tail.erb'
|
||||||
$hy_400_file = "${hy_errors_dir}/400.http"
|
$hy_400_file = "${hy_errors_dir}/400.http"
|
||||||
$hy_400_erb = 'haproxy_cd/errors/400_http.erb'
|
$hy_400_erb = 'confdroid_haproxy/errors/400_http.erb'
|
||||||
$hy_403_file = "${hy_errors_dir}/403.http"
|
$hy_403_file = "${hy_errors_dir}/403.http"
|
||||||
$hy_403_erb = 'haproxy_cd/errors/403_http.erb'
|
$hy_403_erb = 'confdroid_haproxy/errors/403_http.erb'
|
||||||
$hy_408_file = "${hy_errors_dir}/408.http"
|
$hy_408_file = "${hy_errors_dir}/408.http"
|
||||||
$hy_408_erb = 'haproxy_cd/errors/408_http.erb'
|
$hy_408_erb = 'confdroid_haproxy/errors/408_http.erb'
|
||||||
$hy_500_file = "${hy_errors_dir}/500.http"
|
$hy_500_file = "${hy_errors_dir}/500.http"
|
||||||
$hy_500_erb = 'haproxy_cd/errors/500_http.erb'
|
$hy_500_erb = 'confdroid_haproxy/errors/500_http.erb'
|
||||||
$hy_502_file = "${hy_errors_dir}/502.http"
|
$hy_502_file = "${hy_errors_dir}/502.http"
|
||||||
$hy_502_erb = 'haproxy_cd/errors/502_http.erb'
|
$hy_502_erb = 'confdroid_haproxy/errors/502_http.erb'
|
||||||
$hy_503_file = "${hy_errors_dir}/503.http"
|
$hy_503_file = "${hy_errors_dir}/503.http"
|
||||||
$hy_503_erb = 'haproxy_cd/errors/503_http.erb'
|
$hy_503_erb = 'confdroid_haproxy/errors/503_http.erb'
|
||||||
$hy_504_file = "${hy_errors_dir}/504.http"
|
$hy_504_file = "${hy_errors_dir}/504.http"
|
||||||
$hy_504_erb = 'haproxy_cd/errors/504_http.erb'
|
$hy_504_erb = 'confdroid_haproxy/errors/504_http.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include haproxy_cd::main::config
|
include confdroid_haproxy::main::config
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Puppet Class: haproxy_cd::server::service
|
Puppet Class: confdroid_haproxy::server::service
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_classes::haproxy_cd::server::service";
|
pathId = "puppet_classes::confdroid_haproxy::server::service";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
<span class='title'><span class='object_link'>Puppet Classes</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::server::service</span>
|
<span class="title">confdroid_haproxy::server::service</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,12 +59,12 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Puppet Class: haproxy_cd::server::service</h1>
|
<div id="content"><h1>Puppet Class: confdroid_haproxy::server::service</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
|
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Inherits:</dt>
|
<dt>Inherits:</dt>
|
||||||
<dd><span class='object_link'><a href="haproxy_cd_3A_3Aparams.html" title="puppet_classes::haproxy_cd::params (puppet_class)">haproxy_cd::params</a></span></dd>
|
<dd><span class='object_link'><a href="confdroid_haproxy_3A_3Aparams.html" title="puppet_classes::confdroid_haproxy::params (puppet_class)">confdroid_haproxy::params</a></span></dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
@@ -77,13 +77,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Class manages the service(s) for haproxy_cd.
|
Class manages the service(s) for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::server::service.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
<p>confdroid_haproxy::server::service.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@confdroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -120,12 +120,12 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
<pre class="code"><span class="info file"># File 'manifests/server/service.pp', line 6</span>
|
||||||
|
|
||||||
class haproxy_cd::server::service (
|
class confdroid_haproxy::server::service (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::firewall::iptables
|
require confdroid_haproxy::firewall::iptables
|
||||||
require haproxy_cd::main::files
|
require confdroid_haproxy::main::files
|
||||||
|
|
||||||
service { $hy_service:
|
service { $hy_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
@@ -40,9 +40,9 @@
|
|||||||
<ul id="full_list" class="puppet_defined_type">
|
<ul id="full_list" class="puppet_defined_type">
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_defined_types::haproxy_cd::server::proxy" class="odd">
|
<li id="object_puppet_defined_types::confdroid_haproxy::server::proxy" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_defined_types/haproxy_cd_3A_3Aserver_3A_3Aproxy.html" title="puppet_defined_types::haproxy_cd::server::proxy (puppet_defined_type)">haproxy_cd::server::proxy</a></span>
|
<span class='object_link'><a href="puppet_defined_types/confdroid_haproxy_3A_3Aserver_3A_3Aproxy.html" title="puppet_defined_types::confdroid_haproxy::server::proxy (puppet_defined_type)">confdroid_haproxy::server::proxy</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>
|
<title>
|
||||||
Defined Type: haproxy_cd::server::proxy
|
Defined Type: confdroid_haproxy::server::proxy
|
||||||
|
|
||||||
— Documentation by YARD 0.9.36
|
— Documentation by YARD 0.9.36
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
<link rel="stylesheet" href="../css/common.css" type="text/css" />
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
pathId = "puppet_defined_types::haproxy_cd::server::proxy";
|
pathId = "puppet_defined_types::confdroid_haproxy::server::proxy";
|
||||||
relpath = '../';
|
relpath = '../';
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -36,10 +36,10 @@
|
|||||||
<div id="header">
|
<div id="header">
|
||||||
<div id="menu">
|
<div id="menu">
|
||||||
|
|
||||||
<a href="../_index.html">Index (h)</a> »
|
<a href="../_index.html">Index (c)</a> »
|
||||||
<span class='title'><span class='object_link'>Defined Types</span></span>
|
<span class='title'><span class='object_link'>Defined Types</span></span>
|
||||||
»
|
»
|
||||||
<span class="title">haproxy_cd::server::proxy</span>
|
<span class="title">confdroid_haproxy::server::proxy</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@
|
|||||||
<div class="clear"></div>
|
<div class="clear"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="content"><h1>Defined Type: haproxy_cd::server::proxy</h1>
|
<div id="content"><h1>Defined Type: confdroid_haproxy::server::proxy</h1>
|
||||||
<div class="box_info">
|
<div class="box_info">
|
||||||
<dl>
|
<dl>
|
||||||
<dt>Defined in:</dt>
|
<dt>Defined in:</dt>
|
||||||
@@ -70,13 +70,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h2>Summary</h2>
|
<h2>Summary</h2>
|
||||||
Define manages the proxies for haproxy_cd.
|
Define manages the proxies for confdroid_haproxy.
|
||||||
|
|
||||||
<h2>Overview</h2>
|
<h2>Overview</h2>
|
||||||
<div class="docstring">
|
<div class="docstring">
|
||||||
<div class="discussion">
|
<div class="discussion">
|
||||||
|
|
||||||
<p>haproxy_cd::server::proxy.pp Module name: haproxy_cd Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
|
<p>confdroid_haproxy::server::proxy.pp Module name: confdroid_haproxy Author: Arne Teuke (arne_teuke@ConfDroid.com)</p>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -615,7 +615,7 @@
|
|||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/server/proxy.pp', line 34</span>
|
<pre class="code"><span class="info file"># File 'manifests/server/proxy.pp', line 34</span>
|
||||||
|
|
||||||
define haproxy_cd::server::proxy (
|
define confdroid_haproxy::server::proxy (
|
||||||
|
|
||||||
String $haproxy_fqdn = undef,
|
String $haproxy_fqdn = undef,
|
||||||
String $frontend_name = undef,
|
String $frontend_name = undef,
|
||||||
@@ -647,9 +647,9 @@ define haproxy_cd::server::proxy (
|
|||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|
||||||
$hy_main_config = '/etc/haproxy/haproxy.cfg'
|
$hy_main_config = '/etc/haproxy/haproxy.cfg'
|
||||||
$hy_frontendrule = 'haproxy_cd/haproxy_frontend_rule.erb'
|
$hy_frontendrule = 'confdroid_haproxy/haproxy_frontend_rule.erb'
|
||||||
$hy_backendrule = 'haproxy_cd/haproxy_backend_rule.erb'
|
$hy_backendrule = 'confdroid_haproxy/haproxy_backend_rule.erb'
|
||||||
$hy_acl_rule = 'haproxy_cd/haproxy_acl_rule.erb'
|
$hy_acl_rule = 'confdroid_haproxy/haproxy_acl_rule.erb'
|
||||||
|
|
||||||
# Ensure acl_rule_front and acl_rule_back are arrays
|
# Ensure acl_rule_front and acl_rule_back are arrays
|
||||||
$acl_rule_front_array = split($acl_rule_front, ';')
|
$acl_rule_front_array = split($acl_rule_front, ';')
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
## haproxy_cd::firewall::iptables.pp
|
## confdroid_haproxy::firewall::iptables.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall
|
# @summary manage firewall settings through cd_firewall or puppetlabs-firewall
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class haproxy_cd::firewall::iptables (
|
class confdroid_haproxy::firewall::iptables (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if ($fqdn == $hy_host_fqdn) and ($hy_manage_fw == true) {
|
if ($fqdn == $hy_host_fqdn) and ($hy_manage_fw == true) {
|
||||||
firewall { "${hy_fw_order_no}${hy_http_port} tcp port ${hy_http_port}":
|
firewall { "${hy_fw_order_no}${hy_http_port} tcp port ${hy_http_port}":
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
@@ -19,9 +19,9 @@ class haproxy_cd::firewall::iptables (
|
|||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
|
|
||||||
firewall { "${hy_fw_order_no}9000 tcp port minio-api":
|
firewall { "${hy_fw_order_no}${hy_stats_port} tcp port ${hy_stats_port}":
|
||||||
proto => 'tcp',
|
proto => 'tcp',
|
||||||
dport => '9000',
|
dport => $hy_stats_port,
|
||||||
jump => 'accept',
|
jump => 'accept',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
## haproxy_cd::init.pp
|
## confdroid_haproxy::init.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class initializes the haproxy_cd module.
|
# @summary Class initializes the confdroid_haproxy module.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class haproxy_cd {
|
class confdroid_haproxy {
|
||||||
include haproxy_cd::params
|
include confdroid_haproxy::params
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,25 @@
|
|||||||
## haproxy_cd::main::config.pp
|
## confdroid_haproxy::main::config.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class manages module logic for haproxy_cd.
|
# @summary Class manages module logic for confdroid_haproxy.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class haproxy_cd::main::config (
|
class confdroid_haproxy::main::config (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
include haproxy_cd::server::service
|
include confdroid_haproxy::server::service
|
||||||
|
|
||||||
if $hy_manage_fail2ban == true {
|
if $hy_manage_fail2ban == true {
|
||||||
include haproxy_cd::monitoring::fail2ban
|
include confdroid_haproxy::monitoring::fail2ban
|
||||||
|
}
|
||||||
|
|
||||||
|
if $hy_manage_nagios == true {
|
||||||
|
include confdroid_haproxy::monitoring::target
|
||||||
|
}
|
||||||
|
|
||||||
|
if $hy_selinux_allow_stats == true {
|
||||||
|
exec { 'setsebool haproxy_connect_any on':
|
||||||
|
path => ['/bin', '/usr/bin', '/sbin', '/usr/sbin'],
|
||||||
|
onlyif => '/usr/sbin/getsebool haproxy_connect_any | /usr/bin/grep -q " --> off$"',
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
## haproxy_cd::main::dirs.pp
|
## confdroid_haproxy::main::dirs.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class manages all directories required for haproxy_cd.
|
# @summary Class manages all directories required for confdroid_haproxy.
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class haproxy_cd::main::dirs (
|
class confdroid_haproxy::main::dirs (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::user
|
require confdroid_haproxy::main::user
|
||||||
|
|
||||||
# main dir
|
# main dir
|
||||||
file { $hy_main_dir:
|
file { $hy_main_dir:
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
## haproxy_cd::main::files.pp
|
## confdroid_haproxy::main::files.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class manages all configuration files required for haproxy_cd.
|
# @summary Class manages all configuration files required for confdroid_haproxy.
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class haproxy_cd::main::files (
|
class confdroid_haproxy::main::files (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::dirs
|
require confdroid_haproxy::main::dirs
|
||||||
|
|
||||||
# create the concat target
|
# create the concat target
|
||||||
concat { $hy_main_config:
|
concat { $hy_main_config:
|
||||||
@@ -151,7 +151,7 @@ class haproxy_cd::main::files (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => syslog_conf_t,
|
seltype => syslog_conf_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/rsyslog/10_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/rsyslog/10_haproxy.conf.erb'),
|
||||||
# notify => Service['rsyslog'], # only if using rsyslog_cd module
|
# notify => Service['rsyslog'], # only if using rsyslog_cd module
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
## haproxy_cd::main::install.pp
|
## confdroid_haproxy::main::install.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class installs binaries required for haproxy_cd
|
# @summary Class installs binaries required for confdroid_haproxy
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class haproxy_cd::main::install (
|
class confdroid_haproxy::main::install (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
package { $reqpackages:
|
package { $reqpackages:
|
||||||
ensure => $pkg_ensure,
|
ensure => $pkg_ensure,
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
## haproxy_cd::main::user.pp
|
## confdroid_haproxy::main::user.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
||||||
# @summary Class manages service users for haproxy_cd.
|
# @summary Class manages service users for confdroid_haproxy.
|
||||||
#############################################################################
|
#############################################################################
|
||||||
class haproxy_cd::main::user (
|
class confdroid_haproxy::main::user (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::main::install
|
require confdroid_haproxy::main::install
|
||||||
|
|
||||||
# manage user
|
# manage user
|
||||||
user { $hy_user_name:
|
user { $hy_user_name:
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class manages fail2ban settings
|
# @summary Class manages fail2ban settings
|
||||||
##############################################################################
|
##############################################################################
|
||||||
class haproxy_cd::monitoring::fail2ban (
|
class confdroid_haproxy::monitoring::fail2ban (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $hy_manage_fail2ban == true {
|
if $hy_manage_fail2ban == true {
|
||||||
require confdroid_fail2ban # (external module)
|
require confdroid_fail2ban # (external module)
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ class haproxy_cd::monitoring::fail2ban (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/fail2ban/f2b_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/fail2ban/f2b_haproxy.conf.erb'),
|
||||||
notify => Service['fail2ban'],
|
notify => Service['fail2ban'],
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ class haproxy_cd::monitoring::fail2ban (
|
|||||||
selrole => object_r,
|
selrole => object_r,
|
||||||
seltype => etc_t,
|
seltype => etc_t,
|
||||||
seluser => system_u,
|
seluser => system_u,
|
||||||
content => template('haproxy_cd/fail2ban/010_jail.d_haproxy.conf.erb'),
|
content => template('confdroid_haproxy/fail2ban/010_jail.d_haproxy.conf.erb'),
|
||||||
notify => Service['fail2ban'],
|
notify => Service['fail2ban'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
23
manifests/monitoring/target.pp
Normal file
23
manifests/monitoring/target.pp
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
## confdroid_haproxy::monitoring::target.pp
|
||||||
|
# Module name: confdroid_haproxy
|
||||||
|
# Author: 12ww1160 (12ww1160@puppetsoft.com)
|
||||||
|
# @summary class manages exports for nagios monitoring
|
||||||
|
##############################################################################
|
||||||
|
class confdroid_haproxy::monitoring::target (
|
||||||
|
|
||||||
|
) inherits confdroid_haproxy::params {
|
||||||
|
if $hy_manage_nagios == true {
|
||||||
|
@@nagios_service { "check_haproxy_${fqdn}":
|
||||||
|
check_command => "check_nrpe!check_haproxy!${hy_procs_allowed}!haproxy",
|
||||||
|
use => 'generic-service',
|
||||||
|
host_name => $fqdn,
|
||||||
|
notification_period => '24x7',
|
||||||
|
service_description => "${fqdn}_check_haproxy",
|
||||||
|
target => $hy_target_service,
|
||||||
|
owner => 'nagios',
|
||||||
|
group => 'nagios',
|
||||||
|
mode => '0640',
|
||||||
|
contacts => $hy_target_contacts,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
## haproxy_cd::params.pp
|
## confdroid_haproxy::params.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @param [String] pkg_ensure
|
# @param [String] pkg_ensure
|
||||||
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
# which [package type](https://confdroid.com/2017/05/puppet-type-package/)
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
# @param [String] hy_chroot where the chroot should be
|
# @param [String] hy_chroot where the chroot should be
|
||||||
# @param [String] hy_pid the pid file to use.
|
# @param [String] hy_pid the pid file to use.
|
||||||
# @param [String] hy_maxconn how many connections should we max allow.
|
# @param [String] hy_maxconn how many connections should we max allow.
|
||||||
# @param [Boolean] hy_show_stats whether we want to display the statistics page
|
|
||||||
# @param [String] hy_stats_socket name and path of the stats socket
|
# @param [String] hy_stats_socket name and path of the stats socket
|
||||||
# @param [String] hy_default_mode which mode to use in the defaults block
|
# @param [String] hy_default_mode which mode to use in the defaults block
|
||||||
# @param [String] hy_log_default should be used when the instance's logging
|
# @param [String] hy_log_default should be used when the instance's logging
|
||||||
@@ -54,8 +53,13 @@
|
|||||||
# @param [Boolean] hy_use_dontlognull whether to use dontlognull as default
|
# @param [Boolean] hy_use_dontlognull whether to use dontlognull as default
|
||||||
# @param [String] hy_be_userlist backend userlist comment
|
# @param [String] hy_be_userlist backend userlist comment
|
||||||
# @param [Boolean] hy_manage_be_users whether to manage backend users
|
# @param [Boolean] hy_manage_be_users whether to manage backend users
|
||||||
|
# @param [Boolean] hy_selinux_allow_stats whether to allow stats in selinux
|
||||||
|
# @param [String] hy_stats_port the port to use for stats. used in firewall settings
|
||||||
|
# @param [Boolean] hy_manage_nagios whether to manage nagios service checks
|
||||||
|
# @param [String] hy_target_service the path to the nagios service check file
|
||||||
|
# @param [Array] hy_target_contacts the contacts to use for nagios service checks
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class haproxy_cd::params (
|
class confdroid_haproxy::params (
|
||||||
|
|
||||||
String $pkg_ensure = 'latest',
|
String $pkg_ensure = 'latest',
|
||||||
Array $reqpackages = ['haproxy','httpd-tools'],
|
Array $reqpackages = ['haproxy','httpd-tools'],
|
||||||
@@ -69,13 +73,16 @@ class haproxy_cd::params (
|
|||||||
# fail2ban
|
# fail2ban
|
||||||
Boolean $hy_manage_fail2ban = false,
|
Boolean $hy_manage_fail2ban = false,
|
||||||
|
|
||||||
|
# selinux
|
||||||
|
Boolean $hy_selinux_allow_stats = true,
|
||||||
|
|
||||||
# main config
|
# main config
|
||||||
String $hy_http_port = '80',
|
String $hy_http_port = '80',
|
||||||
String $hy_https_port = '443',
|
String $hy_https_port = '443',
|
||||||
|
String $hy_stats_port = '8404',
|
||||||
String $hy_chroot = '/var/lib/haproxy',
|
String $hy_chroot = '/var/lib/haproxy',
|
||||||
String $hy_pid = '/var/run/haproxy.pid',
|
String $hy_pid = '/var/run/haproxy.pid',
|
||||||
String $hy_maxconn = '4000',
|
String $hy_maxconn = '4000',
|
||||||
Boolean $hy_show_stats = false,
|
|
||||||
String $hy_stats_socket = '/var/lib/haproxy/stats',
|
String $hy_stats_socket = '/var/lib/haproxy/stats',
|
||||||
String $hy_default_mode = 'tcp',
|
String $hy_default_mode = 'tcp',
|
||||||
Boolean $hy_use_http_server_close = false,
|
Boolean $hy_use_http_server_close = false,
|
||||||
@@ -111,6 +118,12 @@ class haproxy_cd::params (
|
|||||||
Boolean $hy_manage_be_users = false,
|
Boolean $hy_manage_be_users = false,
|
||||||
String $hy_be_userlist = '####',
|
String $hy_be_userlist = '####',
|
||||||
|
|
||||||
|
# nagios
|
||||||
|
Boolean $hy_manage_nagios = false,
|
||||||
|
String $hy_target_service = '/etc/nagios/conf.d/haproxy_service.cfg',
|
||||||
|
Array $hy_target_contacts = ['nagiosadmin'],
|
||||||
|
String $hy_procs_allowed = '1:'
|
||||||
|
|
||||||
) {
|
) {
|
||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|
||||||
@@ -124,23 +137,23 @@ class haproxy_cd::params (
|
|||||||
|
|
||||||
# files
|
# files
|
||||||
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
|
$hy_main_config = "${hy_main_dir}/haproxy.cfg"
|
||||||
$hy_config_head_erb = 'haproxy_cd/haproxy_head.erb'
|
$hy_config_head_erb = 'confdroid_haproxy/haproxy_head.erb'
|
||||||
$hy_config_tail_erb = 'haproxy_cd/haproxy_tail.erb'
|
$hy_config_tail_erb = 'confdroid_haproxy/haproxy_tail.erb'
|
||||||
$hy_400_file = "${hy_errors_dir}/400.http"
|
$hy_400_file = "${hy_errors_dir}/400.http"
|
||||||
$hy_400_erb = 'haproxy_cd/errors/400_http.erb'
|
$hy_400_erb = 'confdroid_haproxy/errors/400_http.erb'
|
||||||
$hy_403_file = "${hy_errors_dir}/403.http"
|
$hy_403_file = "${hy_errors_dir}/403.http"
|
||||||
$hy_403_erb = 'haproxy_cd/errors/403_http.erb'
|
$hy_403_erb = 'confdroid_haproxy/errors/403_http.erb'
|
||||||
$hy_408_file = "${hy_errors_dir}/408.http"
|
$hy_408_file = "${hy_errors_dir}/408.http"
|
||||||
$hy_408_erb = 'haproxy_cd/errors/408_http.erb'
|
$hy_408_erb = 'confdroid_haproxy/errors/408_http.erb'
|
||||||
$hy_500_file = "${hy_errors_dir}/500.http"
|
$hy_500_file = "${hy_errors_dir}/500.http"
|
||||||
$hy_500_erb = 'haproxy_cd/errors/500_http.erb'
|
$hy_500_erb = 'confdroid_haproxy/errors/500_http.erb'
|
||||||
$hy_502_file = "${hy_errors_dir}/502.http"
|
$hy_502_file = "${hy_errors_dir}/502.http"
|
||||||
$hy_502_erb = 'haproxy_cd/errors/502_http.erb'
|
$hy_502_erb = 'confdroid_haproxy/errors/502_http.erb'
|
||||||
$hy_503_file = "${hy_errors_dir}/503.http"
|
$hy_503_file = "${hy_errors_dir}/503.http"
|
||||||
$hy_503_erb = 'haproxy_cd/errors/503_http.erb'
|
$hy_503_erb = 'confdroid_haproxy/errors/503_http.erb'
|
||||||
$hy_504_file = "${hy_errors_dir}/504.http"
|
$hy_504_file = "${hy_errors_dir}/504.http"
|
||||||
$hy_504_erb = 'haproxy_cd/errors/504_http.erb'
|
$hy_504_erb = 'confdroid_haproxy/errors/504_http.erb'
|
||||||
|
|
||||||
# includes must be last
|
# includes must be last
|
||||||
include haproxy_cd::main::config
|
include confdroid_haproxy::main::config
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
## haproxy_cd::server::proxy.pp
|
## confdroid_haproxy::server::proxy.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
# Author: Arne Teuke (arne_teuke@ConfDroid.com)
|
||||||
# @summary Define manages the proxies for haproxy_cd.
|
# @summary Define manages the proxies for confdroid_haproxy.
|
||||||
# @param [String] haproxy_fqdn the fqdn of the haproxy server in question.
|
# @param [String] haproxy_fqdn the fqdn of the haproxy server in question.
|
||||||
# @param [String] frontend_name the name for the frontend section rule.
|
# @param [String] frontend_name the name for the frontend section rule.
|
||||||
# @param [String] frontend_order where the concat should appear in the file.
|
# @param [String] frontend_order where the concat should appear in the file.
|
||||||
@@ -31,7 +31,7 @@
|
|||||||
# @param [String] be_http_request value for a backend http request
|
# @param [String] be_http_request value for a backend http request
|
||||||
# @param [String] be_acl_rule value for a backend acl rule
|
# @param [String] be_acl_rule value for a backend acl rule
|
||||||
###############################################################################
|
###############################################################################
|
||||||
define haproxy_cd::server::proxy (
|
define confdroid_haproxy::server::proxy (
|
||||||
|
|
||||||
String $haproxy_fqdn = undef,
|
String $haproxy_fqdn = undef,
|
||||||
String $frontend_name = undef,
|
String $frontend_name = undef,
|
||||||
@@ -63,9 +63,9 @@ define haproxy_cd::server::proxy (
|
|||||||
$fqdn = $facts['networking']['fqdn']
|
$fqdn = $facts['networking']['fqdn']
|
||||||
|
|
||||||
$hy_main_config = '/etc/haproxy/haproxy.cfg'
|
$hy_main_config = '/etc/haproxy/haproxy.cfg'
|
||||||
$hy_frontendrule = 'haproxy_cd/haproxy_frontend_rule.erb'
|
$hy_frontendrule = 'confdroid_haproxy/haproxy_frontend_rule.erb'
|
||||||
$hy_backendrule = 'haproxy_cd/haproxy_backend_rule.erb'
|
$hy_backendrule = 'confdroid_haproxy/haproxy_backend_rule.erb'
|
||||||
$hy_acl_rule = 'haproxy_cd/haproxy_acl_rule.erb'
|
$hy_acl_rule = 'confdroid_haproxy/haproxy_acl_rule.erb'
|
||||||
|
|
||||||
# Ensure acl_rule_front and acl_rule_back are arrays
|
# Ensure acl_rule_front and acl_rule_back are arrays
|
||||||
$acl_rule_front_array = split($acl_rule_front, ';')
|
$acl_rule_front_array = split($acl_rule_front, ';')
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
## haproxy_cd::server::service.pp
|
## confdroid_haproxy::server::service.pp
|
||||||
# Module name: haproxy_cd
|
# Module name: confdroid_haproxy
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
# Author: Arne Teuke (arne_teuke@confdroid.com)
|
||||||
# @summary Class manages the service(s) for haproxy_cd.
|
# @summary Class manages the service(s) for confdroid_haproxy.
|
||||||
#############################################################################
|
#############################################################################
|
||||||
class haproxy_cd::server::service (
|
class confdroid_haproxy::server::service (
|
||||||
|
|
||||||
) inherits haproxy_cd::params {
|
) inherits confdroid_haproxy::params {
|
||||||
if $fqdn == $hy_host_fqdn {
|
if $fqdn == $hy_host_fqdn {
|
||||||
require haproxy_cd::firewall::iptables
|
require confdroid_haproxy::firewall::iptables
|
||||||
require haproxy_cd::main::files
|
require confdroid_haproxy::main::files
|
||||||
|
|
||||||
service { $hy_service:
|
service { $hy_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
|||||||
@@ -7,10 +7,6 @@ global
|
|||||||
log <%= @hy_log_local1 %>
|
log <%= @hy_log_local1 %>
|
||||||
<% if @hy_hard_stop == true -%>
|
<% if @hy_hard_stop == true -%>
|
||||||
hard-stop-after <%= @hy_hard_stop_value %>
|
hard-stop-after <%= @hy_hard_stop_value %>
|
||||||
<% end -%>
|
|
||||||
<% if @hy_show_stats == true -%>
|
|
||||||
stats socket /var/lib/haproxy/stats
|
|
||||||
stats timeout 30s
|
|
||||||
<% end -%>
|
<% end -%>
|
||||||
chroot <%= @hy_chroot %>
|
chroot <%= @hy_chroot %>
|
||||||
pidfile <%= @hy_pid %>
|
pidfile <%= @hy_pid %>
|
||||||
@@ -55,7 +51,7 @@ defaults
|
|||||||
maxconn <%= @hy_maxconn %>
|
maxconn <%= @hy_maxconn %>
|
||||||
|
|
||||||
listen stats
|
listen stats
|
||||||
bind 127.0.0.1:8404 # Bind to localhost if only local access is needed #
|
bind *:8404
|
||||||
mode http
|
mode http
|
||||||
stats enable
|
stats enable
|
||||||
stats uri /haproxy?stats
|
stats uri /haproxy?stats
|
||||||
|
|||||||
Reference in New Issue
Block a user