README.rst 1.42 KB
Newer Older
Philippe Pepiot's avatar
init  
Philippe Pepiot committed
1
2
3
4
===============
saemref-formula
===============

5
6
A saltstack formula handling installation of `saem_ref`_.

Philippe Pepiot's avatar
init  
Philippe Pepiot committed
7
8
9
10
11
12
Available states
================

.. contents::
    :local:

13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
``saemref.install``
-------------------

Installs the saemref package from logilab repositories and create an instance.

``saemref.config``
------------------

Manage instance configuration files.

``saemref.supervisor``
----------------------

Install and manage `supervisor`_ configuration for the saemref installation.


Testing
=======

The script `run-test.py` can help to develop and test the formula using
`docker`_ and `testinfra`_.

The command ``./run-test.py dev centos6`` will build image from
``test/centos6.Dockerfile`` and span a shell in a new container with mounted
volumes from the host (so you can develop formula on the host and test it in
the container with ``salt-call``).

The command ``./run-test.py dev centos6 --salt`` is the same as above but will
provision the container (eg. calling ``salt-call state.highstate``)

The command ``./run-test.py test centos6`` built a provisioned image
(highstate) and run testinfra tests on it.

Note that you can add any parameters that testinfra (pytest) accept, for
instance ``./run-test.py test centos6 -k idempotence --pdb``.

Philippe Pepiot's avatar
init  
Philippe Pepiot committed
49

50
51
52
53
.. _saem_ref: https://www.cubicweb.org/project/cubicweb-saem_ref
.. _supervisor: http://supervisord.org
.. _docker: https://www.docker.com/
.. _testinfra: https://testinfra.readthedocs.org/