Skip to content

Commit

Permalink
[POC-4] Windows .bat files for startup
Browse files Browse the repository at this point in the history
  • Loading branch information
apfadler committed Jul 5, 2016
1 parent 7f3411f commit 5f90697
Show file tree
Hide file tree
Showing 5 changed files with 116 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,20 @@ Worker Nodes:

2.) Wait until the scala prompt appears. Now you are able to run scala scripts using quil/quantlib/ignite APIs. Useful for experimentation and testing...

** Notes **

Environment Variables:

1.) QUIL_HOME: Should contain the path to the root of the QUIL distribution (i.e. what's in the dist/ directory)

2.) QUIL_WORKER, QUIL_SERVER_STANDALONE: These variables control whether we want to start a master or worker node.

3.) QUIL_SERVER, QUIL_PORT: Only relevant for the quil-client.sh shell script

4.) IGNITE_H2_DEBUG_CONSOLE: If set to "true" (without quotes) this will open up a H2 web interface in your browser. Useful for looking at the various caches and running SQL queries.

5.) QUIL_WARPATH: Path to .war file for QUIL web app or path to unpacked .war file (for development purposes)

Windows:

There are some .bat files in bin/ that may be used start QUIL master and worker nodes. There is, however, no equivalent for the quil-client.sh script.
1 change: 1 addition & 0 deletions dist/bin/quil-console.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
java -cp libs/validation-api-1.1.0.Final.jar;libs/spring-tx-4.1.0.RELEASE.jar;libs/spring-jdbc-4.1.0.RELEASE.jar;libs/spring-expression-4.1.0.RELEASE.jar;libs/spring-core-4.1.0.RELEASE.jar;libs/spring-context-4.1.0.RELEASE.jar;libs/spring-beans-4.1.0.RELEASE.jar;libs/spring-aop-4.1.0.RELEASE.jar;libs/spray-json_2.10-1.3.2.jar;libs/slf4j-log4j12-1.7.13.jar;libs/slf4j-api-1.7.13.jar;libs/server-0.1-SNAPSHOT.jar;libs/scala-xml_2.11-1.0.4.jar;libs/scala-reflect-2.11.7.jar;libs/scala-parser-combinators_2.11-1.0.4.jar;libs/scala-macros-0.1-SNAPSHOT.jar;libs/scala-library-2.11.7.jar;libs/scala-console-0.1-SNAPSHOT.jar;libs/scala-compiler-2.11.7.jar;libs/quantlib-1.7.jar;libs/qlobjects-0.1-SNAPSHOT.jar;libs/paranamer-2.8.jar;libs/osgi-resource-locator-1.0.1.jar;libs/org.eclipse.persistence.moxy-2.6.0.jar;libs/org.eclipse.persistence.core-2.6.0.jar;libs/org.eclipse.persistence.asm-2.6.0.jar;libs/lucene-core-3.5.0.jar;libs/log4j-1.2.17.jar;libs/junit-4.7.jar;libs/json4s-scalap_2.11-3.3.0.jar;libs/json4s-native_2.11-3.3.0.jar;libs/json4s-core_2.11-3.3.0.jar;libs/json4s-ast_2.11-3.3.0.jar;libs/json-simple-1.1.1.jar;libs/joda-time-2.8.1.jar;libs/jline-2.12.1.jar;libs/jetty-xml-9.2.3.v20140905.jar;libs/jetty-webapp-9.2.3.v20140905.jar;libs/jetty-util-9.2.3.v20140905.jar;libs/jetty-servlet-9.2.3.v20140905.jar;libs/jetty-server-9.2.3.v20140905.jar;libs/jetty-security-9.2.3.v20140905.jar;libs/jetty-io-9.2.3.v20140905.jar;libs/jetty-http-9.2.3.v20140905.jar;libs/jetty-continuation-9.1.1.v20140108.jar;libs/jersey-server-2.22.1.jar;libs/jersey-media-sse-2.22.1.jar;libs/jersey-media-moxy-2.22.1.jar;libs/jersey-media-jaxb-2.22.1.jar;libs/jersey-guava-2.22.1.jar;libs/jersey-entity-filtering-2.22.1.jar;libs/jersey-container-servlet-core-2.22.1.jar;libs/jersey-container-servlet-2.22.1.jar;libs/jersey-container-jetty-http-2.22.1.jar;libs/jersey-common-2.22.1.jar;libs/jersey-client-2.22.1.jar;libs/javax.ws.rs-api-2.0.1.jar;libs/javax.servlet-api-3.1.0.jar;libs/javax.json-1.0.4.jar;libs/javax.inject-2.4.0-b31.jar;libs/javax.annotation-api-1.2.jar;libs/javassist-3.18.1-GA.jar;libs/jackson-databind-2.5.3.jar;libs/jackson-core-2.5.3.jar;libs/jackson-annotations-2.5.3.jar;libs/interpreter-0.1-SNAPSHOT.jar;libs/ignite-spring-1.6.0.jar;libs/ignite-shmem-1.0.0.jar;libs/ignite-scalar-1.6.0.jar;libs/ignite-indexing-1.6.0.jar;libs/ignite-core-1.6.0.jar;libs/ignite-aws-1.6.0.jar;libs/httpcore-4.4.3.jar;libs/httpclient-4.5.1.jar;libs/hk2-utils-2.4.0-b31.jar;libs/hk2-locator-2.4.0-b31.jar;libs/hk2-api-2.4.0-b31.jar;libs/h2-1.3.175.jar;libs/commons-logging-1.1.1.jar;libs/commons-io-2.4.jar;libs/commons-codec-1.6.jar;libs/commons-cli-1.2.jar;libs/common-0.1-SNAPSHOT.jar;libs/cache-api-1.0.0.jar;libs/aws-java-sdk-s3-1.10.29.jar;libs/aws-java-sdk-kms-1.10.29.jar;libs/aws-java-sdk-core-1.10.29.jar;libs/aopalliance-repackaged-2.4.0-b31.jar;libs/aopalliance-1.0.jar;. org.quil.console.ScalaConsole
34 changes: 34 additions & 0 deletions dist/bin/quil-server-standalone.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off
Setlocal EnableDelayedExpansion

