You are on page 1of 17

EasyCount

Instruction Setup server for EasyCount solution


Version 2.0 (2021-07-22)

Introduction
This document is a "step-by-step" instruction how to install a new server for hosting an EasyCount
solution. This instruction can be used for on-premise and for Cloud installation.

Contents
1. System overview ....................................................................................................................................... 2
2. Prepare the installation ............................................................................................................................ 4
3. Install WEB server (IIS) .............................................................................................................................. 5
3.1 Install the WEB deploy extension ....................................................................................................... 7
4. Install SQL server ....................................................................................................................................... 8
4.1 Install SQL Server Management Studio .............................................................................................. 8
5. Install EasyCount applications .................................................................................................................. 9
5.1 Rest API installation on IIS ................................................................................................................ 10
5.2 Broker service ................................................................................................................................... 11
5.3 Grant permission for the IIS to the EasyCount program folder ........................................................ 13
5.3 Installing software in a different folder than default (C:\) ............................................................... 14
5.4 Install the EasyCount master database............................................................................................. 15
5.4.1 Create SQL server login .............................................................................................................. 15
5.4.2 Install the EasyCount database .................................................................................................. 17

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 1
EasyCount
1. System overview

Fig. 1.1 - system overview

The EasyCount solution uses following components:

 counter (reading the data from the production line)


 monitor (show production information, connected to the counter using a HDMI cable)
 WEB server (handling data in/out using REST API's)
 Broker Server (Windows service, processing incoming messages, updates the database)
 Database (data storage, managed by a SQL server)

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 2
EasyCount
The data are generated in these steps:

1. the counter is detecting the data from the production line and store this information locally.
Every minute a data record is send to the WEB server for message handling. Messages are sent
to a REST API using JSON format.
2. the WEB server receives the incoming counter message, validates the message, and stores it in a
message folder in the server.
3. every 20 seconds the Broker Service processes the messages in the message folder and updates
the database with the information.

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 3
EasyCount
2. Prepare the installation

The EasyCount solution must be installed on a machine, running Windows. The solution can be installed
on different platforms and here is a check list of what components needs to be installed on the server:

 Microsoft.NET framework 4.61 or greater


 IIS (Internet Information Services) - version 7 or greater

The EasyCount solution uses a database to store data. This requires a Microsoft SQL Server. The SQL
server does not have to be installed on the server if an SQL elsewhere in the company is available and
can be used for data storage.

If no SQL server is available an SQL Express server can be used. This is a free product from Microsoft and
the EasyCount solution runs fine on this server. Here is a link to download SQL Express 2019:

https://www.microsoft.com/en-us/Download/details.aspx?id=101064

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 4
EasyCount
3. Install WEB server (IIS)

The EasyCount solution uses REST API's for handling data in and out of the database. To handle this, the
IIS (Internet Information Services) from Microsoft is used. This WEB server is a part of all Windows
servers and here is a link to the official WEB site for the IIS: https://www.iis.net/

The installation of the WEB server can be different from platform to platform. This guide shows how to
install the IIS on a Windows Server 2016.

1. open the Server Manager

2. select "Add Roles and Features" in the upper right corner

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 5
EasyCount
3. select "Server Roles" and the features

select following to install (see figure above):

 WEB Server (IIS)


 Application Development
 Management Tools

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 6
EasyCount
3.1 Install the WEB deploy extension

This WEB deploy extension adds a feature to the IIS, so it is possible to import WEB applications as ZIP
files. This is used when the EasyCount solution shall be installed and when there are updates to the
installed solutions.

The WEB deploy extension can be found on the official IIS WEB site:

https://www.iis.net/downloads/microsoft/web-deploy

The WEB deploy extension can also be installed by using the "Microsoft Web Platform Installer" if this is
present on the machine.

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 7
EasyCount
4. Install SQL server

The EasyCount solution uses an SQL database for data storage. This must be a Microsoft SQL Server.

If an SQL server is already available for the solution, you can skip this section.

Start the installation program and follow these guidelines. Depending on the SQL Server version there
might be some small differences. Normally the default settings are used, so mostly the NEXT key is
pressed:

 install the SQL server as a new instance


 use the default name EXPRESS for the instance
 allow "Mixed Mode Authentication"

4.1 Install SQL Server Management Studio

The SQL Server Management Studio is a tool to operate the SQL server and the server installation. This
tool is used during the installation of the EasyCount solution.

The software can be downloaded from the official WEB site:

https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 8
EasyCount
5. Install EasyCount applications

The EasyCount standard applications are:

 Rest API for data handling (application running on the IIS)


 Broker service (Windows service handling messages from devices)

The EasyCount standard applications are delivered as a single ZIP file: EasyCount_server_v(X).ZIP

This ZIP file contains all files needed for the complete installation. the (X) is the version number of the
software.

To prepare the installation do following:

1. Copy the file EasyCount_server_v(X).ZIP to the folder, where the software should be installed. In
the standard setup the root of the C-drive is used. Please refer to sensation 5.3 for using
another location for the software folder.
2. Extract the file here

When the file has been extracted, a folder named '_EasyCount' will appear in the root of the C-drive:

This folder contains all programs and folders for the complete installation. To install the different
programs and setup the system, please follow the instructions related to this in the next chapters of this
manual.

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 9
EasyCount
5.1 Rest API installation on IIS

The software for the Rest API is named EasyCountDevice and comes as a ZIP-file for import to the IIS.

To import the application do following:

1. open the IIS Manager (ex. type ' inetmgr' in the command windows)

2. right-click on the 'Default Web' and select 'Deploy / Import Application'

3. select the installation file from the server: C:\_EasyCount\_install\EasyCountDevice.zip

4. install the application

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 10
EasyCount
5.2 Broker service

When the software was extracted on to the server, the main folder 'C:\_EasyCount' was created.

In this folder is a sub folder with the data broker service files:

'C:\_EasyCount\EasyCountBroker'

To install the service open the folder: ‘C:\_EasyCount\EasyCountBroker\Service\Install’

Here is a batch file to use for the installation of the data broker service.

To install the service right click on the file 'ServiceInstall.bat' and select 'Run as administrator':

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 11
EasyCount
When the service has been correctly installed, it can be found the list of services on the Windows server:

The service will start automatically when the server is rebooted.

To start the service after the installation without rebooting the server use the ‘Start the service’ option.

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 12
EasyCount
5.3 Grant permission for the IIS to the EasyCount program folder

The REST API service is accessing the EasyCount program folder for reading different information about
the devices and their setup. Therefore, the IIS must be allowed to access this folder.

The IIS user on the Windows server is named ‘IIS_IUSRS’.

To grant access add the user permission to the folder ‘C:\_EasyCount’ by right-click on the folder and
updated the security permission:

1. add the user ‘IIS_IUSRS’


2. grant permission for this user (see the permissions here below)

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 13
EasyCount
5.3 Installing software in a different folder than default (C:\)

If the software installed in a different folder than the default folder (C:\_EasyCcount) a few changes
must be applied:

1. The file ‘..\system\system_config.xml’. Here are some file locations specified and here
‘c:\_EasyCount’ must be replaced with the new location
2. The file ‘..\EasyCountBroker\Service\ config_file.txt’. Here ‘c:\_EasyCount’ must be replaced
with the new location.

The REST API programming running on the IIS (EasyCountDevice) has a setting specifying the location of
the root of the EasyCount solution. This needs to be changed too.

If the normal installation path of the IIS is used, the file will be placed here:

Open the file and modify the app key “EasyCountRoot” to the new location.

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 14
EasyCount
5.4 Install the EasyCount master database

The SQL Server Management Studio is a good tool to use during the installation of the database.

5.4.1 Create SQL server login

Create a login at the SQL server with the name ‘EasyCount’.

1. use the login ‘EasyCount’


2. set login to use ‘SQL server authentication’
3. key in a password (default is ‘Ec2021!!##’, can be changed)
4. remove (uncheck) the ‘Enforce password policy’

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 15
EasyCount

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 16
EasyCount

5.4.2 Install the EasyCount database

To install the master database do following:

1. start SQL Server Management Studio


2. open the file ‘C:\_EasyCount\install\Create_EasyCount_database_v2.sql’
3. execute the script and the database for the application will be created

_____________________________________________________________________________________________
Work instruction - Setup server for EasyCount solution - version 2.0 page 17

You might also like