Skip to content

Commit

Permalink
add redis stuff and some minor text fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
muckelba committed Jan 19, 2021
1 parent b96b5e7 commit a651255
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 12 deletions.
2 changes: 1 addition & 1 deletion conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import guzzle_sphinx_theme

project = u'MAD'
copyright = u'2020, MADdev Team'
copyright = u'2021, MADdev Team'
version = u''
templates_path = ['_templates']
master_doc = 'index'
Expand Down
26 changes: 20 additions & 6 deletions installation/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ Fill rocketdb/my.cnf file with the following content.
[mysqld]
innodb_buffer_pool_size=1G
.. note::
.. note::

You should align this setting with you available memory. It should probably not exceed 50% of your available memory.


Expand All @@ -89,7 +90,8 @@ Decrease VM swappiness
sysctl -w vm.swappiness=1
.. note::
.. note::

For further details have a look at https://mariadb.com/kb/en/configuring-swappiness/


Expand Down Expand Up @@ -117,8 +119,6 @@ Fill docker-compose.yml with the following content. Below we explain the details
- ./personal_commands:/usr/src/app/personal_commands
depends_on:
- rocketdb
networks:
- default
ports:
- "8080:8080"
- "8000:8000"
Expand Down Expand Up @@ -165,7 +165,7 @@ In the docker image, the whole MAD repository is located in "/usr/src/app".
"rocketdb" service
------------------

The "rocketdb" service is docker-container based on `mariadb:10.4 <https://hub.docker.com/_/mariadb>`.
The "rocketdb" service is docker-container based on `mariadb:10.4 <https://hub.docker.com/_/mariadb>`_.
It will start a mariadb database server and automatically create the defined used :code:`MYSQL_USER` with password :code:`MYSQL_PASSWORD`.

Your job here is to set secure passwords for :code:`MYSQL_ROOT_PASSWORD` and :code:`MYSQL_PASSWORD`.
Expand All @@ -182,6 +182,20 @@ The database is reachable in the default network as `rocketdb`, so in your confi
You can see that we mount the directory "docker-entrypoint-initdb" to "/docker-entrypoint-initdb.d/"
All .sql scripts in this directory are executed, once the container starts.


"redis" service
---------------

There's an optional way to implement a cache layer between the data from the devices and MAD itself. To add that to your stack, just add the following lines to your compose file:

.. code-block:: yaml
redis:
container_name: pokemon_cache
image: redis:latest
Make sure to set :code:`cache_host` to :code:`redis` in the MAD config.ini. The port can stay on default.

Database deployment
-------------------

Expand Down Expand Up @@ -429,4 +443,4 @@ Some useful commands to maintain MAD + DB
Further steps
-------------

Review and implement anything related to the `security section <./security>`_
Review and implement anything related to the `security section <../security>`_
8 changes: 3 additions & 5 deletions installation/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,21 +148,19 @@ Copy config.ini.example (from the configs folder in the MAD repo) to "config.ini
cp configs/config.ini.example configs/config.ini
and then edit the config file accordingly.
and then edit the config file accordingly.

The next step is to configure MAD in config mode. This will only start MAD's web frontend called MADmin.
The next step is to configure MAD. This will only start MAD's web frontend called MADmin.

.. warning::
MAD will not actually scan in configmode! The mode is for the first configuration only. Remove the :code:`-cm` when you are done.

.. code-block:: bash
python3 start.py -cm
python3 start.py
By default MADmin will be available on http://your_server_ip:5000.

Uncomment :code:`with_madmin` in config.ini to start MADmin without using :code:`-cm`.

.. _sec_manual_running:

Running
Expand Down

0 comments on commit a651255

Please sign in to comment.