update READMES
This commit is contained in:
parent
397e4978e2
commit
f9ec594a0e
38
README.md
38
README.md
|
@ -2,17 +2,17 @@
|
|||
|
||||
Devicehub is a distributed IT Asset Management System focused on reusing digital devices, created under the [eReuse.org](https://www.ereuse.org) initiative.
|
||||
|
||||
This README explains how to install and use Devicehub. [The documentation](http://devicehub.ereuse.org) explains the concepts, usage and the API.
|
||||
This README explains how to install and use Devicehub. [The documentation](http://devicehub.ereuse.org) explains the concepts, usage and the API it provides.
|
||||
|
||||
Devicehub is built with [Teal](https://github.com/ereuse/teal) and [Flask](http://flask.pocoo.org).
|
||||
|
||||
Devicehub relies on the existence of an [API_DLT connector](https://gitlab.com/dsg-upc/ereuse-dpp) verifiable data registry service, where certain operations are recorded to keep an external track record (ledger).
|
||||
Devicehub relies on the existence of an [API_DLT connector](https://gitlab.com/dsg-upc/ereuse-dpp) verifiable data registry service, where specific operations are recorded to keep an external track record (ledger).
|
||||
|
||||
# Installing
|
||||
Please visit the [Manual Installation](README_MANUAL_INSTALLATION.md) instructions to understand the detailed steps to install it locally or deploy it on a server.
|
||||
Please visit the [Manual Installation](README_MANUAL_INSTALLATION.md) instructions to understand the detailed steps to install it locally or deploy it on a server. However, we recommend the following Docker deployment process.
|
||||
|
||||
# Docker
|
||||
There is a Docker compose file for an automated deployment. The next steps describe how to run and use it.
|
||||
There is a Docker compose file for an automated deployment. The following steps describe how to run and use it.
|
||||
|
||||
1. Download the sources:
|
||||
```
|
||||
|
@ -20,24 +20,24 @@ There is a Docker compose file for an automated deployment. The next steps descr
|
|||
cd devicehub-teal
|
||||
```
|
||||
|
||||
2. If you want to initialize your DeviceHub instance with a sample device snapshot you can copy it into that directory.
|
||||
2. If you want to initialise your DeviceHub instance with sample device snapshots, copy it/them into that directory. e.g.
|
||||
```
|
||||
cp snapshot01.json examples/snapshots/
|
||||
```
|
||||
|
||||
Otherwise, the device inventory of your DeviceHub instance will be empty and ready to add new devices. For that you need to change the var to 'n' in the **.env** file
|
||||
Otherwise, the device inventory of your DeviceHub instance will be empty and ready to add new devices. For that (no snapshot import), you need to change the var to 'n' in the **.env** file
|
||||
```
|
||||
IMPORT_SNAPSHOTS='n'
|
||||
```
|
||||
|
||||
To register new devices, the [workbench software](https://github.com/eReuse/workbench) can be run on a device to generate a hardware snapshot that can be uploaded to your DeviceHub instance.
|
||||
To register new devices, the [workbench software](https://github.com/eReuse/workbench) can be run on a device to generate its hardware snapshot that can be uploaded to your DeviceHub instance.
|
||||
|
||||
3. Modify the environment variables in the file .env You can find one example in examples/env.example.
|
||||
3. Setup the environment variables in the .env file. You can find one example in examples/env.example.
|
||||
If you don't have any, you can copy that example and modify the basic vars
|
||||
```
|
||||
cp examples/env.example .env
|
||||
```
|
||||
You can use these parameters as default for a local test, but default values may not be suitable for an internet-exposed service for security reasons. However, these three variables need to be initialized:
|
||||
You can use these parameters as default for a local test, but default values may not be suitable for an internet-exposed service for security reasons. However, these six variables need to be initialised:
|
||||
```
|
||||
API_DLT
|
||||
API_DLT_TOKEN
|
||||
|
@ -48,22 +48,22 @@ You can use these parameters as default for a local test, but default values may
|
|||
```
|
||||
These values should come from an already operational [API_DLT connector](https://gitlab.com/dsg-upc/ereuse-dpp) service instance.
|
||||
|
||||
If you want to use oidc4vp you need set the vars:
|
||||
If you want to use OIDC4VP, you need to set the vars:
|
||||
```
|
||||
SERVER_ID_FEDERATED
|
||||
CLIENT_ID_FEDERATED
|
||||
```
|
||||
You can see the [manual install step 9]('https://github.com/eReuse/devicehub-teal/blob/oidc4vp/README_MANUAL_INSTALLATION.md#installing') for get more detail.
|
||||
You can see the [manual install step 9]('https://github.com/eReuse/devicehub-teal/blob/oidc4vp/README_MANUAL_INSTALLATION.md#installing') for more details.
|
||||
|
||||
4. Build and run the docker containers:
|
||||
```
|
||||
./launcher.sh
|
||||
```
|
||||
To stop these docker containers you can use Ctl+C, and if you run again "compose up" you'll maintain the data and infrastructure state.
|
||||
To stop these docker containers, you can use Ctl+C. You'll maintain the data and infrastructure state if you run "compose up" again.
|
||||
|
||||
On the terminal screen, you can follow the installation steps. If there are any problems, error messages will appear here. The appearance of several warnings is normal and can be ignored.
|
||||
|
||||
If the last line you see one text like this, *exited whit code*:
|
||||
If the last line you see one text like this, *exited with code*:
|
||||
```
|
||||
devicehub-teal-devicehub-id-client-1 exited with code 1
|
||||
```
|
||||
|
@ -77,9 +77,9 @@ If the deployment was end-to-end successful (two running Devicehub instances suc
|
|||
devicehub-teal-devicehub-id-server-1 | * Running on http://172.28.0.5:5000/ (Press CTRL+C to quit)
|
||||
```
|
||||
|
||||
That means the two Devicehub instances are running in their containers, that can be reached as http://localhost:5000/ and http://localhost:5001/
|
||||
That means the two Devicehub instances are running in their containers, which can be reached as http://localhost:5000/ and http://localhost:5001/
|
||||
|
||||
Once the devicehub instances are running, you might want to register a user bind to the DLT with the following commands (here, assumes you want to execute it on devicehub-id-client, you might also want to do it in devicehub-id-server). Change the variables accordingly
|
||||
Once the DeviceHub instances are running, you might want to register a user binding to the DLT with the following commands (here, it assumes you want to execute it on devicehub-id-client, you might also want to do it in devicehub-id-server). Change the variables accordingly
|
||||
|
||||
```
|
||||
FILE=my_users_devicehub.json
|
||||
|
@ -112,14 +112,14 @@ To know the valid value for ${target_docker_image} you can use:
|
|||
|
||||
6. These are the details for use in this implementation:
|
||||
|
||||
Devicehub with url (http://localhost:5000) is the identity provider of OIDC and have user defined in **.env** file with SERVER_ID_EMAIL_DEMO var.
|
||||
Devicehub with URL (http://localhost:5000) is the identity provider of OIDC and have a user defined in **.env** file with SERVER_ID_EMAIL_DEMO var.
|
||||
|
||||
Devicehub with url (http://localhost:5001) is the client identity of OIDC and have user defined in **.env** file with SERVER_ID_EMAIL_DEMO var.
|
||||
Devicehub with URL (http://localhost:5001) is the client identity of OIDC and have a user defined in **.env** file with SERVER_ID_EMAIL_DEMO var.
|
||||
|
||||
You can change these values in the *.env* file
|
||||
|
||||
7. If you want to use Workbench for these DeviceHub instances you need to go to
|
||||
7. If you want to use Workbench for these DeviceHub instances, you need to go to
|
||||
```
|
||||
http://localhost:5001/workbench/
|
||||
```
|
||||
with the demo user and then download the settings and ISO files. Follow the instructions that appear on the [help](https://help.usody.com/en/setup/setup-pendrive/) page.
|
||||
with the demo user and then download the settings and ISO files. Follow the instructions on the [help](https://help.usody.com/en/setup/setup-pendrive/) page.
|
||||
|
|
|
@ -40,7 +40,7 @@ Configure project using environment file (you can use provided example as quicks
|
|||
```bash
|
||||
$ cp examples/env.example .env
|
||||
```
|
||||
You can use these parameters as default for a local test, but default values may not be suitable for an internet-exposed service for security reasons. However, these three variables need to be initialized:
|
||||
You can use these parameters as default for a local test, but default values may not be suitable for an internet-exposed service for security reasons. However, these six variables need to be initialized:
|
||||
```
|
||||
API_DLT
|
||||
API_DLT_TOKEN
|
||||
|
|
Reference in New Issue