From 5f9069788b52a2e2eacef204047e62b2b40699be Mon Sep 17 00:00:00 2001 From: apfadler Date: Tue, 5 Jul 2016 15:44:00 +0200 Subject: [PATCH] [POC-4] Windows .bat files for startup --- README.md | 16 ++++++++++++++ dist/bin/quil-console.bat | 1 + dist/bin/quil-server-standalone.bat | 34 +++++++++++++++++++++++++++++ dist/bin/quil-server.bat | 32 +++++++++++++++++++++++++++ dist/bin/quil-worker.bat | 33 ++++++++++++++++++++++++++++ 5 files changed, 116 insertions(+) create mode 100644 dist/bin/quil-console.bat create mode 100644 dist/bin/quil-server-standalone.bat create mode 100644 dist/bin/quil-server.bat create mode 100644 dist/bin/quil-worker.bat diff --git a/README.md b/README.md index 4e4496c..6cc9c29 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/dist/bin/quil-console.bat b/dist/bin/quil-console.bat new file mode 100644 index 0000000..1232318 --- /dev/null +++ b/dist/bin/quil-console.bat @@ -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 diff --git a/dist/bin/quil-server-standalone.bat b/dist/bin/quil-server-standalone.bat new file mode 100644 index 0000000..d042ef5 --- /dev/null +++ b/dist/bin/quil-server-standalone.bat @@ -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 \ No newline at end of file diff --git a/dist/bin/quil-server.bat b/dist/bin/quil-server.bat new file mode 100644 index 0000000..64a62e7 --- /dev/null +++ b/dist/bin/quil-server.bat @@ -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 \ No newline at end of file diff --git a/dist/bin/quil-worker.bat b/dist/bin/quil-worker.bat new file mode 100644 index 0000000..7134a2f --- /dev/null +++ b/dist/bin/quil-worker.bat @@ -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 \ No newline at end of file