TODO merge with devicehub | devicehub adapted to trustchain oc1 orchestral (dpp branch)
This repository has been archived on 2024-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
Xavier Bustamante Talavera 27afad7312 Merge branch 'master' of https://github.com/eReuse/devicehub-teal
# Conflicts:
#	README.md
2018-06-21 17:45:33 +02:00
docs Add docs etag 2018-06-19 22:50:46 +02:00
ereuse_devicehub Fix installation issues 2018-06-21 17:39:40 +02:00
tests Add computer monitor; dummy; fix 2018-06-20 23:18:15 +02:00
.gitignore Initial commit 2018-04-10 17:06:06 +02:00
MANIFEST.in Fix installation issues 2018-06-21 17:39:40 +02:00
README.md Merge branch 'master' of https://github.com/eReuse/devicehub-teal 2018-06-21 17:45:33 +02:00
setup.cfg Fix installation issues 2018-06-21 17:39:40 +02:00
setup.py Fix installation issues 2018-06-21 17:39:40 +02:00

README.md

Devicehub

Devicehub is an IT Asset Management System focused in reusing devices, created under the project eReuse.org.

Our main objectives are:

  • To offer a common IT Asset Management for donors, receivers and IT professionals so they can manage devices and exchange them. This is, reusing and ultimately recycling.
  • To automatically recollect, analyse, process and share (controlling privacy) metadata about devices with other tools of the eReuse ecosystem to guarantee traceability, and to provide inputs for the indicators which measure circularity.
  • To highly integrate with existing IT Asset Management Systems.
  • To be decentralized.

Devicehub is built with Teal and Flask.

Installing

The requirements are:

  • Python 3.5.3 or higher. In debian is # apt install python3-pip.
  • PostgreSQL 9.6 or higher. In debian is # apt install postgresql
  • passlib. In debian is # apt install python3-passlib.

Install Devicehub with pip: pip3 install ereuse-devicehub -U --pre.

Running

Create a python file with the following and call it app.py:

from ereuse_devicehub.devicehub import Devicehub
from ereuse_devicehub.config import DevicehubConfig
class MyConfig(DevicehubConfig):
    ORGANIZATION_NAME = 'My org'
    ORGANIZATION_TAX_ID = 'foo-bar'


app = Devicehub(MyConfig())

Create a PostgreSQL database called devicehub:

# su - postgres
postgres $ createdb devicehub
postgres $ psql devicehub
postgres $ GRANT ALL PRIVILEGES ON DATABASE devicehub TO dhub;
postgres $ \q

Create the tables in the database by executing in the same directory where app.py is:

$ flask init-db

Finally, run the app:

$ flask run

See the Flask quickstart for more info.

Administrating

Devicehub has many commands that allows you to administrate it. You can, for example, create a dummy database of devices with flask dummy or create users with flask create-user. See all the available commands by just executing flask and get more information per command by executing flask command --help.