How to run Ember as Windows Service
How to run Ember as a Windows service using WinSW
Resources
- Official source: https://github.com/winsw/winsw
- Installation guide: https://github.com/winsw/winsw/blob/v3/docs/installation.md
- Config file: https://github.com/winsw/winsw/blob/v3/docs/xml-config-file.md
Requirements
- JDK 8+ – required by Ember
- .NET Framework 4.6.1 or higher – required by WinSW
Steps
- Download Ember distribution zip and place it under
%EMBER_DIST%
- Create
%EMBER_DIST%\service
directory - Download [WinSW](https://github.com/winsw/winsw/releases/download/v3.0.0-alpha.4/WinSW.NET461.exe should match with your platform and .NET Framework), place it
%EMBER_DIST%\service
and rename towinsw.exe
- Create
%EMBER_DIST%\service\ember-service.xml
(see below for reference) - Run
winsw.exe install ember-service.xml
- Repeat 4-5 steps for
ember-monitor
,ember-warehouse
, andember-compaction
processes
Config
<service>
<env name="EMBER_HOME" value="c:\temp\Ember\win-srv\home\"/>
<env name="EMBER_WORK" value="c:\temp\Ember\win-srv\work\"/>
<env name="EMBER_DIST" value="c:\temp\Ember\win-srv\"/>
<id>ember-service</id>
<name>Ember Service</name>
<description>Ember Service</description>
<logmode>rotate</logmode>
<logpath>logs\ember-service</logpath>
<executable>java</executable>
<arguments>
-cp %EMBER_DIST%\lib\*;%EMBER_DIST%\lib\custom\*
deltix.ember.app.EmberApp
</arguments>
</service>
Components
Name | Class | Command Line |
---|---|---|
Ember | deltix.ember.app.EmberApp | - |
Ember Monitor | deltix.ember.monitor.EmberMonitorApp | - |
Ember Warehouse | deltix.ember.data.warehouse.EmberWarehouseApp | ${unit-name} |
Ember Compaction | deltix.ember.journal.compaction.EmberCompactionApp | - |