Skip to content

Commit

Permalink
refactoring structure
Browse files Browse the repository at this point in the history
  • Loading branch information
fsignorini committed Apr 12, 2018
1 parent 84bf1f1 commit 9d3ef99
Show file tree
Hide file tree
Showing 33 changed files with 859 additions and 781 deletions.
33 changes: 33 additions & 0 deletions architecture.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
====================
Cloud Inventory
====================

Cloud Inventory able to catalog and manager system in multi-cloud environment

- Server manager in multi-cloud
- Reports with advanced filters
- ‎Scheduler commands with Ansible
- ‎Auto Discovery for cloud environment

Architecture
------------

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

Cloud inventory micro services:

.. toctree::
:maxdepth: 1

client_app
server_app
discovery_app
reports_app
scheduler_app
remote_app
data_app
authenticator_app
websocket_app



Binary file modified docs/_static/screen/arch_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/_static/screen/arch_11.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 0 additions & 24 deletions docs/developer/api.rst

This file was deleted.

8 changes: 8 additions & 0 deletions docs/developer/api/discovery.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Discovery API
-------------

Crawler and connection with api providers. `See docs discovery api <https://maestro-server.github.io/discovery-api/>`_.

.. raw:: html

<iframe src="https://maestro-server.github.io/discovery-api/" height="645px" width="100%"></iframe>
10 changes: 10 additions & 0 deletions docs/developer/api/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
APIs
====================

All commands, jobs, tasks or action is made by rest api, you can use se same api to integrate with your own applications.

.. toctree::
:maxdepth: 1

server
discovery
8 changes: 8 additions & 0 deletions docs/developer/api/server.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
Server API
----------

Primary api, encharge by autentication, create and retrive data. `See docs server api <https://maestro-server.github.io/server-app/docs/inventory/>`_.

.. raw:: html

<iframe src="https://maestro-server.github.io/server-app/docs/inventory/" height="645px" width="100%"></iframe>
157 changes: 0 additions & 157 deletions docs/developer/architecture.rst

This file was deleted.

9 changes: 9 additions & 0 deletions docs/developer/architecture/authenticator_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Autehnticator APP
-----------------

Autehnticator APP, security remote autehnticator
- Remote autehnticator for remote server

.. Danger::
This service is under development
34 changes: 34 additions & 0 deletions docs/developer/architecture/client_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
Client App
----------

The front end is written with:

====================== ===========================================================================
Vue2 Main framework, using by react and manager views, routes and temaplates,
use vue-loader with webpack
Webpack2 bundler generate
Bootue All micro components, like buttons, tables, forms and etc,
its 100% Bootstrap3 components built with Vue2, 100% standalone, no query.
Nginx Using for proxy reverse
Mocha / Chai / Sinon Test, asserts and mock library.
====================== ===========================================================================

----------

**Vue2 Macro Architecture**

.. image:: ../../_static/screen/client_arch.png

**Important topics**

- Front end application is divided in:

- **src/pages:** templates and bussiness rules (domain layer)

- **resources:** factories, modals, and cache managers (infrastructure layer)

----------

A single folder structure components normally use:

.. image:: ../../_static/screen/client_component.png
9 changes: 9 additions & 0 deletions docs/developer/architecture/data_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

Data APP
---------------

Data app, database gateway micro service
- Request and response database operations

.. Danger::
This service is under development
56 changes: 56 additions & 0 deletions docs/developer/architecture/discovery_app.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Discovery App
-------------

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

Discovery using `Flask <http://flask.pocoo.org>`_, and python >3.5, has api rest, and tasks.

**Setup dev env**

.. code-block:: bash
cd devtool/
docker-compose up -d
Will be setup rabbitmq and redis

**Windows Env**

If you use windows, celery havent support for windows, the last version is 3.1.25.

.. code-block:: bash
pip3 install celery==3.1.25
npm run powershell
**Important topics**

- Controller used factory dc abstract to create easy way to make CRUD in mongodb

- The crawler is divided in 3 parts

- **api:** connect in api provider and get result

- **translate:** normalize the data

- **insert:** insert/update data in mongodb

Each step have unique task.

- Config is managed by env variables, need to be, because in production env like k8s is easier to manager the pods.

- Repository has pymongo objects.

----------

**Flower - Debbug Celery**

We installed a flower, it's a control panel to centralize results throughout rabbitMQ, very useful to troubleshooting producer and consumers.

.. code-block:: bash
flower -A app.celery
npm run flower
21 changes: 21 additions & 0 deletions docs/developer/architecture/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Architecture
====================

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

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

----------

.. toctree::
:maxdepth: 1

client_app
server_app
discovery_app
reports_app
scheduler_app
remote_app
data_app
authenticator_app
websocket_app

0 comments on commit 9d3ef99

Please sign in to comment.