Skip to content

Commit

Permalink
update installing pages
Browse files Browse the repository at this point in the history
  • Loading branch information
fsignorini committed Jun 11, 2018
1 parent 5c3d2a9 commit 0049c70
Show file tree
Hide file tree
Showing 21 changed files with 768 additions and 710 deletions.
Binary file added docs/_static/screen/data.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/screen/reports.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/_static/screen/scheduler.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 0 additions & 9 deletions docs/developer/architecture/authenticator_app.rst

This file was deleted.

66 changes: 62 additions & 4 deletions docs/developer/architecture/client_app.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
Client App
----------
FrontEnd - Client App
---------------------

Client App front end application

- Html and Js client application
- Single page app (SPA)
- Cache layer

.. Warning::
This service needs a proxy reverse like nginx or haproxy.

The front end is written with:
----------

====================== ===========================================================================
Vue2 Main framework, using by react and manager views, routes and temaplates,
Expand Down Expand Up @@ -31,4 +40,53 @@ Mocha / Chai / Sinon Test, asserts and mock library.

A single folder structure components normally use:

.. image:: ../../_static/screen/client_component.png
.. image:: ../../_static/screen/client_component.png

----------

**Installation with node**

- Nodejs >= 7.4

Download de repository

.. code-block:: bash
git clone https://github.com/maestro-server/client-app.git
----------

**Install dependences**

.. code-block:: bash
npm install
----------

**Production build**

.. code-block:: bash
npm run build
----------

**Dev run**

.. code-block:: bash
npm run dev
----------

**Env variables**

======================= ============================ ===============================
Env Variables Example Description
======================= ============================ ===============================
API_URL http://localhost:8888 Server App Url
STATIC_URL /upload/ Relative path of static content
LOGO /static/imgs/logo300.png Logotype, (login page)
THEME theme-lotus Theme (gold|wine|blue|green|dark)
======================= ============================ ===============================
62 changes: 62 additions & 0 deletions docs/developer/architecture/data_app.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ Data app, database gateway micro service

Simple Rest API using `Flask <http://flask.pocoo.org>`_ (python) + pymongo.

---------------

.. image:: ../../_static/screen/data.png

**Setup dev env**

.. code-block:: bash
Expand All @@ -30,3 +34,61 @@ Mongo service
docker-compose up -d
Will be setup mongodb

----------

**Installation with python 3**

- Python >3.4
- MongoDB

Download de repository

.. code-block:: bash
git clone https://github.com/maestro-server/data-app.git
----------

**Install run api**

.. code-block:: bash
python -m flask run.py --port 5010
or
FLASK_APP=run.py FLASK_DEBUG=1 flask run --port 5010
or
npm run server
----------

.. Warning::

For production environment, use something like gunicorn.

.. code-block:: python
# gunicorn_config.py
import os
bind = "0.0.0.0:" + str(os.environ.get("MAESTRO_PORT", 5010))
workers = os.environ.get("MAESTRO_GWORKERS", 2)
----------

**Env variables**

======================= ============================ ===========================================
Env Variables Example Description
======================= ============================ ===========================================
MAESTRO_PORT 5000 Port used
MAESTRO_MONGO_URI localhost Mongo Url conn
MAESTRO_MONGO_DATABASE maestro-reports Db name, its differente of servers-app
MAESTRO_GWORKERS 2 Gunicorn multi process
MAESTRO_INSERT_QTD 200 Throughput insert in reports collection
======================= ============================ ===========================================
89 changes: 88 additions & 1 deletion docs/developer/architecture/discovery_app.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Discovery App
-------------

Discovery App service to connect and crawler provider

- Encharge to manager and authenticate in each provider
- Crawler the data and record into db
- Consume batch insert data

----------

.. image:: ../../_static/screen/discovery.png

Discovery using `Flask <http://flask.pocoo.org>`_, and python >3.5, has api rest, and tasks.
Expand Down Expand Up @@ -55,4 +63,83 @@ You can install a flower, it's a control panel to centralize results throughout
flower -A app.celery
npm run flower
npm run flower
----------

**Installation with python 3**

- Python >3.4
- RabbitMQ

Download de repository

.. code-block:: bash
git clone https://github.com/maestro-server/discovery-api.git
----------

**Install dependences**

.. code-block:: bash
pip install -r requeriments.txt
----------

**Install run api**

.. code-block:: bash
python -m flask run.py
or
FLASK_APP=run.py FLASK_DEBUG=1 flask run
or
npm run server
----------

**Install run rabbit workers**

.. code-block:: bash
celery -A app.celery worker -E -Q discovery --hostname=discovery@%h --loglevel=info
or
npm run celery
----------

.. Warning::

For production environment, use something like gunicorn.

.. code-block:: python
# gunicorn_config.py
import os
bind = "0.0.0.0:" + str(os.environ.get("MAESTRO_PORT", 5000))
workers = os.environ.get("MAESTRO_GWORKERS", 2)
----------

**Env variables**

======================= ============================ ============================
Env Variables Example Description
======================= ============================ ============================
MAESTRO_DATA_URI http://localhost:5010 Data Layer API URL
MAESTRO_SECRETJWT xxxx Same that Server App
MAESTRO_TRANSLATE_QTD 200 Prefetch translation process
MAESTRO_GWORKERS 2 Gunicorn multi process
CELERY_BROKER_URL amqp://rabbitmq:5672 RabbitMQ connection
CELERYD_TASK_TIME_LIMIT 10 Timeout workers
======================= ============================ ============================
15 changes: 10 additions & 5 deletions docs/developer/architecture/index.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
Architecture
====================

Services relation, each service comunite by `rest` (http) calls.
This section show a advanced configurations for each micro service.

**Constainerazed system:**
Made with containers in mind, Maestro Server is deployed with Docker.

**Micro service arch:**
Created with micro services in mind, each service has your responsability.

Services relation, each service communicate by `rest` (http) calls.

.. image:: ../../_static/screen/arch_1.png

Expand All @@ -15,7 +23,4 @@ Services relation, each service comunite by `rest` (http) calls.
discovery_app
reports_app
scheduler_app
remote_app
data_app
authenticator_app
websocket_app
data_app
11 changes: 0 additions & 11 deletions docs/developer/architecture/remote_app.rst

This file was deleted.

0 comments on commit 0049c70

Please sign in to comment.