adjust everything for compliance with puppet-lint

This commit is contained in:
Arne Teuke
2025-05-15 14:19:35 +02:00
parent 9d50c2888d
commit c956708cdb
40 changed files with 68 additions and 9329 deletions

View File

@@ -1,249 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: README
&mdash; Documentation by YARD 0.9.26
</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 = "";
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="file_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</a> &raquo;
<span class="title">File: README</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"><div id='filecontents'>
<h1 id="label-Readme">Readme</h1>
<p><a href="https://pipelines.confdroid.com/job/haproxy_cd/"><img
src="https://pipelines.confdroid.com/buildStatus/icon?job=haproxy_cd"></a>|</p>
<p>[[<em>TOC</em>]]</p>
<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>haproxy_cd</code> automates installation and configuration of
<code>HA proxy</code> including self-healing, monitoring and firewall etc.</p>
<h2 id="label-WARNING">WARNING</h2>
<p><strong><em>Attention: Never use this puppet module on systems which have
been previously configured manually. It is impossible to predict how and
what would have been configured, hence previous configurations outside the
scope of this module may be overwritten! Automated configurations require a
test environment to verify that the module suits the purpose intended by
the user, as well as tune the parameters, before deploying into live
production</em></strong></p>
<h2 id="label-Features">Features</h2>
<p>INSTALLATION</p>
<ul><li>
<p>install rpm binaries</p>
</li></ul>
<p>CONFIGURATION</p>
<ul><li>
<p>manage haproxy user</p>
</li><li>
<p>manage directories (file system permissions, selinux context)</p>
</li><li>
<p>manage files (file system permissions, content, selinux context)</p>
</li><li>
<p>manage proxy instances through a define</p>
</li><li>
<p>front-end options</p>
</li><li>
<p>back-end options</p>
</li><li>
<p>ACL options</p>
</li><li>
<p>manage fail2ban integration (optional, requires fail2ban_cd module)</p>
</li></ul>
<p>SERVICE</p>
<ul><li>
<p>manage haproxy service</p>
</li><li>
<p>restart service after changes in the configuration</p>
</li></ul>
<h2 id="label-Dependencies">Dependencies</h2>
<p>All dependencies must be included in the catalogue.</p>
<ul><li>
<p><a
href="https://sourcecode.confdroid.com/12WW1160/cd_resources">cd_resources</a>
for managing yum base repos</p>
</li><li>
<p><a href="https://sourcecode.confdroid.com/12ww1160/cd_concat">cd_concat</a>
or <a href="https://github.com/puppetlabs/puppetlabs-concat">concat</a> for
managing file fragments</p>
</li></ul>
<h2 id="label-Deployment">Deployment</h2>
<ul><li>
<p>native Puppet deployment</p>
</li></ul>
<p>via site.pp or nodes.pp</p>
<pre class="code ruby"><code class="ruby">node &#39;example.example.net&#39; {
include haproxy_cd
}
</code></pre>
<ul><li>
<p>through Foreman:</p>
</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>See <a
href="https://confdroid.com/2017/05/deploying-our-puppet-modules/">more
details about class deployment on Confdroid.com</a>.</p>
<h2 id="label-Parameters">Parameters</h2>
<p>The parameters are documented via puppet strings and <a
href="/docs/index.html">listed here</a>. Simply open in web browser.</p>
<h2 id="label-Proxy+Configuration">Proxy Configuration</h2>
<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 { &#39;testing&#39;:
haproxy_fqdn =&gt; &#39;node.example.net&#39;,
frontend_name =&gt; &#39;test01-frontend&#39;,
frontend_mode =&gt; &#39;http&#39;,
acl_rule =&gt; [&#39;too_fast fe_sess_rate ge 10&#39;,
&#39;network_allowed src 0.0.0.0/0&#39;],
backend_name =&gt; &#39;test01-backend&#39;,
}
</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-SELINUX">SELINUX</h2>
<p>All files and directories are configured with correct selinux context. If
selinux is disabled, these contexts are ignored.</p>
<h2 id="label-Known+Problems">Known Problems</h2>
<h2 id="label-Support">Support</h2>
<ul><li>
<p>OS: Rocky 9</p>
</li><li>
<p>Puppet 8</p>
</li></ul>
<h2 id="label-Tests">Tests</h2>
<ul><li>
<p>Puppet Lint</p>
</li><li>
<p>excluded tests:</p>
<ul><li>
<p><code>--no-class_inherits_from_params_class-check</code>:relevant only to
non-supported outdated puppet versions</p>
</li><li>
<p><code>--no-variable_scope-check</code>: not applicable as we are inheriting
parameters from params class. the lint check does not distinguish between
facts and inherited parameters.</p>
</li><li>
<p><code>--no-80chars-check</code>: it is not always possible to stay within
80 characters, although typically only occurring on the parameter vault
<code>params.pp</code>.</p>
</li><li>
<p><code>--no-arrow_alignment-check</code>: this check leads to actually not
having am easily readable arrow alignment, as this checks <code>per
block</code>, not per class.</p>
</li></ul>
</li><li>
<p>Puppet Parser</p>
</li><li>
<p>ERB Template Parser</p>
</li><li>
<p>Sonar Quality Gate</p>
</li></ul>
<h2 id="label-Contact+Us">Contact Us</h2>
<p><a href="https://confdroid.com/contact/">contact Us</a></p>
<h2 id="label-Disclaimer">Disclaimer</h2>
<p>ConfDroid as entity is entirely independent from Puppet. We provide custom
configuration modules, written for specific purposes and specific
environments. The modules are tested and supported only as documented, and
require testing in designated environments (i.e. lab or development
environments) for parameter tuning etc. before deploying into production
environments.</p>
</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>