Skip to content
This repository has been archived by the owner on Feb 2, 2018. It is now read-only.

Commit

Permalink
doc: Initial server config docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashcrow authored and cooktheryan committed Nov 7, 2016
1 parent 887347b commit 6a9ae8a
Show file tree
Hide file tree
Showing 6 changed files with 107 additions and 1 deletion.
43 changes: 43 additions & 0 deletions doc/configuration/http.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
REST Configuration
==================

.. todo::

Wordsmithing.


.. _rest_configuration_file:

Configuration File
------------------

.. include:: ../examples/secure_rest_config.rst


.. _rest_configuration_cli:

Via CLI
-------

.. include:: ../examples/commissaire-server-cli.rst


Example
~~~~~~~

The following will run the same server as the above configuration file examples.

.. note::

``--no-config`` is required when bypassing the configuration file!

.. include:: ../examples/commissaire-server-cli-example.rst


Authentication
~~~~~~~~~~~~~~

Multiple authentication plugins can be configured via the CLI. To do this use the
``--authentication-plugin`` switch multiple times.

.. include:: ../examples/commissaire-server-cli-multiple-auth.rst
9 changes: 9 additions & 0 deletions doc/examples/commissaire-server-cli-example.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

.. code-block:: shell
$ commissaire-server --no-config \
--bus-uri redis://127.0.0.1:6379/ \
--bus-exchange commissaire \
--tls-pemfile /path/to/server.pem \
--listen-interface 8000 \
--authentication-plugin commissaire_http.authentication.httpbasicauth:filepath=conf/users.json
5 changes: 5 additions & 0 deletions doc/examples/commissaire-server-cli-multiple-auth.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. code-block:: shell
...
--authentication-plugin commissaire_http.authentication.httbasicauth:filepath=conf/users.json \
--authentication-plugin commissaire_http.authentication.keystonetokenauth:url=https://example.com
34 changes: 34 additions & 0 deletions doc/examples/commissaire-server-cli.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@

.. code-block:: shell
usage: commissaire-server [-h] [--config-file CONFIG_FILE] [--no-config-file]
[--listen-interface LISTEN_INTERFACE]
[--listen-port LISTEN_PORT]
[--tls-pemfile TLS_PEMFILE]
[--tls-clientverifyfile TLS_CLIENTVERIFYFILE]
[--authentication-plugin MODULE_NAME:key=value,..]
[--bus-exchange BUS_EXCHANGE] [--bus-uri BUS_URI]
optional arguments:
-h, --help show this help message and exit
--config-file CONFIG_FILE, -c CONFIG_FILE
Full path to a JSON configuration file (command-line
arguments override)
--no-config-file Disregard default configuration file, if it exists
--listen-interface LISTEN_INTERFACE, -i LISTEN_INTERFACE
Interface to listen on
--listen-port LISTEN_PORT, -p LISTEN_PORT
Port to listen on
--tls-pemfile TLS_PEMFILE
Full path to the TLS PEM for the commissaire server
--tls-clientverifyfile TLS_CLIENTVERIFYFILE
Full path to the TLS file containing the certificate
authorities that client certificates should be
verified against
--authentication-plugin MODULE_NAME:key=value,..
Authentication Plugin module and configuration.
--bus-exchange BUS_EXCHANGE
Message bus exchange name.
--bus-uri BUS_URI Message bus connection URI. See:http://kombu.readthedo
cs.io/en/latest/userguide/connections.html
13 changes: 13 additions & 0 deletions doc/examples/secure_rest_config.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. code-block:: shell
$ cat /etc/commissaire/commissaire.conf
{
"listen-interface": "127.0.0.1",
"listen-port": 8000,
"tls-pemfile": "/path/to/server.pem",
"bus-uri": "redis://127.0.0.1:6379/",
"authentication-plugins": [{
"name": "commissaire_http.authentication.httpbasicauth",
"filepath": "conf/users.json"
}]
}
4 changes: 3 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Commissaire
============
===========

.. warning::

Expand All @@ -19,8 +19,10 @@ Contents:

.. toctree::
:maxdepth: 2
:glob:

overview
configuration/*
operations
commctl
components
Expand Down

0 comments on commit 6a9ae8a

Please sign in to comment.