Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Getting Started

Angel Sanadinov edited this page Sep 20, 2017 · 2 revisions

When deploying a new cluster, the required artifacts can be obtained either by downloading them or by building them yourself.

Download

The latest artifacts can be downloaded from the releases page.

Configure and Run

vili

  1. Extract the downloaded artifacts or build them yourself

  2. Create / update the configuration files

edit <path to extracted application artifact>\conf\application.conf
edit <path to extracted application artifact>\conf\logback.xml
  1. Run
<path to extracted application artifact>\bin\vili_start.bat
  1. Stop
<path to extracted application artifact>\bin\vili_stop.bat

ve

  1. Create / update the configuration files
vi <path to conf>\application.conf
vi <path to conf>\logback.xml
  1. Run
java -cp <path to conf>;<path to jar> ve.Main

Build

vili

Building vili is a complicated and error-prone process; unless there's a good reason not to, it's best to download the pre-build artifact.

Currently, a vili fat jar cannot be built due to issues with including and using DLL files.

  1. Prepare your environment

    • Install Java 8 JDK
    • Install Microsoft .NET Framework (4 or above)
    • Set the JAVA_HOME system variable
    • Add %JAVA_HOME%\bin and the path to the .NET framework dir to your system's Path variable
    • Verify that you can run the csc.exe, MSBuild.exe and java.exe
    • Download and extract the latest jni4net release (tested with 0.8.8.0)
    • Install sbt
    • Clone or download noisecluster
    • Download all noisecluster-win packages or use nuget restore
  2. Build noisecluster-win

cd <path to repos>\noisecluster\noisecluster-win\noisecluster
MSBuild.exe .\noisecluster.csproj /p:Configuration=Release
  1. Generate proxies
<path to jni4net>\bin\proxygen.exe <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release\noisecluster.dll -wd <path to jni4net target dir>
  1. Edit jni4net build script

Edit the script generated in the previous step <path to jni4net target dir>\build.cmd and replace the last build step with the following:

echo noisecluster.j4n.dll
SET buildDir=<path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
csc /nologo /warn:0 /t:library /out:noisecluster.j4n.dll /recurse:clr\*.cs  /reference:"%buildDir%\noisecluster.dll" /reference:"<path to jni4net>\lib\jni4net.n-0.8.8.0.dll" /reference:"%buildDir%\Adaptive.Aeron.dll" /reference:"%buildDir%\Adaptive.Agrona.dll" /reference:"%buildDir%\CSCore.dll" /reference:"%buildDir%\log4net.dll" /reference:"%buildDir%\nunit.framework.dll" 
IF %ERRORLEVEL% NEQ 0 goto end
  1. Run <path to jni4net target dir>\build.cmd

  2. Copy generated artifacts to <path to repos>\noisecluster\vili\lib

Artifact Location
CSCore.dll <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
jni4net.j-0.8.8.0.jar <path to jni4net>/lib
jni4net.n.w64.v40-0.8.8.0.dll <path to jni4net>/lib
jni4net.n-0.8.8.0.dll <path to jni4net>/lib
log4net.dll <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
noisecluster.dll <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
noisecluster.j4n.dll <path to jni4net target dir>
noisecluster.j4n.jar <path to jni4net target dir>
Adaptive.Aeron.dll (optional) <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
Adaptive.Agrona.dll (optional) <path to repos>\noisecluster\noisecluster-win\noisecluster\bin\Release
  1. Create application artifact
sbt dist
  1. Extract the application artifact

It can be found in <path to repos>\noisecluster\vili\target\universal

  1. Edit the <path to extracted application artifact>\bin\vili.bat executable

Replace the definitions of the APP_CLASSPATH variable with the following:

set "APP_CLASSPATH=%APP_LIB_DIR%\..\conf\;%APP_LIB_DIR%\*"

OR

  1. Get the start/stop scripts

From here

ve

Since ve has no unmanaged dependencies, a fat jar can be built directly:

sbt assembly