Commit e379ff14 authored by Daniel Dehennin's avatar Daniel Dehennin
Browse files

doc(readme): document the wanted states

parent 4a6c4892
.. _readme:
discourse
=========
Setup and configure `discourse`_ container deployed with `discourse_docker`_ repository
.. 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>`_.
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.
More information `SALT AS A CLOUD CONTROLLER
<https://docs.saltstack.com/en/latest/topics/tutorials/cloud_controller.html>`_.
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 states
----------------
.. contents::
:local:
``discourse``
^^^^^^^^^^^^^
*Meta-state (This is a state that includes other states)*.
- install dependencies
- configure deployment of ``discourse`` container
- deploy the ``discourse`` application container
``discourse.config``
^^^^^^^^^^^^^^^^^^^^
This state will configure the deployement by generating the
``containers/app.yml`` file.
It depends on ``discourse.git.package.install``.
``discourse.service``
^^^^^^^^^^^^^^^^^^^^^
*Meta-state (This is a state that includes other states)*.
This state will rebuild the ``discourse`` application container if the
configuration changes.
``discourse.clean``
^^^^^^^^^^^^^^^^^^^
*Meta-state (This is a state that includes other states)*.
- stop ``discourse`` container
``discourse.config.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^
This state will remove the generated ``containers/app.yml`` deployment
configuration file.
It depends on ``discourse.service.dead``.
``discourse.service.clean``
^^^^^^^^^^^^^^^^^^^^^^^^^^^
This state will stop the ``discourse`` application container.
Launcher states
^^^^^^^^^^^^^^^
The following states wrap the ``discourse`` launcher commands which
avoid to use either:
- a direct SSH connection to execute the command locally
- ``salt-ssh minion cmd.run './launcher <command> app' cwd='/srv/discourse'``
``disourse.launcher.rebuild``
`````````````````````````````
Execute the ``./laucher rebuild app`` command in the directory defined
by the ``discourse.directory`` configuration.
``disourse.launcher.bootsrap``
``````````````````````````````
Execute the ``./laucher bootstrap app`` command in the directory
defined by the ``discourse.directory`` configuration.
``disourse.launcher.start``
```````````````````````````
Execute the ``./laucher start app`` command in the directory defined
by the ``discourse.directory`` configuration.
``disourse.launcher.stop``
``````````````````````````
Execute the ``./laucher stop app`` command in the directory defined by
the ``discourse.directory`` configuration.
``disourse.launcher.restart``
`````````````````````````````
Execute the ``./laucher restart app`` command in the directory defined
by the ``discourse.directory`` configuration.
``disourse.launcher.cleanup``
`````````````````````````````
Execute the ``./laucher cleanup app`` command in the directory defined
by the ``discourse.directory`` configuration.
``disourse.launcher.destroy``
`````````````````````````````
Execute the ``./laucher destroy app`` command in the directory defined
by the ``discourse.directory`` configuration.
Utility states
^^^^^^^^^^^^^^
The following states are used by the previous states to setup the
environment.
``discourse.git``
`````````````````
*Meta-state (This is a state that includes other states)*.
- install the git package
- clone the latest `discourse_docker`_ repository
``discourse.docker``
````````````````````
*Meta-state (This is a state that includes other states)*.
Install docker package and start the service.
``discourse.docker.clean``
``````````````````````````
*Meta-state (This is a state that includes other states)*.
Stop the docker service and remove the packages.
``discourse.docker.package``
````````````````````````````
This state install the docker package only.
``discourse.docker.package.clean``
``````````````````````````````````
This state remove the docker package only and depends on
``discourse.docker.service.clean``.
``discourse.docker.service``
````````````````````````````
Starts the docker service.
``discourse.docker.service.clean``
``````````````````````````````````
Disable and stop the docker service.
``discourse.netcat``
````````````````````
Install the ``netcat`` package required by the deployment of ``discourse``.
``discourse.net-tools``
```````````````````````
Install the ``net-tools`` package required by the deployment of ``discourse``.
.. _discourse: https://www.discourse.org
.. _discourse_docker: https://github.com/discourse/discourse_docker
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment