Skip to content

Commit 6933f0e

Browse files
committed
docs(readme): move to docs/ directory and modify accordingly
1 parent 701929d commit 6933f0e

File tree

1 file changed

+116
-41
lines changed

1 file changed

+116
-41
lines changed
Lines changed: 116 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,176 +1,206 @@
1-
======
1+
.. _readme:
2+
23
apache
34
======
45

6+
|img_travis| |img_sr|
7+
8+
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/apache-formula.svg?branch=master
9+
:alt: Travis CI Build Status
10+
:scale: 100%
11+
:target: https://travis-ci.com/saltstack-formulas/apache-formula
12+
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
13+
:alt: Semantic Release
14+
:scale: 100%
15+
:target: https://github.com/semantic-release/semantic-release
16+
517
Formulas to set up and configure the Apache HTTP server.
618

7-
.. note::
19+
.. contents:: **Table of Contents**
20+
21+
General notes
22+
-------------
23+
24+
See the full `SaltStack Formulas installation and usage instructions
25+
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
26+
27+
If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
28+
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_.
29+
30+
If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``,
31+
which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.
832

9-
See the full `Salt Formulas installation and usage instructions
10-
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
33+
See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.
34+
35+
Contributing to this repo
36+
-------------------------
37+
38+
**Commit message formatting is significant!!**
39+
40+
Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.
1141

1242
Available states
13-
================
43+
----------------
1444

1545
.. contents::
16-
:local:
46+
:local:
1747

1848
``apache``
19-
----------
49+
^^^^^^^^^^
2050

2151
Installs the Apache package and starts the service.
2252

2353
``apache.config``
24-
-----------------
54+
^^^^^^^^^^^^^^^^^
2555

2656
Configures apache based on os_family
2757

2858
``apache.certificates``
29-
-----------------
59+
^^^^^^^^^^^^^^^^^^^^^^^
3060

3161
Deploy SSL certificates from pillars
3262

3363
``apache.mod_mpm``
34-
------------------
64+
^^^^^^^^^^^^^^^^^^
3565

3666
Configures the apache mpm modules on Debian ``mpm_prefork``, ``mpm_worker`` or ``mpm_event`` (Debian Only)
3767

3868
``apache.modules``
39-
------------------
69+
^^^^^^^^^^^^^^^^^^
4070

4171
Enables and disables Apache modules.
4272

4373
``apache.mod_rewrite``
44-
----------------------
74+
^^^^^^^^^^^^^^^^^^^^^^
4575

4676
Enabled the Apache module mod_rewrite (Debian and FreeBSD only)
4777

4878
``apache.mod_proxy``
49-
-------------------
79+
^^^^^^^^^^^^^^^^^^^^
5080

5181
Enables the Apache module mod_proxy. (Debian and FreeBSD only)
5282

5383
``apache.mod_proxy_http``
54-
-------------------------
84+
^^^^^^^^^^^^^^^^^^^^^^^^^
5585

5686
Enables the Apache module mod_proxy_http and requires the Apache module mod_proxy to be enabled. (Debian Only)
5787

5888
``apache.mod_proxy_fcgi``
59-
-------------------------
89+
^^^^^^^^^^^^^^^^^^^^^^^^^
6090

6191
Enables the Apache module mod_proxy_fcgi and requires the Apache module mod_proxy to be enabled. (Debian Only)
6292

6393
``apache.mod_wsgi``
64-
-------------------
94+
^^^^^^^^^^^^^^^^^^^
6595

6696
Installs the mod_wsgi package and enables the Apache module.
6797

6898
``apache.mod_actions``
69-
----------------------
99+
^^^^^^^^^^^^^^^^^^^^^^
70100

71101
Enables the Apache module mod_actions. (Debian Only)
72102

73103
``apache.mod_headers``
74-
----------------------
104+
^^^^^^^^^^^^^^^^^^^^^^
75105

76106
Enables the Apache module mod_headers. (Debian Only)
77107

78108
``apache.mod_pagespeed``
79-
------------------------
109+
^^^^^^^^^^^^^^^^^^^^^^^^
80110

81111
Installs and Enables the mod_pagespeed module. (Debian and RedHat Only)
82112

83113
``apache.mod_perl2``
84-
-------------------
114+
^^^^^^^^^^^^^^^^^^^^
85115

86116
Installs and enables the mod_perl2 module (Debian and FreeBSD only)
87117

88118
``apache.mod_geoip``
89-
-------------------
119+
^^^^^^^^^^^^^^^^^^^^
90120

91121
Installs and enables the mod_geoIP (RedHat only)
92122

93123
``apache.mod_php5``
94-
-------------------
124+
^^^^^^^^^^^^^^^^^^^
95125

96126
Installs and enables the mod_php5 module
97127

98128
``apache.mod_cgi``
99-
---------------------
129+
^^^^^^^^^^^^^^^^^^
100130

101131
Enables mod_cgi. (FreeBSD only)
102132

103133
``apache.mod_fcgid``
104-
--------------------
134+
^^^^^^^^^^^^^^^^^^^^
105135

106136
Installs and enables the mod_fcgid module (Debian only)
107137

108138
``apache.mod_fastcgi``
109-
--------------------
139+
^^^^^^^^^^^^^^^^^^^^^^
110140