if "%OS%" == "Windows_NT" setlocal

:: Check JAVA_HOME.
if defined JAVA_HOME goto :checkquil
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8.
echo You can also download latest JDK at http://java.com/download.
goto :eof

:checkquil
if defined QUIL_HOME goto buildcp
echo Defaulting QUIL_HOME to .
set QUIL_HOME=.

:buildcp

SET CP=
for /R %%F in (%QUIL_HOME%\libs\*) do call :concat %%F

echo %CP%

set QUIL_WARPATH=%QUIL_HOME%\libs\webapp-1.0-SNAPSHOT.war

set QUIL_SERVER_STANDALONE=true

%JAVA_HOME%\bin\java -Dlog4j.configuration=file:config/java.util.logging.properties -cp "%CP%" org.quil.server.QuilServer

:concat
set CP=%CP%;%1
goto :eof
32 changes: 32 additions & 0 deletions dist/bin/quil-server.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off
Setlocal EnableDelayedExpansion

if "%OS%" == "Windows_NT" setlocal

:: Check JAVA_HOME.
if defined JAVA_HOME goto :checkquil
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8.
echo You can also download latest JDK at http://java.com/download.
goto :eof

:checkquil
if defined QUIL_HOME goto buildcp
echo Defaulting QUIL_HOME to .
set QUIL_HOME=.

:buildcp

SET CP=
for /R %%F in (%QUIL_HOME%\libs\*) do call :concat %%F

echo %CP%

set QUIL_WARPATH=%QUIL_HOME%\libs\webapp-1.0-SNAPSHOT.war

%JAVA_HOME%\bin\java -Dlog4j.configuration=file:config/java.util.logging.properties -cp "%CP%" org.quil.server.QuilServer

:concat
set CP=%CP%;%1
goto :eof
33 changes: 33 additions & 0 deletions dist/bin/quil-worker.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@echo off
Setlocal EnableDelayedExpansion

if "%OS%" == "Windows_NT" setlocal

:: Check JAVA_HOME.
if defined JAVA_HOME goto :checkquil
echo %0, ERROR:
echo JAVA_HOME environment variable is not found.
echo Please point JAVA_HOME variable to location of JDK 1.8.
echo You can also download latest JDK at http://java.com/download.
goto :eof

:checkquil
if defined QUIL_HOME goto buildcp
echo Defaulting QUIL_HOME to .
set QUIL_HOME=.

:buildcp

SET CP=
for /R %%F in (%QUIL_HOME%\libs\*) do call :concat %%F

echo %CP%

set QUIL_WARPATH=%QUIL_HOME%\libs\webapp-1.0-SNAPSHOT.war
set QUIL_WORKER=true

%JAVA_HOME%\bin\java -Dlog4j.configuration=file:config/java.util.logging.properties -cp "%CP%" org.quil.server.QuilServer

:concat
set CP=%CP%;%1
goto :eof

0 comments on commit 5f90697

Please sign in to comment.