Prerequisite
Database TablesStrategy Order Server is a windows service.
Prerequisites
Database tables
Strategy order server uses the following Database Tables and sql create scripts can be found below for MS SQL Server.
Code Block |
---|
[STRATEGY_ORDERS] [STRATEGY_ORDER_LEGS] |
...
View file | ||
---|---|---|
|
Oracle
View file | ||
---|---|---|
|
Access Rules
...
Access Rules
An access rule needs to be inserted for the relevant groups which will use the service.
Code Block | ||
---|---|---|
| ||
insert into ACCESSRULES (OPERATION_NAME, PERMISSION, ACCESSLIST_ID) values ('StrategyOrderEntryService', 1, 1) |
Deployment
0: Make sure the prerequisites have been fullfilled.
1: Copy files to server
The files should be installed here: C:\KodiakStrategyServer\
2: Windows Service install
The windows service is installed with the followind command line script as administrator.
"C:\Windows\Microsoft.NET\Framework\v4.0.30319\installutil.exe" "C:\KodiakStrategyServer\Kodi.Kodiak.Strategies.StrategyServer.exe"
3: Configure Task Scheduler task
A task scheduler task should be created to run the attached script file once a day.
Restart Strategy windows service batch script.
View file | ||
---|---|---|
|
Configuration
There is only one configuration file which needs to be set.
Kodi.Kodiak.Strategies.StrategyServer.exe.config
App Settings
...
Code Block |
---|
Wcf
What scripts should be run
Configuration
Spring
Services
Connection strings
Access
Authorization/user configuration
Access rules updates?
Setup
Overview - What does this service do
How do you set this up?
Do you need to create a user/user group/trader/external user?
Where are the executables?
Where is the jenkins build?
Deployment
Where are the configs saved after deployment
What steps should be followed after deployment?
Check logs?
Check endpoints?
Start KODIAK Oms Client?
Windows Service install
...
| ||
<appSettings>
<add key="ConnectionString" value="Server=xxxx;Initial Catalog=KODIAK;User Id=Kodiak;Password=xxxx;" />
<add key="ActiveMQPath" value="tcp://localhost:61616" />
<add key="ActiveMQClientId" value="StrategyServer" />
<!-- PROD environment -->
<add key="ApiUrl" value="https://api.livemarketdata.com" />
<add key="AuthUrl" value="https://users.livemarketdata.com/v2/token" />
<!-- Test Environment
<add key="ApiUrl" value="https://api-staging.livemarketdata.com" />
<add key="AuthUrl" value="https://users-staging.livemarketdata.com/v2/token" />
-->
<add key="AuthUsername" value="username@kodi.is" />
<add key="AuthPassword" value="xxxxxxx" />
<add key="log4net.Internal.Debug" value="false" />
</appSettings> |
Wcf configuration in Kodi.Kodiak.Strategies.StrategyServer.exe.config
Code Block |
---|
<!-- NON HTTPS -->
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="messageLogger" type="Kodi.Kodiak.Wcf.MessageInspectorServiceBehavior, Kodi.Kodiak.Wcf" />
</behaviorExtensions>
</extensions>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="False" />
<serviceAuthorization serviceAuthorizationManagerType="Kodi.Kodiak.Wcf.WindowsAuthorizationManager, Kodi.Kodiak.Wcf" />
<messageLogger />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WSHttpsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646">
<readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security>
<transport></transport>
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<!-- This section is optional with the new configuration model introduced in .NET Framework 4. -->
<service name="Kodi.Kodiak.Strategies.StrategyOrderEntryService" behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="http://kodiak-server:8080/StrategyOrderEntryService.svc" />
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service -->
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpsBinding" contract="Kodi.Kodiak.Strategies.Contracts.IStrategyOrderEntryService" />
<!-- the mex endpoint is exposed at http://localhost:8000/ServiceModelSamples/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
<!-- HTTPS -->
<system.serviceModel>
<extensions>
<behaviorExtensions>
<add name="messageLogger" type="Kodi.Kodiak.Wcf.MessageInspectorServiceBehavior, Kodi.Kodiak.Wcf" />
</behaviorExtensions>
</extensions>
<behaviors>
<serviceBehaviors>
<behavior name="ServiceBehavior">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="false" />
<serviceDebug includeExceptionDetailInFaults="False" />
<serviceAuthorization serviceAuthorizationManagerType="Kodi.Kodiak.Wcf.WindowsAuthorizationManager, Kodi.Kodiak.Wcf" />
<serviceCredentials>
<serviceCertificate storeLocation="LocalMachine" storeName="My" x509FindType="FindByThumbprint" findValue="be18f48e9a099886b316b6110af27d5ac5b5395a"/>
</serviceCredentials>
<messageLogger />
</behavior>
</serviceBehaviors>
</behaviors>
<bindings>
<wsHttpBinding>
<binding name="WSHttpsBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" messageEncoding="Text" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false" maxBufferPoolSize="2147483646" maxReceivedMessageSize="2147483646">
<readerQuotas maxDepth="2147483646" maxStringContentLength="2147483646" maxArrayLength="2147483646" maxBytesPerRead="2147483646" maxNameTableCharCount="2147483646" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" enabled="false" />
<security mode="Transport">
<transport clientCredentialType="Windows" />
</security>
</binding>
</wsHttpBinding>
</bindings>
<services>
<!-- This section is optional with the new configuration model introduced in .NET Framework 4. -->
<service name="Kodi.Kodiak.Strategies.StrategyOrderEntryService" behaviorConfiguration="ServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="https://kodiak-server:8085/StrategyOrderEntryService.svc" />
</baseAddresses>
</host>
<!-- this endpoint is exposed at the base address provided by host: http://localhost:8000/ServiceModelSamples/service -->
<endpoint address="" binding="wsHttpBinding" bindingConfiguration="WSHttpsBinding" contract="Kodi.Kodiak.Strategies.Contracts.IStrategyOrderEntryService" />
<!-- the mex endpoint is exposed at http://localhost:8000/ServiceModelSamples/service/mex -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
</system.serviceModel>
|
Logging
Logs are located in the following folder
C:\KODIAK_LOGS\StrategyServer
StrategyServer.log
StrategyServer.Requests.log
StrategyServer.Publisher.log