111141
Installs and enables the mod_fastcgi module
112142

113143
``apache.mod_dav_svn``
114-
--------------------
144+
^^^^^^^^^^^^^^^^^^^^^^
115145

116146
Installs and enables the mod_dav_svn module (Debian only)
117147

118148
``apache.mod_security``
119-
----------------------
149+
^^^^^^^^^^^^^^^^^^^^^^^
120150

121151
Installs an enables the `Apache mod_security2 WAF`<http://modsecurity.org/>`_
122152
using data from Pillar. (Debian and RedHat Only)
123153

124154
Allows you to install the basic Core Rules (CRS) and some basic configuration for mod_security2
125155

126156
``apache.mod_security.rules``
127-
-----------------------------
157+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128158

129159
This state can create symlinks based on basic Core Rules package. (Debian only)
130160
Or it can distribute a mod_security rule file and place it /etc/modsecurity/
131161

132162
``apache.mod_socache_shmcb``
133-
---------------------
163+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134164

135165
Enables mod_socache_shmcb. (FreeBSD only)
136166

137167
``apache.mod_ssl``
138-
----------------------
168+
^^^^^^^^^^^^^^^^^^
139169

140170
Installs and enables the mod_ssl module (Debian, RedHat and FreeBSD only)
141171

142172
``apache.mod_suexec``
143-
---------------------
173+
^^^^^^^^^^^^^^^^^^^^^
144174

145175
Enables mod_suexec. (FreeBSD only)
146176

147177
``apache.mod_vhost_alias``
148-
----------------------
178+
^^^^^^^^^^^^^^^^^^^^^^^^^^
149179

150180
Enables the Apache module vhost_alias (Debian Only)
151181

152182
``apache.mod_remoteip``
153-
----------------------
183+
^^^^^^^^^^^^^^^^^^^^^^^
154184

155185
Enables and configures the Apache module mod_remoteip using data from Pillar. (Debian Only)
156186

157187
``apache.mod_xsendfile``
158-
----------------------
188+
^^^^^^^^^^^^^^^^^^^^^^^^
159189

160190
Installs and enables mod_xsendfile module. (Debian Only)
161191

162192
``apache.own_default_vhost``
163-
--------------------------
193+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
164194

165195
Replace default vhost with own version. By default, it's 503 code. (Debian Only)
166196

167197
``apache.no_default_vhost``
168-
--------------------------
198+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
169199

170200
Remove the default vhost. (Debian Only)
171201

172202
``apache.vhosts.standard``
173-
--------------------------
203+
^^^^^^^^^^^^^^^^^^^^^^^^^^
174204

175205
Configures Apache name-based virtual hosts and creates virtual host directories using data from Pillar.
176206

@@ -194,22 +224,22 @@ of interfaces to bind to. For example, to bind both IPv4 and IPv6:
194224
interface: '1.2.3.4 [2001:abc:def:100::3]'
195225
196226
``apache.manage_security``
197-
--------------------------
227+
^^^^^^^^^^^^^^^^^^^^^^^^^^
198228

199229
Configures Apache's security.conf options by reassinging them using data from Pillar.
200230

201231
``apache.server_status``
202-
--------------------------
232+
^^^^^^^^^^^^^^^^^^^^^^^^
203233

204234
Configures Apache's server_status handler for localhost
205235

206236
``apache.debian_full``
207-
----------------------
237+
^^^^^^^^^^^^^^^^^^^^^^
208238

209239
Installs and configures Apache on Debian and Ubuntu systems.
210240

211241
``apache.uninstall``
212-
----------
242+
^^^^^^^^^^^^^^^^^^^^
213243

214244
Stops the Apache service and uninstalls the package.
215245

@@ -238,3 +268,48 @@ Example Pillar:
238268
name: 'my name'
239269
path: 'salt://path/to/sites-available/conf/file'
240270
state: 'enabled'
271+
272+
Testing
273+
-------
274+
275+
Linux testing is done with ``kitchen-salt``.
276+
277+
Requirements
278+
^^^^^^^^^^^^
279+
280+
* Ruby
281+
* Docker
282+
283+
.. code-block:: bash
284+
285+
$ gem install bundler
286+
$ bundle install
287+
$ bin/kitchen test [platform]
288+
289+
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
290+
e.g. ``debian-9-2019-2-py3``.
291+
292+
``bin/kitchen converge``
293+
^^^^^^^^^^^^^^^^^^^^^^^^
294+
295+
Creates the docker instance and runs the ``template`` main state, ready for testing.
296+
297+
``bin/kitchen verify``
298+
^^^^^^^^^^^^^^^^^^^^^^
299+
300+
Runs the ``inspec`` tests on the actual instance.
301+
302+
``bin/kitchen destroy``
303+
^^^^^^^^^^^^^^^^^^^^^^^
304+
305+
Removes the docker instance.
306+
307+
``bin/kitchen test``
308+
^^^^^^^^^^^^^^^^^^^^
309+
310+
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
311+
312+
``bin/kitchen login``
313+
^^^^^^^^^^^^^^^^^^^^^
314+
315+
Gives you SSH access to the instance for manual testing.

0 commit comments

Comments
 (0)