Go to file
sergio_gimenez ab44bee93a Add improved redame 2024-11-09 21:22:31 +01:00
action base of proyect 2024-06-12 09:32:49 +02:00
admin email up 2024-10-15 11:06:08 +02:00
api endpoint for insert annotations from api 2024-10-24 11:53:37 +02:00
dashboard fix duplicates in search view 2024-10-28 18:09:45 +01:00
db add minimal docker support for debugging 2024-08-02 13:05:09 +02:00
device add erase server definition 2024-10-28 17:52:34 +01:00
dhub resolve conflict 2024-10-21 18:41:43 +02:00
docker add commit footer for docker 2024-10-18 15:25:27 +02:00
docs/es init manual because of init of placeholder docs 2024-10-14 13:53:37 +02:00
documents base of proyect 2024-06-12 09:32:49 +02:00
evidence add erase server definition 2024-10-28 17:52:34 +01:00
example Import device from a file 2024-09-03 16:41:38 +02:00
login commit in login page 2024-10-18 15:25:27 +02:00
lot add erase server definition 2024-10-28 17:52:34 +01:00
tag base of proyect 2024-06-12 09:32:49 +02:00
user add predefined_token 2024-10-16 21:54:54 +02:00
utils Add reindex from snapshots files 2024-10-25 17:36:13 +02:00
.env.example improve .env and docker-reset 2024-11-09 21:22:31 +01:00
.gitignore add .env ignore 2024-07-01 12:20:20 +02:00
LICENSE add LICENSE before going public 2024-09-18 12:10:36 -03:00
README.md Add improved redame 2024-11-09 21:22:31 +01:00
docker-compose.yml docker-compose: bugfix DOMAIN vs ALLOWED_HOSTS 2024-10-18 15:25:27 +02:00
docker-reset.sh improve .env and docker-reset 2024-11-09 21:22:31 +01:00
manage.py base of proyect 2024-06-12 09:32:49 +02:00
requirements.txt repair bad jsons 2024-10-21 18:39:31 +02:00
reset.sh add admin from add_user command 2024-10-07 16:57:26 +02:00

README.md

Device Hub

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

Overview

DeviceHub aims to:

  • Provide a common IT Asset Management platform for donors, receivers, and IT professionals.
  • Automatically collect, analyze, and share device metadata while ensuring privacy and traceability.
  • Integrate with existing IT Asset Management Systems.
  • Operate in a decentralized manner.

DeviceHub primarily works with three types of objects:

  1. Devices: Including computers, smartphones, and their components.
  2. Events: Actions performed on devices (e.g., Repair, Allocate).
  3. Accounts: Users who perform events on devices.

Installation

Quickstart

For a quick start with dummy data, DeviceHub can be run directly with docker. To do so, from the root of the project run:

./docker-reset.sh

Also there is a demo running in http://demo.ereuse.org/. The token for accessing the instance will be always: token=5018dd65-9abd-4a62-8896-80f34ac66150, but the instance will be reset every day a t 4 am.

Running from baremetal

Prerequisites

  • Python 3.10
  • pip
  • virtualenv

Specially when developing, is quite convenient to run DeviceHub from a virtual environment. To start with this deployment, create a virtual environment to isolate our project dependencies:

python -m venv env
source env/bin/activate
pip install -r requirements.txt

System Dependencies

Xapian

Now, install the xapian dependencies (xapian library and python bindings)

sudo apt-get install python3-xapian libxapian-dev

Allow the virtual environment to use system-installed packages:

export PYTHONPATH="${PYTHONPATH}:/usr/lib/python3/dist-packages"

Environment Variables

Now, configure the environment variables. For this, we will expand a .env file. You can use the following content as an example:

STATIC_ROOT=/tmp/static/
MEDIA_ROOT=/tmp/media/
ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1,
DOMAIN=localhost
DEBUG=True

Now, expand the enviroment variables:

source .env

Migrations

Now, apply migrations

python manage.py makemigrations
python manage.py migrate

Also, we can add some dummy data into the database to play along:

python manage.py add_institution Pangea
python manage.py add_user Pangea user@example.org 1234
python manage.py up_snapshots example/snapshots/ user@example.org

Run DeviceHub

Finally, we can run the DeviceHub service by running:

python manage.py runserver

Clean up

To clean up the deployment and start fresh, just delete Django's database:

rm db/*

License

DeviceHub is released under the GNU Affero General Public License v3.0.