You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 18 Next »

<work in progress>

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:

  1. JDK – 1.8
  2. TOMCAT – v8
  3. MAVEN – v3
  4. MySQL DB – v5.6

Prerequisites

The below software should be installed and available for running Device Manager server.

MySQL DB

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 – 1.8

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.

Tomcat – 8

Tomcast 8 is required to deploy Device Manager server. Tomcat server installation file and setup documents can be found in the below links:

Maven – 3

Maven is the tool used for building and managing Device Manager project. Please follow the below links to download and install Maven:

Environment Setup

Following are the steps to be followed to setup Device Manager Server and its dependent softwares in a Machine:

My SQL DB Setup and Configuration

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 Device Manager .war file

Build the .war file of Device Manager server using Maven 3 and JDK 8.

To do this follow the below steps:

  1. Pull the latest Device Manager project from the repository.
  2. After completing the pull, go the resources folder in the device manager project, and add the DB IP address, port, username and password in application.properties(device-manager\src\main\resources). Please note DB password should be Base64 encoded.
  3. Now navigate to the project Home folder and run the command “mvn clean install”.
  4. This will build device-manager-1.0.0-SNAPSHOT.war file of device-manager server in the folder “project_home/target”.

Deploy Device Manager application

Device Manager application should be deployed in Tomcat server (ver 8). Follow the below steps to deply the application.

  1. Copy device-manager-1.0.0-SNAPSHOT.war file from “project_home/target” to “TOMCAT_HOME/webapps” folder.
  2. Rename device-manager-1.0.0-SNAPSHOT.war to DeviceManager.war.
  3. If you need to run the tomcat server in a port other than 8080, please follow the below steps to change the same.
    • Navigate to the folder “TOMCAT_HOME/conf”.
    • Open server.xml and change the connector port in this file from 8080 to an available port of your choice. If another tomcat is running the same machine then change the DEFAULT Tomcat server SHUTDOWN port from 8005 to another available port. If you dont need to a SHUTDOWN port for tomcat then change the default port from 8005 to “-1”,
  4. To start Device Manager application go to “TOMCAT_HOME/bin” folder and run sh or startup.bat (if its running on Microsoft windows) script.
  5. To verify server logs check “TOMCAT_HOME/logs/catalina.out” file.


To verify Device Manager application go to the URL : “{protocol}://{host:port}/DeviceManager/deviceCategory/all“


  • No labels