semantic-release-bot ee1e08bb2c chore(release): 5.5.0 [skip ci]
# [5.5.0](https://github.com/saltstack-formulas/prometheus-formula/compare/v5.4.0...v5.5.0) (2021-05-28)

### Bug Fixes

* **clientlibs/install:** ensure `tar` is available for Oracle Linux 8 ([d30b42c](d30b42ced0))
* **node_exporter:** typo ([cc112e7](cc112e71b9)), closes [#57](https://github.com/saltstack-formulas/prometheus-formula/issues/57)
* **pillar:** fix `OverflowError: Range too big` -- `MAX_RANGE (100000)` ([c9cfdfd](c9cfdfd9e1)), closes [/gitlab.com/myii/prometheus-formula/-/jobs/1077740890#L779](https://github.com//gitlab.com/myii/prometheus-formula/-/jobs/1077740890/issues/L779)

### Continuous Integration

* add `arch-master` to matrix and update `.travis.yml` [skip ci] ([046b0ee](046b0ee239))
* **gemfile+lock:** use `ssf` customised `kitchen-docker` repo [skip ci] ([05f66ac](05f66ac9bc))
* **kitchen+ci:** use latest pre-salted images (after CVE) [skip ci] ([df0ec43](df0ec43f52))
* **kitchen+gitlab:** adjust matrix to add `3003` [skip ci] ([a9e26a7](a9e26a795d))
* **kitchen+gitlab-ci:** use latest pre-salted images [skip ci] ([e283bfb](e283bfb188))

### Documentation

* remove files which aren't formula-specific [skip ci] ([1b2c50a](1b2c50ae37))
* **readme:** fix headings and contributing link [skip ci] ([bb7b816](bb7b816aac))

### Features

* **archive:** allow command line arguments without values ([08ad2ca](08ad2caf4c))
* **config:** allow to manage extra files ([5f3dc6f](5f3dc6f11a))

### Tests

* standardise use of `share` suite & `_mapdata` state [skip ci] ([2b38c9e](2b38c9e402))
* **pillar/repo:** avoid `alertmanager` config where newer than package ([83efb0b](83efb0b434))
2021-05-28 13:59:46 +00:00
..
2021-05-28 13:59:46 +00:00
2021-05-28 13:59:46 +00:00

prometheus-formula
==================

Formula to manage Prometheus on GNU/Linux and MacOS.

|img_travis| |img_sr|

.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/prometheus-formula.svg?branch=master
   :alt: Travis CI Build Status
   :scale: 100%
   :target: https://travis-ci.com/saltstack-formulas/prometheus-formula
.. |img_sr| image:: https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg
   :alt: Semantic Release
   :scale: 100%
   :target: https://github.com/semantic-release/semantic-release


.. contents:: **Table of Contents**
   :depth: 1

General notes
-------------

See the full `SaltStack Formulas installation and usage instructions
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.  If you are interested in writing or contributing to formulas, please pay attention to the `Writing Formula Section
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#writing-formulas>`_. If you want to use this formula, please pay attention to the ``FORMULA`` file and/or ``git tag``, which contains the currently released version. This formula is versioned according to `Semantic Versioning <http://semver.org/>`_.  See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.

Special notes
-------------

None.

Contributing to this repo
-------------------------

**Commit message formatting is significant!!**

Please see `How to contribute <https://github.com/saltstack-formulas/.github/blob/master/CONTRIBUTING.rst>`_ for more details.

Available metastates
--------------------

.. contents::
   :local:

``prometheus``
^^^^^^^^^^^^^^

*Meta-state (This is a state that includes other states)*.

This installs from prometheus solution.


``prometheus.archive``
^^^^^^^^^^^^^^^^^^^^^^

This state will install prometheus components on MacOS and GNU/Linux from archive.

``prometheus.clientlibs``
^^^^^^^^^^^^^^^^^^^^^^^^^

This state will install prometheus client libraries on MacOS and GNU/Linux from archive.

``prometheus.package``
^^^^^^^^^^^^^^^^^^^^^^

This state will install prometheus component packages from GNU/Linux.

``prometheus.config``
^^^^^^^^^^^^^^^^^^^^^

This state will apply prometheus service configuration (files).

``prometheus.service``
^^^^^^^^^^^^^^^^^^^^^^

This state will start prometheus component services.

``prometheus.exporters``
^^^^^^^^^^^^^^^^^^^^^^^^

This state will apply prometheus exporters configuration.

``prometheus.exporters.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will remove prometheus exporters configuration.

``prometheus.service.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will stop prometheus component services.

``prometheus.config.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will remove prometheus service configuration (files).

``prometheus.package.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will uninstall prometheus component packages from GNU/Linux.

``prometheus.clientlibs.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will uninstall prometheus client libraries.

``prometheus.archive.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^

This state will remove prometheus component archive (directories).


Testing
-------

Linux testing is done with ``kitchen-salt``.

Requirements
^^^^^^^^^^^^

* Ruby
* Docker

.. code-block:: bash

   $ gem install bundler
   $ bundle install
   $ bin/kitchen test [platform]

Where ``[platform]`` is the platform name defined in ``kitchen.yml``,
e.g. ``debian-9-2019-2-py3``.

``bin/kitchen converge``
^^^^^^^^^^^^^^^^^^^^^^^^

Creates the docker instance and runs the ``prometheus`` main state, ready for testing.

``bin/kitchen verify``
^^^^^^^^^^^^^^^^^^^^^^

Runs the ``inspec`` tests on the actual instance.

``bin/kitchen destroy``
^^^^^^^^^^^^^^^^^^^^^^^

Removes the docker instance.

``bin/kitchen test``
^^^^^^^^^^^^^^^^^^^^

Runs all of the stages above in one go: i.e. ``destroy`` + ``converge`` + ``verify`` + ``destroy``.

``bin/kitchen login``
^^^^^^^^^^^^^^^^^^^^^

Gives you SSH access to the instance for manual testing.