Introduction |
Device Manager is an application to manage different devices by fetching the device details, adding devices, adding device groups, managing device reservations etc.
This document provides the deployment steps for setting up Device Manager server and all its dependencies.
For setting up this server the below applications or tools should be available in the server machine:
Prerequisites |
The below software should be installed and available for running Device Manager server.
If you already have an existing setup of Automatics you can follow the steps in this page for upgrading the software's Automatics Technology Stack - Upgrade
Please note that even though the recommended version of Orchestration is JDK17, it is reverse compatible with JDK11 also. So code also be compiled with JDK11. Follow Steps below to install Java 17 on CentOS/linux.
sudo yum -y update |
sudo yum install java-17-openjdk |
java -version |
Sample output:
Follow below steps to install and configure MariaDB on CentOS/linux
All the packages need to be up-to-date. Use the following command to update your packages.
sudo yum update |
Create a new repo file for the latest version.
vi /etc/yum.repos.d/MariaDB.repo |
Copy and paste the following contents into the /etc/yum.repos.d/mariadb.repo file.
[mariadb] name = MariaDB baseurl = http://yum.mariadb.org/10.11/centos7-amd64 gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB gpgcheck=1 |
To exit and save the Vim file, type :wq and press Enter.
Install 10.11 of MariaDB and the most common packages, using the command below.
sudo yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common |
Start the MariaDB service with this command.
sudo systemctl start mariadb |
To set MariaDB to start automatically when the VM boots up, use the following command.
sudo systemctl enable mariadb |
Check the current status of MariaDB using this command.
sudo systemctl status mariadb |
Check the currently installed MariaDB version with this command.
sudo mysql -u root -p -V |
Follow below Steps to setup Tomcat server on CentOs/linux.
wget -c https://downloads.apache.org/tomcat/tomcat-9/v9.0.85/bin/apache-tomcat-9.0.85.tar.gz |
sudo tar -xvf apache-tomcat-9.0.85.tar.gz -C /opt/automatics/ |
Sample Output:
Maven – 3
Maven is the tool used for building and managing Device Manager project. Please follow the below links to download and install Maven:
Following page will provide the detailed steps to setup maven.
Automatics Orchestration Setup#Maven3
Environment Setup |
Following are the steps to be followed to setup Device Manager Server and its dependent softwares in a Machine:
After installation of My SQL DB, connect to DB using MySQL command line tool.
1.Create a database with name 'device_manager'.
DB creation command :
mysql> create database device_manager; mysql> use device_manager; -- For connecting to device_manager DB |
2.For creating all the tables required for Device Manager server, excecute the script 'sql' available with Device Manager source code inside 'device-manager\src\main\resources'.
Excecute Table creation script:
If already connected to 'device_manager' DB
mysql> source <<path to 'Device_Manager_DB.sql' file>> |
To connect to 'device_manager' DB and run table creation scripts
mysql -u root -p device_manager < Device_Manager_DB.sql |
3.Check whether all the tables are created successfully in DB, run the below command after connecting to 'device_manager' DB.
mysql> show tables; |
Build the .war file of Device Manager server using Maven 3.8 and JDK 17.
To do this follow the below steps:
Device Manager application should be deployed in Tomcat server (ver 8). Follow the below steps to deploy the application.
To verify Device Manager application go to the URL : “{protocol}://{host:port}/DeviceManager/deviceCategory/all“
If DeviceManager is already deployed, but swagger API /Device/addDeviceUsingPOST not displaying following fields, then we have to upgrade Device Manager to configure connected client details.
Steps to upgrade Device Manager
If Device Manager is already deployed, then please follow below steps to enable feature for configuring peripheral device power details.
5. Next, configure the power operations supported by Remote Power Manager using PowerOperations add REST API. Details of power operations like POWER ON, POWER OFF, POWER CYCLE and POWER STATUS to be configured
6. Next, map the device with power slots of Remote Power Manager using PowerDevice add REST API.
Swagger Documentation |
Swagger UI is an tool which can be used to visualize and try out all the APIs of a web application. Swagger UI is integrated to Device Manager application and it could be used to visualize all the APIs in this application and Swagger UI can be used to invoke all the APIs in this application.
Device Manager documentation and Tryout feature can used by going to the URL : “{protocol}://{host:port}/DeviceManager/swagger-ui.html