Difference between revisions of "Edge Forwarder Service"

From Datonis
Jump to: navigation, search
(Starting Docker Service at startup (For Windows))
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
== Introduction ==
 
== Introduction ==
Forwarder Service creates a Proxy Server in the Edge Machine which allows *.datonis.io URLs. Proxy Server runs inside a docker container in the Edge Machine which is controlled by Datonis Edge.   
+
Forwarder Engine allows forwarding of *.datonis.io URL requests via Edge Machine. Once enabled, Edge can act as a forwarder/Proxy for all Datonis browser requests. An integrated Proxy Server runs inside a docker container in the Edge Machine which can be configured in Datonis Edge.   
  
 
[[File:Forwarder_Service.jpg|border]]
 
[[File:Forwarder_Service.jpg|border]]
 
 
== Prerequisites - Docker ==
 
== Prerequisites - Docker ==
  
=== For Linux: ===
+
=== For Linux ===
 
* Install Docker  
 
* Install Docker  
  
=== For Windows: ===
+
=== For Windows ===
 
* Windows 10 64-bit: Pro, Enterprise, or Education (Build 16299 or later)  
 
* Windows 10 64-bit: Pro, Enterprise, or Education (Build 16299 or later)  
 
** https://docs.docker.com/docker-for-windows/install/
 
** https://docs.docker.com/docker-for-windows/install/
Line 20: Line 19:
  
 
=== Windows (Docker Desktop) ===
 
=== Windows (Docker Desktop) ===
[[File:DockerExposeTCP.png|frameless|760x760px]]  
+
[[File:DockerExposeTCP.png|frameless|760x760px]]
=== Linux ===
+
 
edit <code>/lib/systemd/system/docker.service</code> on Ubuntu system to modify the line
+
==== Starting Docker Service at startup (For Windows) ====
 +
For windows, at the startup we have to manually click on start docker service prompt. To avoid this we can add this powershell script to run at start up by doing the following:
 +
* Create a startup file:  E.g. in C:\Altizon\docker-startup.ps1
 +
* Add this in the script
 +
start-service -Name com.docker.service
 +
start "C:\Program Files\Docker\Docker\Docker Desktop.exe"
 +
* To start it automatically when the server boot create ScheduledJob with New-JobTrigger – like here:  Open PowerShell as an Administrator and do:
 +
$trigger = New-JobTrigger -AtStartup -RandomDelay 00:00:30
 +
 
 +
Register-ScheduledJob -Trigger $trigger -FilePath C:\tmp\bloom_onPrem\startup.ps1 -Name BloomOnPrem
 +
* Display Scheduled Job using <code>Get-ScheduledJob</code> or <code>Get-ScheduledJob|Get-JobTrigger</code>
 +
* Or it can be viewed in the Task Scheduler of Windows.
 +
 
 +
=== Linux ===
 +
Add tcp://0.0.0.0.2375 in the hosts of Docker Engine.
 +
Edit <code>/lib/systemd/system/docker.service</code> on Ubuntu system to modify the line
 
  <code>ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375</code>
 
  <code>ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375</code>
 
then
 
then
Line 30: Line 44:
 
== Edge Forwarder Service ==
 
== Edge Forwarder Service ==
  
=== Configuration: ===
+
=== Configuration ===
 
* enable-forwarder-service: This creates and runs the Proxy Server Docker Container on the Edge Machine with listening on the specified Port.
 
* enable-forwarder-service: This creates and runs the Proxy Server Docker Container on the Edge Machine with listening on the specified Port.
 
* docker-daemon-server-url: URL of the docker daemon host URL.
 
* docker-daemon-server-url: URL of the docker daemon host URL.
 
* exposed-port-for-forwarding: Port at which the Edge Forwarder Proxy Server will be listening.[[File:ForwarderService.png|frameless|1366x1366px]]
 
* exposed-port-for-forwarding: Port at which the Edge Forwarder Proxy Server will be listening.[[File:ForwarderService.png|frameless|1366x1366px]]
 +
 +
=== Status ===
 +
Status of the Forwarder Engine Container can be seen in the Status Tab of Edge.
 +
 +
[[File:FS-Status.png|frameless|960x960px]]
 +
 +
=== Monitoring and Datonis Alerts ===
 +
Datonis Alerts are sent for the Edge thing-key if the ForwarderService stops running.

Latest revision as of 11:07, 27 August 2020

Introduction

Forwarder Engine allows forwarding of *.datonis.io URL requests via Edge Machine. Once enabled, Edge can act as a forwarder/Proxy for all Datonis browser requests. An integrated Proxy Server runs inside a docker container in the Edge Machine which can be configured in Datonis Edge.

Forwarder Service.jpg

Prerequisites - Docker

For Linux

  • Install Docker

For Windows

Expose Docker on TCP

Windows (Docker Desktop)

DockerExposeTCP.png

Starting Docker Service at startup (For Windows)

For windows, at the startup we have to manually click on start docker service prompt. To avoid this we can add this powershell script to run at start up by doing the following:

  • Create a startup file: E.g. in C:\Altizon\docker-startup.ps1
  • Add this in the script
start-service -Name com.docker.service
start "C:\Program Files\Docker\Docker\Docker Desktop.exe"
  • To start it automatically when the server boot create ScheduledJob with New-JobTrigger – like here: Open PowerShell as an Administrator and do:
$trigger = New-JobTrigger -AtStartup -RandomDelay 00:00:30
Register-ScheduledJob -Trigger $trigger -FilePath C:\tmp\bloom_onPrem\startup.ps1 -Name BloomOnPrem
  • Display Scheduled Job using Get-ScheduledJob or Get-ScheduledJob|Get-JobTrigger
  • Or it can be viewed in the Task Scheduler of Windows.

Linux

Add tcp://0.0.0.0.2375 in the hosts of Docker Engine.

Edit /lib/systemd/system/docker.service on Ubuntu system to modify the line

ExecStart=/usr/bin/docker daemon -H fd:// -H tcp://0.0.0.0:2375

then

sudo systemctl daemon-reload
sudo systemctl restart docker.service

Edge Forwarder Service

Configuration

  • enable-forwarder-service: This creates and runs the Proxy Server Docker Container on the Edge Machine with listening on the specified Port.
  • docker-daemon-server-url: URL of the docker daemon host URL.
  • exposed-port-for-forwarding: Port at which the Edge Forwarder Proxy Server will be listening.ForwarderService.png

Status

Status of the Forwarder Engine Container can be seen in the Status Tab of Edge.

FS-Status.png

Monitoring and Datonis Alerts

Datonis Alerts are sent for the Edge thing-key if the ForwarderService stops running.