Skip to content

Commit f0f1563

Browse files
committed
docs(readme): move to docs/ directory and apply common structure
1 parent b51907d commit f0f1563

File tree

1 file changed

+108
-24
lines changed

1 file changed

+108
-24
lines changed

README.rst renamed to docs/README.rst

Lines changed: 108 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,54 @@
1-
==============
1+
.. _readme:
2+
23
zabbix-formula
34
==============
45

5-
A saltstack formula to manage Zabbix.
6+
|img_travis| |img_sr|
7+
8+
.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/zabbix-formula.svg?branch=master
9+
:alt: Travis CI Build Status
10+
:scale: 100%
11+
:target: https://travis-ci.com/saltstack-formulas/zabbix-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+
17+
A SaltStack formula to manage Zabbix.
18+
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/>`_.
32+
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 :ref:`How to contribute <CONTRIBUTING>` for more details.
41+
42+
Overview
43+
--------
644

745
This formula has been developed distributing declarations in different files to
846
make it usable in most situations. It should be useful in scenarios ranging from
947
a simple install of the packages (without any special configuration) to a more
1048
complex set-up with different nodes for agent, server, database and frontend.
1149

1250
Customization
13-
=============
51+
^^^^^^^^^^^^^
1452

1553
First, **see if providing pillar data is enough for your customization needs**.
1654
That's the recommended way and should be enough for most cases. See that
@@ -27,7 +65,7 @@ recommended– to use other formulas to provision other parts of a complete
2765
system).
2866

2967
Using RedHat EPEL repo Zabbix packages
30-
======================================
68+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3169

3270
If you want to use the EPEL repo packages, as the naming conventions are
3371
different, you need to tweak the default values of ``map.jinja`` to obtain the
@@ -51,7 +89,7 @@ desired results. In short:
5189
Now you just have to use ``zabbix.agent.conf`` sls file and that's it.
5290

5391
Example of usage
54-
================
92+
^^^^^^^^^^^^^^^^
5593

5694
Just as an example, this is a ``top.sls`` file to install a complete modular
5795
self-contained Zabbix system:
@@ -110,105 +148,151 @@ pillar files
110148
<http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_ doc.
111149

112150
Available states
113-
================
151+
----------------
114152

115153
.. contents::
116154
:local:
117155

118156
``zabbix.agent``
119-
----------------
157+
^^^^^^^^^^^^^^^^
120158

121159
Installs the zabbix-agent package and starts the associated zabbix-
122160
agent service.
123161

124162
``zabbix.agent.conf``
125-
---------------------
163+
^^^^^^^^^^^^^^^^^^^^^
126164

127165
Configures the zabbix-agent package.
128166

129167
``zabbix.agent.repo``
130-
---------------------
168+
^^^^^^^^^^^^^^^^^^^^^
131169

132170
Configures official Zabbix repo specifically for the agent. Actually it just
133171
includes zabbix.repo and adds a requisite for the pkg state declaration
134172

135173
``zabbix.frontend``
136-
-------------------
174+
^^^^^^^^^^^^^^^^^^^
137175

138176
Installs Zabbix frontend.
139177

140178
``zabbix.frontend.conf``
141-
----------------------
179+
^^^^^^^^^^^^^^^^^^^^^^^^
142180

143181
Configures the zabbix-frontend package. Actually you need to use other formulas
144182
for apache/nginx and php5-fpm to complete a working setup.
145183

146184
``zabbix.frontend.repo``
147-
----------------------
185+
^^^^^^^^^^^^^^^^^^^^^^^^
148186

149187
Configures official Zabbix repo specifically for the frontend. Actually it just
150188
includes zabbix.repo and adds a requisite for the pkg state declaration.
151189

152190
``zabbix.mysql.conf``
153-
----------------
191+
^^^^^^^^^^^^^^^^^^^^^
154192

155193
Creates database and mysql user for Zabbix.
156194

157195
``zabbix.mysql.schema``
158-
---------------------
196+
^^^^^^^^^^^^^^^^^^^^^^^
159197

160198
Creates mysql schema for Zabbix.
161199

162200
``zabbix.pgsql.conf``
163-
----------------
201+
^^^^^^^^^^^^^^^^^^^^^
164202

165203
Creates database and PostgreSQL user for Zabbix.
166204

167205
``zabbix.pgsql.schema``
168-
---------------------
206+
^^^^^^^^^^^^^^^^^^^^^^^
169207

170208
Creates PostgreSQL schema for Zabbix.
171209

172210
``zabbix.proxy``
173-
----------------
211+
^^^^^^^^^^^^^^^^
174212

175213
Installs the zabbix-proxy package and starts the associated zabbix-proxy service.
176214

177215
``zabbix.proxy.conf``
178-
---------------------
216+
^^^^^^^^^^^^^^^^^^^^^
179217

180218
Configures the zabbix-proxy package.
181219

182220
``zabbix.proxy.repo``
183-
---------------------
221+
^^^^^^^^^^^^^^^^^^^^^
184222

185223
Configures official Zabbix repo specifically for the proxy. Actually it just
186224
includes zabbix.repo and adds a requisite for the pkg state declaration
187225

188226
``zabbix.repo``
189-
----------------
227+
^^^^^^^^^^^^^^^
190228

191229
Configures official Zabbix repo.
192230

193231
``zabbix.server``
194-
-----------------
232+
^^^^^^^^^^^^^^^^^
195233

196234
Installs the zabbix-server package and starts the associated zabbix-
197235
server service.
198236

199237
``zabbix.server.conf``
200-
----------------------
238+
^^^^^^^^^^^^^^^^^^^^^^
201239

202240
Configures the zabbix-server package.
203241

204242
``zabbix.server.repo``
205-
----------------------
243+
^^^^^^^^^^^^^^^^^^^^^^
206244

207245
Configures official Zabbix repo specifically for the server. Actually it just
208246
includes zabbix.repo and adds a requisite for the pkg state declaration
209247

210248
``zabbix.users``
211-
----------------
249+
^^^^^^^^^^^^^^^^
212250

213251
Declares users and groups that could be needed in other formulas (e.g. in the
214252
users formula to make an user pertain to the service group).
253+
254+
255+
Testing
256+
-------
257+
258+
Linux testing is done with ``kitchen-salt``.
259+
260+
Requirements
261+
^^^^^^^^^^^^
262+
263+
* Ruby
264+
* Docker
265+
266+
.. code-block:: bash
267+
268+
$ gem install bundler
269+
$ bundle install
270+
$ bin/kitchen test [platform]
271+
272+
Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
273+
e.g. ``debian-9-2019-2-py3``.
274+
275+
``bin/kitchen converge``
276+
^^^^^^^^^^^^^^^^^^^^^^^^
277+
278+
Creates the docker instance and runs the ``template`` main state, ready for testing.
279+
280+
``bin/kitchen verify``
281+
^^^^^^^^^^^^^^^^^^^^^^
282+
283+
Runs the ``inspec`` tests on the actual instance.
284+
285+
``bin/kitchen destroy``
286+
^^^^^^^^^^^^^^^^^^^^^^^
287+
288+
Removes the docker instance.
289+
290+
``bin/kitchen test``
291+
^^^^^^^^^^^^^^^^^^^^
292+
293+
Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.
294+
295+
``bin/kitchen login``
296+
^^^^^^^^^^^^^^^^^^^^^
297+
298+
Gives you SSH access to the instance for manual testing.

0 commit comments

Comments
 (0)