Skip to content

Commit 468647c

Browse files
committed
Add basic mpm_event docs, fix formatting, appease older ruby
1 parent 5ac2f34 commit 468647c

3 files changed

Lines changed: 39 additions & 25 deletions

File tree

README.md

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
* [Class: apache::default_mods](#class-apachedefault_mods)
1717
* [Defined Type: apache::mod](#defined-type-apachemod)
1818
* [Classes: apache::mod::*](#classes-apachemodname)
19+
* [Class: apache::mod::event](#class-apachemodevent)
1920
* [Class: apache::mod::info](#class-apachemodinfo)
2021
* [Class: apache::mod::pagespeed](#class-apachemodpagespeed)
2122
* [Class: apache::mod::php](#class-apachemodphp)
@@ -525,7 +526,7 @@ There are many `apache::mod::[name]` classes within this module that can be decl
525526
* `dev`
526527
* `dir`*
527528
* `disk_cache`
528-
* `event`
529+
* `event`(see [`apache::mod::event`](#class-apachemodevent) below)
529530
* `expires`
530531
* `fastcgi`
531532
* `fcgid`
@@ -569,11 +570,26 @@ Modules noted with a * indicate that the module has settings and, thus, a templa
569570

570571
The modules mentioned above, and other Apache modules that have templates, cause template files to be dropped along with the mod install. The module will not work without the template. Any module without a template installs the package but drops no files.
571572

573+
####Class: `apache::mod::event
574+
575+
Installs and manages mpm_event module.
576+
577+
Full Documentation for mpm_event is available from [Apache](https://httpd.apache.org/docs/current/mod/event.html).
578+
579+
To configure the event thread limit:
580+
581+
```puppet
582+
class {'apache::mod::event':
583+
$threadlimit => '128',
584+
}
585+
```
586+
587+
572588
####Class: `apache::mod::info`
573589

574590
Installs and manages mod_info which provides a comprehensive overview of the server configuration.
575591

576-
Full documentation for mod_info is available from [Apache](http://httpd.apache.org/docs/2.2/mod/mod_info.html).
592+
Full documentation for mod_info is available from [Apache](https://httpd.apache.org/docs/current/mod/mod_info.html).
577593

578594
These are the default settings:
579595

spec/classes/mod/event_spec.rb

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,17 @@
5757
}
5858
end
5959

60-
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file')
61-
.with_content(/^\s*ServerLimit\s*0/)
62-
.with_content(/^\s*StartServers\s*1/)
63-
.with_content(/^\s*MaxClients\s*2/)
64-
.with_content(/^\s*MinSpareThreads\s*3/)
65-
.with_content(/^\s*MaxSpareThreads\s*4/)
66-
.with_content(/^\s*ThreadsPerChild\s*5/)
67-
.with_content(/^\s*MaxRequestsPerChild\s*6/)
68-
.with_content(/^\s*ThreadLimit\s*7/)
69-
.with_content(/^\s*ListenBacklog\s*8/)
70-
.with_content(/^\s*MaxRequestWorkers\s*9/)
71-
.with_content(/^\s*MaxConnectionsPerChild\s*10/)
72-
}
60+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ServerLimit\s*0/) }
61+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*StartServers\s*1/) }
62+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxClients\s*2/) }
63+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MinSpareThreads\s*3/) }
64+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxSpareThreads\s*4/) }
65+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ThreadsPerChild\s*5/) }
66+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxRequestsPerChild\s*6/) }
67+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ThreadLimit\s*7/) }
68+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*ListenBacklog\s*8/) }
69+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxRequestWorkers\s*9/) }
70+
it { is_expected.to contain_file("/etc/apache2/mods-available/event.conf").with_ensure('file').with_content(/^\s*MaxConnectionsPerChild\s*10/) }
7371
end
7472

7573
context "with Apache version < 2.4" do

templates/mod/event.conf.erb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
<IfModule mpm_event_module>
2-
ServerLimit <%= @serverlimit %>
3-
StartServers <%= @startservers %>
4-
MaxClients <%= @maxclients %>
5-
MinSpareThreads <%= @minsparethreads %>
6-
MaxSpareThreads <%= @maxsparethreads %>
7-
ThreadsPerChild <%= @threadsperchild %>
8-
MaxRequestsPerChild <%= @maxrequestsperchild %>
9-
ThreadLimit <%= @threadlimit %>
10-
ListenBacklog <%= @listenbacklog %>
11-
MaxRequestWorkers <%= @maxrequestworkers %>
2+
ServerLimit <%= @serverlimit %>
3+
StartServers <%= @startservers %>
4+
MaxClients <%= @maxclients %>
5+
MinSpareThreads <%= @minsparethreads %>
6+
MaxSpareThreads <%= @maxsparethreads %>
7+
ThreadsPerChild <%= @threadsperchild %>
8+
MaxRequestsPerChild <%= @maxrequestsperchild %>
9+
ThreadLimit <%= @threadlimit %>
10+
ListenBacklog <%= @listenbacklog %>
11+
MaxRequestWorkers <%= @maxrequestworkers %>
1212
MaxConnectionsPerChild <%= @maxconnectionsperchild %>
1313
</IfModule>

0 commit comments

Comments
 (0)