Merge branch 'jenkins-build-102' into 'master'
Auto-merge for build 102 See merge request puppet/puppet_cd!98
This commit is contained in:
33
README.md
33
README.md
@@ -17,15 +17,34 @@ This module is also designed to work with External Node Classifiers (ENC), for i
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
|
|
||||||
* if the host FQDN matches your specified Puppet master via `$pt_pm_fqdn`, it installs and configures a puppetmaster.
|
### Puppet server and agent
|
||||||
On your puppetmaster, If you set `$pt_use_r10k`to `true`, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.
|
|
||||||
If you set `$pt_use_r10k_webhook`to `true`, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.
|
|
||||||
|
|
||||||
* open firewall ports depending on fqdn choices
|
* if the host FQDN matches your specified Puppet master via `$pt_pm_fqdn`, it installs and configures a puppetmaster ready for serving with Foreman as ENC ( Foreman not yet included).
|
||||||
* start services as required
|
* Any other system becomes a puppet agent.
|
||||||
* manage directories
|
|
||||||
|
### R10k service (optional)
|
||||||
|
|
||||||
|
* install r10k service on your puppetmaster.
|
||||||
|
If you set `$pt_use_r10k`to `true`, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.
|
||||||
|
|
||||||
|
### R10k Web hook
|
||||||
|
|
||||||
|
* installs a webhook listener
|
||||||
|
If you set `$pt_use_r10k_webhook`to `true`, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.
|
||||||
|
|
||||||
|
### Puppetdb
|
||||||
|
* to do
|
||||||
* install node.rb from the foreman for puppetdb
|
* install node.rb from the foreman for puppetdb
|
||||||
* manage puppet user settings (optional)
|
|
||||||
|
### Firewall
|
||||||
|
|
||||||
|
* open firewall ports depending on choices above
|
||||||
|
|
||||||
|
### Directories, Files and Services,
|
||||||
|
* manage directories and required files including
|
||||||
|
permissions and selinux context (todo)
|
||||||
|
* start services as required
|
||||||
|
|
||||||
|
|
||||||
## Support
|
## Support
|
||||||
|
|
||||||
|
|||||||
@@ -98,11 +98,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::puppet_cd::main::user (puppet_class)">puppet_cd::main::user</a></span>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aparams.html" title="puppet_classes::puppet_cd::params (puppet_class)">puppet_cd::params</a></span>
|
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aparams.html" title="puppet_classes::puppet_cd::params (puppet_class)">puppet_cd::params</a></span>
|
||||||
|
|
||||||
|
|||||||
@@ -75,18 +75,41 @@
|
|||||||
<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>
|
<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>
|
<h2 id="label-Features">Features</h2>
|
||||||
|
|
||||||
|
<h3 id="label-Puppet+server+and+agent">Puppet server and agent</h3>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster. On your puppetmaster, If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile. If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster ready for serving with Foreman as ENC ( Foreman not yet included).</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>open firewall ports depending on fqdn choices</p>
|
<p>Any other system becomes a puppet agent.</p>
|
||||||
</li><li>
|
</li></ul>
|
||||||
<p>start services as required</p>
|
|
||||||
</li><li>
|
<h3 id="label-R10k+service+-28optional-29">R10k service (optional)</h3>
|
||||||
<p>manage directories</p>
|
<ul><li>
|
||||||
|
<p>install r10k service on your puppetmaster. If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-R10k+Web+hook">R10k Web hook</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>installs a webhook listener If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Puppetdb">Puppetdb</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>to do</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>install node.rb from the foreman for puppetdb</p>
|
<p>install node.rb from the foreman for puppetdb</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Firewall">Firewall</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>open firewall ports depending on choices above</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Directories-2C+Files+and+Services-2C">Directories, Files and Services,</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manage puppet user settings (optional)</p>
|
<p>start services as required</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Support">Support</h2>
|
<h2 id="label-Support">Support</h2>
|
||||||
|
|||||||
@@ -75,18 +75,41 @@
|
|||||||
<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>
|
<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>
|
<h2 id="label-Features">Features</h2>
|
||||||
|
|
||||||
|
<h3 id="label-Puppet+server+and+agent">Puppet server and agent</h3>
|
||||||
<ul><li>
|
<ul><li>
|
||||||
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster. On your puppetmaster, If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile. If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
<p>if the host FQDN matches your specified Puppet master via <code>$pt_pm_fqdn</code>, it installs and configures a puppetmaster ready for serving with Foreman as ENC ( Foreman not yet included).</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>open firewall ports depending on fqdn choices</p>
|
<p>Any other system becomes a puppet agent.</p>
|
||||||
</li><li>
|
</li></ul>
|
||||||
<p>start services as required</p>
|
|
||||||
</li><li>
|
<h3 id="label-R10k+service+-28optional-29">R10k service (optional)</h3>
|
||||||
<p>manage directories</p>
|
<ul><li>
|
||||||
|
<p>install r10k service on your puppetmaster. If you set <code>$pt_use_r10k</code>to <code>true</code>, it also installs r10k to connect to a control repo and manage the code available to clients via Puppetfile.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-R10k+Web+hook">R10k Web hook</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>installs a webhook listener If you set <code>$pt_use_r10k_webhook</code>to <code>true</code>, it also installs a simple webhook listener to watch for post_hooks from gitlab, and triggers the r10k deployment.</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Puppetdb">Puppetdb</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>to do</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>install node.rb from the foreman for puppetdb</p>
|
<p>install node.rb from the foreman for puppetdb</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Firewall">Firewall</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>open firewall ports depending on choices above</p>
|
||||||
|
</li></ul>
|
||||||
|
|
||||||
|
<h3 id="label-Directories-2C+Files+and+Services-2C">Directories, Files and Services,</h3>
|
||||||
|
<ul><li>
|
||||||
|
<p>manage directories and required files including permissions and selinux context (todo)</p>
|
||||||
</li><li>
|
</li><li>
|
||||||
<p>manage puppet user settings (optional)</p>
|
<p>start services as required</p>
|
||||||
</li></ul>
|
</li></ul>
|
||||||
|
|
||||||
<h2 id="label-Support">Support</h2>
|
<h2 id="label-Support">Support</h2>
|
||||||
|
|||||||
@@ -78,28 +78,21 @@
|
|||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::puppet_cd::main::user" class="odd">
|
<li id="object_puppet_classes::puppet_cd::params" class="odd">
|
||||||
<div class="item">
|
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::puppet_cd::main::user (puppet_class)">puppet_cd::main::user</a></span>
|
|
||||||
</div>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::puppet_cd::params" class="even">
|
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aparams.html" title="puppet_classes::puppet_cd::params (puppet_class)">puppet_cd::params</a></span>
|
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aparams.html" title="puppet_classes::puppet_cd::params (puppet_class)">puppet_cd::params</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::puppet_cd::r10k::install" class="odd">
|
<li id="object_puppet_classes::puppet_cd::r10k::install" class="even">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::puppet_cd::r10k::install (puppet_class)">puppet_cd::r10k::install</a></span>
|
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Ar10k_3A_3Ainstall.html" title="puppet_classes::puppet_cd::r10k::install (puppet_class)">puppet_cd::r10k::install</a></span>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
<li id="object_puppet_classes::puppet_cd::server::service" class="even">
|
<li id="object_puppet_classes::puppet_cd::server::service" class="odd">
|
||||||
<div class="item">
|
<div class="item">
|
||||||
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::puppet_cd::server::service (puppet_class)">puppet_cd::server::service</a></span>
|
<span class='object_link'><a href="puppet_classes/puppet_cd_3A_3Aserver_3A_3Aservice.html" title="puppet_classes::puppet_cd::server::service (puppet_class)">puppet_cd::server::service</a></span>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -124,7 +124,14 @@
|
|||||||
26
|
26
|
||||||
27
|
27
|
||||||
28
|
28
|
||||||
29</pre>
|
29
|
||||||
|
30
|
||||||
|
31
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
36</pre>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
||||||
@@ -152,6 +159,13 @@ class puppet_cd::firewall::iptables (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($pt_puppetdb_fqdn == $fqdn) and ($pt_use_puppetdb == true) {
|
||||||
|
firewall { "3${pt_https_port} open port ${pt_https_port}":
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pt_https_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -69,8 +69,6 @@
|
|||||||
|
|
||||||
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Adirs.html" title="puppet_classes::puppet_cd::main::dirs (puppet_class)">puppet_cd::main::dirs</a></span><br/>
|
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Adirs.html" title="puppet_classes::puppet_cd::main::dirs (puppet_class)">puppet_cd::main::dirs</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Auser.html" title="puppet_classes::puppet_cd::main::user (puppet_class)">puppet_cd::main::user</a></span><br/>
|
|
||||||
|
|
||||||
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Afiles.html" title="puppet_classes::puppet_cd::main::files (puppet_class)">puppet_cd::main::files</a></span><br/>
|
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Afiles.html" title="puppet_classes::puppet_cd::main::files (puppet_class)">puppet_cd::main::files</a></span><br/>
|
||||||
|
|
||||||
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::puppet_cd::main::config (puppet_class)">puppet_cd::main::config</a></span><br/>
|
<span class='object_link'><a href="puppet_cd_3A_3Amain_3A_3Aconfig.html" title="puppet_classes::puppet_cd::main::config (puppet_class)">puppet_cd::main::config</a></span><br/>
|
||||||
@@ -240,13 +238,13 @@
|
|||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>pt_server_pkg</span>
|
<span class='name'>pt_puppetdb_pkg</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
<span class='type'>(<tt>Array</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'puppetserver'</tt>)</em>
|
<em class="default">(defaults to: <tt>['puppetdb-termini', 'puppetdb']</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
—
|
—
|
||||||
@@ -274,78 +272,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_user</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'puppet'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the puppet user</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_user_comment</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'puppetserver daemon'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the user comment</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_user_home</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'/opt/puppetlabs/server/data/puppetserver'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the user home</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_user_shell</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'/sbin/nologin'</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>the user shell</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>pt_environment</span>
|
<span class='name'>pt_environment</span>
|
||||||
@@ -940,24 +866,6 @@
|
|||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
|
|
||||||
<span class='name'>pt_manage_user</span>
|
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>false</tt>)</em>
|
|
||||||
|
|
||||||
|
|
||||||
—
|
|
||||||
<div class='inline'>
|
|
||||||
<p>whether to manage the puppet user</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>pt_r10k_webhook_port</span>
|
<span class='name'>pt_r10k_webhook_port</span>
|
||||||
@@ -1014,15 +922,182 @@
|
|||||||
|
|
||||||
<li>
|
<li>
|
||||||
|
|
||||||
<span class='name'>pt_puppetdb_pkg</span>
|
<span class='name'>pt_db_subname</span>
|
||||||
|
|
||||||
|
|
||||||
<span class='type'>(<tt>String</tt>)</span>
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
<em class="default">(defaults to: <tt>'puppetdb-termini'</tt>)</em>
|
<em class="default">(defaults to: <tt>'//localhost:5432/puppetdb'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the url for the database connection</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_db_username</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'foobar'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the username for the database connection</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_db_password</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'foobar'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>the password for the database connection</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_gc_interval</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'60'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>How often (in minutes) to compact the database</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_http_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8080'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>Port to listen on for clear-text HTTP.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_https_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8081'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>Port to listen on for HTTPs connections.</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_ssl_host</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'0.0.0.0'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>IP address to listen on for HTTPS connections</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_repl_on</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>Boolean</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>false</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>toggle the remote repl true false</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_repl_port</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'8082'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>What port the REPL should listen on</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
|
||||||
|
<span class='name'>pt_repl_host</span>
|
||||||
|
|
||||||
|
|
||||||
|
<span class='type'>(<tt>String</tt>)</span>
|
||||||
|
|
||||||
|
|
||||||
|
<em class="default">(defaults to: <tt>'127.0.0.1'</tt>)</em>
|
||||||
|
|
||||||
|
|
||||||
|
—
|
||||||
|
<div class='inline'>
|
||||||
|
<p>IP address to listen on</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
@@ -1036,11 +1111,6 @@
|
|||||||
<pre class="lines">
|
<pre class="lines">
|
||||||
|
|
||||||
|
|
||||||
59
|
|
||||||
60
|
|
||||||
61
|
|
||||||
62
|
|
||||||
63
|
|
||||||
64
|
64
|
||||||
65
|
65
|
||||||
66
|
66
|
||||||
@@ -1152,10 +1222,19 @@
|
|||||||
172
|
172
|
||||||
173
|
173
|
||||||
174
|
174
|
||||||
175</pre>
|
175
|
||||||
|
176
|
||||||
|
177
|
||||||
|
178
|
||||||
|
179
|
||||||
|
180
|
||||||
|
181
|
||||||
|
182
|
||||||
|
183
|
||||||
|
184</pre>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 59</span>
|
<pre class="code"><span class="info file"># File 'manifests/params.pp', line 64</span>
|
||||||
|
|
||||||
class puppet_cd::params (
|
class puppet_cd::params (
|
||||||
|
|
||||||
@@ -1168,18 +1247,10 @@ class puppet_cd::params (
|
|||||||
String $pt_pkg_ensure = 'present',
|
String $pt_pkg_ensure = 'present',
|
||||||
String $pt_agent_pkg = 'puppet-agent',
|
String $pt_agent_pkg = 'puppet-agent',
|
||||||
String $pt_server_pkg = 'puppetserver',
|
String $pt_server_pkg = 'puppetserver',
|
||||||
String $pt_puppetdb_pkg = 'puppetdb-termini',
|
Array $pt_puppetdb_pkg = ['puppetdb-termini', 'puppetdb'],
|
||||||
Array $pt_r10k_pkg = ['ruby','ruby-devel','rubygems','gcc','make'],
|
Array $pt_r10k_pkg = ['ruby','ruby-devel','rubygems','gcc','make'],
|
||||||
Array $pt_r10k_webhook_pkg = ['webrick', 'r10k_gitlab_webhook'],
|
Array $pt_r10k_webhook_pkg = ['webrick', 'r10k_gitlab_webhook'],
|
||||||
|
|
||||||
# user settings
|
|
||||||
## puppet user
|
|
||||||
Boolean $pt_manage_user = false,
|
|
||||||
String $pt_user = 'puppet',
|
|
||||||
String $pt_user_comment = 'puppetserver daemon',
|
|
||||||
String $pt_user_home = '/opt/puppetlabs/server/data/puppetserver',
|
|
||||||
String $pt_user_shell = '/sbin/nologin',
|
|
||||||
|
|
||||||
# templates
|
# templates
|
||||||
## puppet
|
## puppet
|
||||||
String $pt_environment = 'production',
|
String $pt_environment = 'production',
|
||||||
@@ -1213,6 +1284,18 @@ class puppet_cd::params (
|
|||||||
# puppetdb
|
# puppetdb
|
||||||
String $pt_ssl_port = '8081',
|
String $pt_ssl_port = '8081',
|
||||||
Boolean $pt_soft_write_failure = false,
|
Boolean $pt_soft_write_failure = false,
|
||||||
|
String $pt_db_subname = '//localhost:5432/puppetdb',
|
||||||
|
String $pt_db_username = 'foobar',
|
||||||
|
String $pt_db_password = 'foobar',
|
||||||
|
String $pt_gc_interval = '60',
|
||||||
|
## jetty
|
||||||
|
String $pt_http_port = '8080',
|
||||||
|
String $pt_https_port = '8081',
|
||||||
|
String $pt_ssl_host = '0.0.0.0',
|
||||||
|
## repl
|
||||||
|
Boolean $pt_repl_on = false,
|
||||||
|
String $pt_repl_port = '8082',
|
||||||
|
String $pt_repl_host = '127.0.0.1',
|
||||||
|
|
||||||
# r10k
|
# r10k
|
||||||
Boolean $pt_use_r10k = false,
|
Boolean $pt_use_r10k = false,
|
||||||
|
|||||||
@@ -137,7 +137,17 @@
|
|||||||
39
|
39
|
||||||
40
|
40
|
||||||
41
|
41
|
||||||
42</pre>
|
42
|
||||||
|
43
|
||||||
|
44
|
||||||
|
45
|
||||||
|
46
|
||||||
|
47
|
||||||
|
48
|
||||||
|
49
|
||||||
|
50
|
||||||
|
51
|
||||||
|
52</pre>
|
||||||
</td>
|
</td>
|
||||||
<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>
|
||||||
@@ -158,7 +168,6 @@ class puppet_cd::server::service (
|
|||||||
# manage puppet server service
|
# manage puppet server service
|
||||||
if $fqdn == $pt_pm_fqdn {
|
if $fqdn == $pt_pm_fqdn {
|
||||||
require puppet_cd::firewall::iptables
|
require puppet_cd::firewall::iptables
|
||||||
require puppet_cd::main::user
|
|
||||||
|
|
||||||
service { $pt_server_service:
|
service { $pt_server_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
@@ -166,11 +175,10 @@ class puppet_cd::server::service (
|
|||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# manage webhook service
|
# manage webhook service
|
||||||
if $pt_use_r10k_webhook == true {
|
if $pt_use_r10k_webhook == true {
|
||||||
require puppet_cd::r10k::install
|
require puppet_cd::r10k::install
|
||||||
|
|
||||||
service { $pt_r10k_webhook_service:
|
service { $pt_r10k_webhook_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
@@ -178,6 +186,18 @@ class puppet_cd::server::service (
|
|||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||||
|
require puppet_cd::firewall::iptables
|
||||||
|
|
||||||
|
service { $pt_db_service:
|
||||||
|
ensure => running,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
}</pre>
|
}</pre>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -26,4 +26,11 @@ class puppet_cd::firewall::iptables (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ($pt_puppetdb_fqdn == $fqdn) and ($pt_use_puppetdb == true) {
|
||||||
|
firewall { "3${pt_https_port} open port ${pt_https_port}":
|
||||||
|
proto => 'tcp',
|
||||||
|
dport => $pt_https_port,
|
||||||
|
jump => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
## puppet_cd::main::user.pp
|
|
||||||
# Module name: puppet_cd
|
|
||||||
# Author: Arne Teuke (arne_teuke@confdroid)
|
|
||||||
# @summary Class manages user settings for the puppet_cd module.
|
|
||||||
###############################################################################
|
|
||||||
class puppet_cd::main::user (
|
|
||||||
|
|
||||||
) inherits puppet_cd::params {
|
|
||||||
if ($fqdn == $pt_pm_fqdn) and ($pt_manage_user == true) {
|
|
||||||
user { $pt_user:
|
|
||||||
ensure => present,
|
|
||||||
name => $pt_user,
|
|
||||||
allowdupe => false,
|
|
||||||
comment => $pt_user_comment,
|
|
||||||
gid => $pt_user,
|
|
||||||
managehome => true,
|
|
||||||
home => $pt_user_home,
|
|
||||||
shell => $pt_user_shell,
|
|
||||||
}
|
|
||||||
|
|
||||||
group { $pt_user:
|
|
||||||
ensure => present,
|
|
||||||
name => $pt_user,
|
|
||||||
allowdupe => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -10,12 +10,8 @@
|
|||||||
# @param [String] pt_pkg_ensure valid: "present", "latest", "v1.2.3"
|
# @param [String] pt_pkg_ensure valid: "present", "latest", "v1.2.3"
|
||||||
# @param [String] pt_agent_pkg the packages for agents to install
|
# @param [String] pt_agent_pkg the packages for agents to install
|
||||||
# @param [String] pt_server_pkg the server packages to install
|
# @param [String] pt_server_pkg the server packages to install
|
||||||
# @param [String] pt_server_pkg the puppetdb packages to install
|
# @param [String] pt_puppetdb_pkg the puppetdb packages to install
|
||||||
# @param [Array] pt_r10k_pkg the packages for r10k to install
|
# @param [Array] pt_r10k_pkg the packages for r10k to install
|
||||||
# @param [String] pt_user the puppet user
|
|
||||||
# @param [String] pt_user_comment the user comment
|
|
||||||
# @param [String] pt_user_home the user home
|
|
||||||
# @param [String] pt_user_shell the user shell
|
|
||||||
# @param [String] pt_environment the environment
|
# @param [String] pt_environment the environment
|
||||||
# @param [Boolean] pt_basemodulepath the base module path
|
# @param [Boolean] pt_basemodulepath the base module path
|
||||||
# @param [String] pt_logdir the log directory
|
# @param [String] pt_logdir the log directory
|
||||||
@@ -51,10 +47,19 @@
|
|||||||
# @param [Boolean] pt_r10k_prefix the r10k prefix. defaults to false
|
# @param [Boolean] pt_r10k_prefix the r10k prefix. defaults to false
|
||||||
# @param [String] pt_r10k_basedir the base directory for r10k.yaml
|
# @param [String] pt_r10k_basedir the base directory for r10k.yaml
|
||||||
# @param [Array] pt_r10k_webhook_pkg the packages for the r10k webhook
|
# @param [Array] pt_r10k_webhook_pkg the packages for the r10k webhook
|
||||||
# @param [Boolean] pt_manage_user whether to manage the puppet user
|
|
||||||
# @param [String] pt_r10k_webhook_port the port for the webhook listener
|
# @param [String] pt_r10k_webhook_port the port for the webhook listener
|
||||||
# @param [String] pt_ssl_port the port for the puppetdb ssl port
|
# @param [String] pt_ssl_port the port for the puppetdb ssl port
|
||||||
# @param [Boolean] pt_soft_write_failure whether to allow soft_write_failure
|
# @param [Boolean] pt_soft_write_failure whether to allow soft_write_failure
|
||||||
|
# @param [String] pt_db_subname the url for the database connection
|
||||||
|
# @param [String] pt_db_username the username for the database connection
|
||||||
|
# @param [String] pt_db_password the password for the database connection
|
||||||
|
# @param [String] pt_gc_interval How often (in minutes) to compact the database
|
||||||
|
# @param [String] pt_http_port Port to listen on for clear-text HTTP.
|
||||||
|
# @param [String] pt_https_port Port to listen on for HTTPs connections.
|
||||||
|
# @param [String] pt_ssl_host IP address to listen on for HTTPS connections
|
||||||
|
# @param [Boolean] pt_repl_on toggle the remote repl true false
|
||||||
|
# @param [String] pt_repl_port What port the REPL should listen on
|
||||||
|
# @param [String] pt_repl_host IP address to listen on
|
||||||
###############################################################################
|
###############################################################################
|
||||||
class puppet_cd::params (
|
class puppet_cd::params (
|
||||||
|
|
||||||
@@ -67,18 +72,10 @@ class puppet_cd::params (
|
|||||||
String $pt_pkg_ensure = 'present',
|
String $pt_pkg_ensure = 'present',
|
||||||
String $pt_agent_pkg = 'puppet-agent',
|
String $pt_agent_pkg = 'puppet-agent',
|
||||||
String $pt_server_pkg = 'puppetserver',
|
String $pt_server_pkg = 'puppetserver',
|
||||||
String $pt_puppetdb_pkg = 'puppetdb-termini',
|
Array $pt_puppetdb_pkg = ['puppetdb-termini', 'puppetdb'],
|
||||||
Array $pt_r10k_pkg = ['ruby','ruby-devel','rubygems','gcc','make'],
|
Array $pt_r10k_pkg = ['ruby','ruby-devel','rubygems','gcc','make'],
|
||||||
Array $pt_r10k_webhook_pkg = ['webrick', 'r10k_gitlab_webhook'],
|
Array $pt_r10k_webhook_pkg = ['webrick', 'r10k_gitlab_webhook'],
|
||||||
|
|
||||||
# user settings
|
|
||||||
## puppet user
|
|
||||||
Boolean $pt_manage_user = false,
|
|
||||||
String $pt_user = 'puppet',
|
|
||||||
String $pt_user_comment = 'puppetserver daemon',
|
|
||||||
String $pt_user_home = '/opt/puppetlabs/server/data/puppetserver',
|
|
||||||
String $pt_user_shell = '/sbin/nologin',
|
|
||||||
|
|
||||||
# templates
|
# templates
|
||||||
## puppet
|
## puppet
|
||||||
String $pt_environment = 'production',
|
String $pt_environment = 'production',
|
||||||
@@ -112,6 +109,18 @@ class puppet_cd::params (
|
|||||||
# puppetdb
|
# puppetdb
|
||||||
String $pt_ssl_port = '8081',
|
String $pt_ssl_port = '8081',
|
||||||
Boolean $pt_soft_write_failure = false,
|
Boolean $pt_soft_write_failure = false,
|
||||||
|
String $pt_db_subname = '//localhost:5432/puppetdb',
|
||||||
|
String $pt_db_username = 'foobar',
|
||||||
|
String $pt_db_password = 'foobar',
|
||||||
|
String $pt_gc_interval = '60',
|
||||||
|
## jetty
|
||||||
|
String $pt_http_port = '8080',
|
||||||
|
String $pt_https_port = '8081',
|
||||||
|
String $pt_ssl_host = '0.0.0.0',
|
||||||
|
## repl
|
||||||
|
Boolean $pt_repl_on = false,
|
||||||
|
String $pt_repl_port = '8082',
|
||||||
|
String $pt_repl_host = '127.0.0.1',
|
||||||
|
|
||||||
# r10k
|
# r10k
|
||||||
Boolean $pt_use_r10k = false,
|
Boolean $pt_use_r10k = false,
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ class puppet_cd::server::service (
|
|||||||
# manage puppet server service
|
# manage puppet server service
|
||||||
if $fqdn == $pt_pm_fqdn {
|
if $fqdn == $pt_pm_fqdn {
|
||||||
require puppet_cd::firewall::iptables
|
require puppet_cd::firewall::iptables
|
||||||
require puppet_cd::main::user
|
|
||||||
|
|
||||||
service { $pt_server_service:
|
service { $pt_server_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
@@ -27,11 +26,10 @@ class puppet_cd::server::service (
|
|||||||
hasrestart => true,
|
hasrestart => true,
|
||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
# manage webhook service
|
# manage webhook service
|
||||||
if $pt_use_r10k_webhook == true {
|
if $pt_use_r10k_webhook == true {
|
||||||
require puppet_cd::r10k::install
|
require puppet_cd::r10k::install
|
||||||
|
|
||||||
service { $pt_r10k_webhook_service:
|
service { $pt_r10k_webhook_service:
|
||||||
ensure => running,
|
ensure => running,
|
||||||
hasstatus => true,
|
hasstatus => true,
|
||||||
@@ -39,4 +37,16 @@ class puppet_cd::server::service (
|
|||||||
enable => true,
|
enable => true,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($pt_use_puppetdb == true) and ($pt_puppetdb_fqdn == $fqdn) {
|
||||||
|
require puppet_cd::firewall::iptables
|
||||||
|
|
||||||
|
service { $pt_db_service:
|
||||||
|
ensure => running,
|
||||||
|
hasstatus => true,
|
||||||
|
hasrestart => true,
|
||||||
|
enable => true,
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user