RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
<work in progress>
Table of Contents |
---|
Background Color | ||
---|---|---|
| ||
Introduction |
<Short description- Device Manager>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:
Background Color | ||
---|---|---|
| ||
Prerequisites |
The below software should be installed and available for running Device Manager server.
Check whether My SQL DB is already installed and up and running. For installation of MySQL in the below OS refer the below links
JDK should be available in the build machine where the .war file for Device Manager server is build and it should be available in the server machine.
Tomcast 8 is required to deploy Device Manager server. Tomcat server installation file and setup documents can be found in the below links:
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.
Code Block | ||
---|---|---|
| ||
sudo yum -y update |
Code Block | ||
---|---|---|
| ||
sudo yum install java-17-openjdk |
Code Block | ||
---|---|---|
| ||
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.
Code Block | ||
---|---|---|
| ||
sudo yum update |
Create a new repo file for the latest version.
Code Block | ||
---|---|---|
| ||
vi /etc/yum.repos.d/MariaDB.repo |
Copy and paste the following contents into the /etc/yum.repos.d/mariadb.repo file.
Code Block |
---|
[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.
Code Block | ||
---|---|---|
| ||
sudo yum install MariaDB-server galera-4 MariaDB-client MariaDB-shared MariaDB-backup MariaDB-common |
Start the MariaDB service with this command.
Code Block | ||
---|---|---|
| ||
sudo systemctl start mariadb |
To set MariaDB to start automatically when the VM boots up, use the following command.
Code Block | ||
---|---|---|
| ||
sudo systemctl enable mariadb |
Check the current status of MariaDB using this command.
Code Block | ||
---|---|---|
| ||
sudo systemctl status mariadb |
Check the currently installed MariaDB version with this command.
Code Block | ||
---|---|---|
| ||
sudo mysql -u root -p -V |
Follow below Steps to setup Tomcat server on CentOs/linux.
Code Block | ||
---|---|---|
| ||
wget -c https://downloads.apache.org/tomcat/tomcat-9/v9.0.85/bin/apache-tomcat-9.0.85.tar.gz |
Code Block | ||
---|---|---|
| ||
sudo tar -xvf apache-tomcat-9.0.85.tar.gz -C /opt/automatics/ |
Sample Output:
Setup: https://tomcat.apache.org/tomcat-8.5-doc/setup.html
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
Background Color | ||
---|---|---|
| ||
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 :
Background Color | ||
---|---|---|
| ||
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
Background Color | ||
---|---|---|
| ||
mysql> source <<path to 'Device_Manager_DB.sql' file>> |
To connect to 'device_manager' DB and run table creation scripts
Background Color | ||
---|---|---|
| ||
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.
Background Color | ||
---|---|---|
| ||
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.
Background Color | ||
---|---|---|
| ||
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