Skip to content

Commit

Permalink
docs(readme): update to standard structure
Browse files Browse the repository at this point in the history
  • Loading branch information
myii committed Oct 15, 2019
1 parent 641d73c commit 038660c
Showing 1 changed file with 66 additions and 12 deletions.
78 changes: 66 additions & 12 deletions docs/README.rst
Original file line number Diff line number Diff line change
@@ -1,13 +1,25 @@
================
.. _readme:

strongswan-formula
================
==================

|img_travis| |img_sr|

.. |img_travis| image:: https://travis-ci.com/saltstack-formulas/strongswan-formula.svg?branch=master
:alt: Travis CI Build Status
:scale: 100%
:target: https://travis-ci.com/saltstack-formulas/strongswan-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

A SaltStack formula to install, configure and manage `Strongswan <https://www.strongswan.org/>`_.

.. contents:: **Table of Contents**

General notes
=============
-------------

See the full `SaltStack Formulas installation and usage instructions
<https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html>`_.
Expand All @@ -20,35 +32,33 @@ which contains the currently released version. This formula is versioned accordi

See `Formula Versioning Section <https://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html#versioning>`_ for more details.


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

**Commit message formatting is significant!!**

Please see `CONTRIBUTING <CONTRIBUTING.md>`_ for more details.

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

Available states
================
----------------

.. contents::
:local:

``strongswan``
------------
^^^^^^^^^^^^^^

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

This installs the strongswan package, configures and starts the associated strongswan service.

``strongswan.install``
--------------------
^^^^^^^^^^^^^^^^^^^^^^

This state will install the strongswan package only.

``strongswan.config``
-------------------
^^^^^^^^^^^^^^^^^^^^^

This state will configure the strongswan service and has a dependency on ``strongswan.install``
via include list.
Expand All @@ -62,7 +72,51 @@ Configuration is splitted:
* in a 'dropin' directory where each connection has its own secret file

``strongswan.service``
-------------------
^^^^^^^^^^^^^^^^^^^^^^

This state manage the strongswan service.

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 ``template`` 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.

0 comments on commit 038660c

Please sign in to comment.