Giter VIP home page Giter VIP logo

arrowhead-device-registry's Introduction

Device Registry

This project contains three different applications.

  1. Device Registry Server Backend
  2. Device Registry Server UI
  3. Device Registry Client

The goal of this project is to have a Device Registry component, to have a list of all the different components in our cloud and see if they are still up and running. When a client is started, it registers itself on the server. Also the server may contact the client to check if the client is still up and running. The application is independent of the Arrowhead Framework. So it can only show if the device is up and running but not the framework.

Device Registry Server Backend is developed using:

  • OpenJDK 11
  • Spring Boot
  • MariaDB 10.5

Device Registry Server UI is developed with

  • Angular 10

Device Registry Client is developed using:

  • OpenJDK 11
  • Spring Boot

It doesn't require a database.

How to deploy the device registry:

1) Server Side

First, install OpenJDK 11, MariaDB 10.5 on the server. The Spring Boot application needs the authentication information of the database. To enter the authentication information of the database, edit the following properties in the application.properties file:

spring.datasource.username=<USERNAME>
spring.datasource.password=<PASSWORD>

The user needs the rights to create databases and tables in the database. The default username is root and the default password is admin in the properties file. After entering the database information, you need to enter the information about the backend server to the UI. You need to know the ip of the server, where the Device Registry will run. In the /ArrowheadUI/src/environments folder, you will find the environment.prod.ts file, where you need to edit

  serverUrl: '<SERVERIP>',
  serverPort : '<SERVERPORT>'

Then execute the following command in the ArrowheadUI/ folder.

ng build --prod

Copy the content of the dist/ArrowheadUI from the UI application into the arrowheadDemo/target/classes/static folder of the Spring Boot application and create the JAR file with maven:

mvn install

The jar file is created under target folder and called DeviceRegistryServer-0.0.1-SNAPSHOT.jar by default. You can start the application by running the following command

java -jar DeviceRegistryServer-0.0.1-SNAPSHOT.jar

2) Client Side

First, install OpenJDK 11 on the client machine. You need to enter the address and the port of the server so that the client can register itself on the server. For entering the connection information, you need to edit the following properties in the application.properties file:

Arrowheadserver.address = localhost
Arrowheadserver.port = 8080

Other properties needed on the client side are:

client.name= <Name of the client. IT SHOULD BE UNIQUE FOR EVERY CLIENT>
client.address = <Address of the client. This address is used by the server to connect to client>
client.port = <Port of the client. This is sent to the server.>
server.port= <Port of the client. Should be the same one with client.port>

The jar file is called DeviceRegistryClient-0.0.1-SNAPSHOT.jar by default. You can start the application by running the following command

java -jar DeviceRegistryClient-0.0.1-SNAPSHOT.jar

How to use

The server needs to be started before the client. When the server starts, it starts to wait for other devices to register themselves. To refresh the status of the devices, click the "Refresh" button on the UI. The server will then try to connect to each device to get their status. Devices, that are offline will disappear from the list.

The UI can be accessed from :8080

Using Arrowhead Framework

The Arrowhead Framework components may be installed with debian installation files. Please see the official documentation for installing Arrowhead Framework:

https://github.com/eclipse-arrowhead/core-java-spring/blob/master/documentation/deb-installer/DEBIAN-INSTALL.md

Since in the latest version 4.2.0, the github doesn't include .deb files, I have generated them and uploaded in this repository. Please find them under debs/

The official documentation for the Arrowhead Framework can be found under this link: https://github.com/eclipse-arrowhead/core-java-spring

The core components of the Arrowhead Framework are:

  • Service Registry
  • Authorization
  • Orchestrator

arrowhead-device-registry's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.