Skip to content

Commit

Permalink
update wording + add ortools install guide
Browse files Browse the repository at this point in the history
  • Loading branch information
sn0opy committed Jun 9, 2020
1 parent a6ab032 commit 433b2d3
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 13 deletions.
6 changes: 3 additions & 3 deletions extras/scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ Example: `./intelimport.sh export.csv`.

## Databasesetup (databasesetup.py)

This script will take care of the database schema installation automatically so for example there is no need to install a whole Rocketmap frontend to just use the schema. Make sure to fill in the database credentials in the MAD `config.ini`, create an empty database and grant all permissions to the database user before running this script.
This script will take care of the database schema installation automatically so for example there is no need to install a whole RocketMAD frontend to just use the schema. Make sure to fill in the database credentials in the MAD `config.ini`, create an empty database and grant all permissions to the database user before running this script.

## Migrate to Rocketmap (migrate_to_rocketmap.sh)
## Migrate to RocketMAD (migrate_to_rocketmap.sh)

This script will migrate your data from a RDM or Monocle database to a Rocketmap database. Before you run this you should run [RocketMAD](https://github.com/cecpk/Rocketmad) or `databasesetup.py` and let it configure its database. After it has built its empty database you can run this script. If you were using Monocle with MAD spawnpoints do not change, so I dump that table from your monocle db and import it to your rocketmap db for you. If you have old spawnpoint info from before MAD then you want to use import_allspawns.sh as well. This script does not import things like controlling team/mons, or ex status, because MAD will fill this in after 1 scan.
This script will migrate your data from an RDM or Monocle database to a RocketMAD database. Before you run this you should run [RocketMAD](https://github.com/cecpk/Rocketmad) or `databasesetup.py` and let it configure its database. After it has built its empty database you can run this script. If you were using Monocle with MAD spawnpoints do not change, so I dump that table from your monocle db and import it to your rocketmap db for you. If you have old spawnpoint info from before MAD then you want to use import_allspawns.sh as well. This script does not import things like controlling team/mons, or ex status, because MAD will fill this in after 1 scan.

If you were already scanning in MAD using your Monocle database, be sure to remove version.json so MAD will update your new rocketmap schema.

Expand Down
4 changes: 3 additions & 1 deletion requirements.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ Requirements
MAD requires the following things to be installed available on your server:

- A server/computer running Linux. RaspberryPis do work, but aren't recommended
- A 64-bit CPU for MAD is also highly recommended since some optional parts of MAD do require to run on 64-bit. It does have a fallback for 32-bit CPUs though
- MariaDB server (MySQL has some issues and is not recommended)
- Python 3.6 (or higher) and Python's package manager command line tool :code:`pip`
- A rooted Android device being able to run the game. See `this list <https://github.com/Map-A-Droid/MAD-device-list>`_ of tested devices
- A rooted Android device being able to run the game. See `this list <https://github.com/Map-A-Droid/MAD-device-list>`_ of tested devices
- It's not required but highly recommended to use Python's `virtualenv` to install dependencies. Have a look at `this <https://docs.python.org/3/tutorial/venv.html>` and `this <https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>` if you're new to `virtualenv`
25 changes: 16 additions & 9 deletions server-setup.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ System preparation

.. note::

This whole article assumes a fresh installed `Ubuntu 18.04 Server <https://www.ubuntu.com/download/server>`_. If you're running another Linux distribution - that's totally fine, but keep in mind there may be some difference to your setup.
This whole article assumes a fresh installed `Ubuntu 18.04 Server <https://www.ubuntu.com/download/server>`_. If you're running a more recent version of Ubuntu or another Linux distribution - that's totally fine, but keep in mind there may be some difference in your setup.


MySQL / MariaDB
Expand Down Expand Up @@ -44,7 +44,7 @@ Install client libraries
Database schema
---------------

MAD will install the latest database schema automatically on initial boot and no additional steps are required. It will install the basic RocketMAD tables but may not be completely up to date. Running RocketMAD for the first time should execute their required changes. Follow the guide from the `official Rocketmap documentation <https://rocketmad.readthedocs.io>`_.
MAD will install the latest database schema automatically on initial boot and no additional steps are required. It will install the basic RocketMAD tables but may not be completely up to date. Running RocketMAD for the first time should execute their required changes. Follow the guide from the `official RocketMAD documentation <https://rocketmad.readthedocs.io>`_.

.. warning::
Make sure to clone the `RocketMAD <https://github.com/cecpk/RocketMAD/>`_ fork instead of the normal one.
Expand All @@ -69,7 +69,7 @@ Virtual Environment

.. note::

This step is optional but recommended.
This step is optional but highly recommended.

A virtual environment is a way to install python packages in a different location to avoid potential version conflicts with other software like RocketMAD or MADevice. It's like a standalone version of python, independent of your "normal" python. Install it with:

Expand All @@ -85,6 +85,8 @@ And create a new virtual environment called :code:`mad_env` in your home directo
Whenever you see :code:`python3` or :code:`pip3` in the documentation, use :code:`~/mad_env/bin/python3` and :code:`~/mad_env/bin/pip3` instead. And, of course, use a different environment location for different python tools.

You can activate the virtual environment via `source ~/mad_env/bin/activate`. This makes sure you can simply call `python3` or `pip3` wherever you are and it will perform all commands with the Python version and the dependencies form your virtualenvironment. Have a look at `this <https://docs.python.org/3/tutorial/venv.html>` or `this <https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/>` link for more information.

MAD
===

Expand All @@ -100,12 +102,17 @@ Change into in the directory of MAD and run:
pip3 install -r requirements.txt
MAD will also check the screen on your phone every now and then to check for errors. Make sure you have the required dependencies installed on your system:
MAD will also check the screen on your phone every now and then to check for errors. Make sure you have the required dependencies installed on your system. Unfortunately, there's no package for opencv on RaspberryPi which means you have to build it on your own. You should be able to find out how with a quick search on the web.

.. code-block:: bash
sudo apt-get install tesseract-ocr python3-opencv
Another but optional dependency you may want to install is `ortools <https://developers.google.com/optimization>`. MAD utilizes ortools to generate more optimized routes for your areas and it is as quick as MAD's built-in routing algorithm if not even faster. The downside of this as statet in `the requirements <../requirements>` is, that you need a 64-bit server.

This comment has been minimized.

Copy link
@clburlison

clburlison Jun 9, 2020

s/statet/states

This comment has been minimized.

Copy link
@sn0opy

sn0opy Jun 9, 2020

Author Contributor

statet is completely wrong, I agree. Shouldn't it be as being stated in instead?

This comment has been minimized.

Copy link
@muckelba

muckelba Jun 9, 2020

Contributor

fixed, thanks!

This comment has been minimized.

Copy link
@clburlison

clburlison Jun 9, 2020

Honestly either solution works. Just trying to help 🙂


.. code-block:: bash
pip3 install ortools
Configuration
=============

Expand All @@ -117,7 +124,7 @@ Copy the example config file and rename it to "config.ini":
and edit the config file accordingly.

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

.. code-block:: bash
Expand Down Expand Up @@ -264,7 +271,7 @@ Docker
======

.. note::
If you don't know anything about Docker, you probably want ignore this step.
This step is rather for advanced users. If you don't know anything about Docker, you probably want to ignore this step.

.. warning::
MAD's Docker support is community driven and untested by MAD's core developers!
Expand All @@ -285,10 +292,10 @@ First of all, you have to install Docker CE and docker-compose on your system.
These sites are well documented and if you follow the install instructions, you are good to go.


Setup MAD and Rocketmap database.
Setup MAD and RocketMAD database.
---------------------------------

In this section we explain how to setup MAD and a Rocketmap database using docker-compose.
In this section we explain how to setup MAD and a RocketMAD database using docker-compose.

Preparations
----------------
Expand Down Expand Up @@ -318,7 +325,7 @@ This will:
#. Create a directory `MAD-docker/mad/configs`. (here we store config files for MAD). Here you store your `config.ini`.
#. Create a directory `MAD-docker/rocketdb`. (here we store config files for mariaDb). Here you store your `my.cnf`.
#. Create a directory `MAD-docker/docker-entrypoint-initdb`
#. Download the Rocketmap Database Schema: https://raw.githubusercontent.com/Map-A-Droid/MAD/master/SQL/rocketmap.sql and store it in the directory `docker-entrypoint-initdb`.
#. Download the RocketMAD Database Schema: https://raw.githubusercontent.com/Map-A-Droid/MAD/master/SQL/rocketmap.sql and store it in the directory `docker-entrypoint-initdb`.

Your directory should now look like this:

Expand Down

0 comments on commit 433b2d3

Please sign in to comment.