diff --git a/configurationserver/ConfigurationServerLauncher.sh b/configurationserver/ConfigurationServerLauncher.sh deleted file mode 100644 index 3da7a6ecb..000000000 --- a/configurationserver/ConfigurationServerLauncher.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -java -server -Xms512m -Xmx512m -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSWaitDuration=300000 -XX:GCTimeRatio=40 -XX:MaxPermSize=256m -classpath '.:lib/*' -DEDDI_ENV=production io.sls.configuration.ConfigurationServer diff --git a/configurationserver/ConfigurationServerStartup.bat b/configurationserver/ConfigurationServerStartup.bat index 5682e8e4d..7efb42d38 100644 --- a/configurationserver/ConfigurationServerStartup.bat +++ b/configurationserver/ConfigurationServerStartup.bat @@ -1 +1,32 @@ -java -classpath ".;lib\*" -DEDDI_ENV=production io.sls.configuration.ConfigurationServer \ No newline at end of file +@echo off +if [%1] == [] ( + echo "Usage: [rmi-server-hostname]" + goto end +) + +if %1==production ( +SET JAVA_OPTS= ^ + -server -Xms512m -Xmx512m ^ + -XX:+UseConcMarkSweepGC ^ + -XX:+CMSParallelRemarkEnabled ^ + -XX:+UseCMSInitiatingOccupancyOnly ^ + -XX:CMSInitiatingOccupancyFraction=50 ^ + -XX:CMSWaitDuration=300000 ^ + -XX:+CMSScavengeBeforeRemark ^ + -XX:+ScavengeBeforeFullGC ^ + -XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:gc.log ^ + -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M ^ + -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=`date`.hprof ^ + -Djava.rmi.server.hostname=%2 ^ + -Dcom.sun.management.jmxremote.port=9010 ^ + -Dcom.sun.management.jmxremote.authenticate=false ^ + -Dcom.sun.management.jmxremote.ssl=false +) else if %1==development ( + SET JAVA_OPTS= +) else ( + echo "Invalid environment %1" + goto end +) + +java %JAVA_OPTS% -classpath .;lib/* -DEDDI_ENV=%1 io.sls.configuration.ConfigurationServer +:end \ No newline at end of file diff --git a/configurationserver/ConfigurationServerStartup.sh b/configurationserver/ConfigurationServerStartup.sh index 26308e2e1..62a59ca8f 100644 --- a/configurationserver/ConfigurationServerStartup.sh +++ b/configurationserver/ConfigurationServerStartup.sh @@ -1,2 +1,34 @@ -#!/bin/sh -java -classpath '.:lib/*' -DEDDI_ENV=production io.sls.configuration.ConfigurationServer +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: [rmi-server-hostname]" + exit +fi + +if [ "$1" = "production" ]; then + +read -d '' JAVA_OPTS < - install + package single diff --git a/configurationserver/src/assembly/assembly.xml b/configurationserver/src/assembly/assembly.xml index 793bd7ca7..c392211b8 100644 --- a/configurationserver/src/assembly/assembly.xml +++ b/configurationserver/src/assembly/assembly.xml @@ -9,26 +9,21 @@ - / - - config/*.* - resources/**/*.* - keystore/*.* - *.sh - *.bat - + / + + config/**/*.* + resources/**/*.* + *.sh + *.bat + - - lib - - junit:junit - + lib + false + runtime + true diff --git a/coreserver/CoreServerLauncher.sh b/coreserver/CoreServerLauncher.sh deleted file mode 100644 index dae9dd976..000000000 --- a/coreserver/CoreServerLauncher.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -java -server -Xms1024m -Xmx1024m -XX:+CMSParallelRemarkEnabled -XX:+CMSScavengeBeforeRemark -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSWaitDuration=300000 -XX:GCTimeRatio=40 -XX:MaxPermSize=256m -classpath '.:lib/*' -DEDDI_ENV=production io.sls.core.CoreServer diff --git a/coreserver/CoreServerStartup.bat b/coreserver/CoreServerStartup.bat index 22af43496..4a250f8b3 100644 --- a/coreserver/CoreServerStartup.bat +++ b/coreserver/CoreServerStartup.bat @@ -1 +1,32 @@ -java -classpath ".;lib\*" -DEDDI_ENV=production io.sls.core.CoreServer +@echo off +if [%1] == [] ( + echo "Usage: [rmi-server-hostname]" + goto end +) + +if %1==production ( +SET JAVA_OPTS= ^ + -server -Xms1024m -Xmx1024m ^ + -XX:+UseConcMarkSweepGC ^ + -XX:+CMSParallelRemarkEnabled ^ + -XX:+UseCMSInitiatingOccupancyOnly ^ + -XX:CMSInitiatingOccupancyFraction=50 ^ + -XX:CMSWaitDuration=300000 ^ + -XX:+CMSScavengeBeforeRemark ^ + -XX:+ScavengeBeforeFullGC ^ + -XX:+PrintGCDateStamps -verbose:gc -XX:+PrintGCDetails -Xloggc:gc.log ^ + -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M ^ + -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=`date`.hprof ^ + -Djava.rmi.server.hostname=%2 ^ + -Dcom.sun.management.jmxremote.port=9010 ^ + -Dcom.sun.management.jmxremote.authenticate=false ^ + -Dcom.sun.management.jmxremote.ssl=false +) else if %1==development ( + SET JAVA_OPTS= +) else ( + echo "Invalid environment %1" + goto end +) + +java %JAVA_OPTS% -classpath .;lib/* -DEDDI_ENV=%1 io.sls.core.CoreServer +:end \ No newline at end of file diff --git a/coreserver/CoreServerStartup.sh b/coreserver/CoreServerStartup.sh index 72cec0286..8102a5722 100644 --- a/coreserver/CoreServerStartup.sh +++ b/coreserver/CoreServerStartup.sh @@ -1,2 +1,34 @@ -#!/bin/sh -java -classpath '.:lib/*' -DEDDI_ENV=production io.sls.core.CoreServer +#!/bin/bash + +if [ -z "$1" ]; then + echo "Usage: [rmi-server-hostname]" + exit +fi + +if [ "$1" = "production" ]; then + +read -d '' JAVA_OPTS < - install + package single diff --git a/coreserver/src/assembly/assembly.xml b/coreserver/src/assembly/assembly.xml index 9f703e794..c392211b8 100644 --- a/coreserver/src/assembly/assembly.xml +++ b/coreserver/src/assembly/assembly.xml @@ -11,24 +11,19 @@ / - config/*.* + config/**/*.* resources/**/*.* - keystore/*.* *.sh *.bat - lib - - junit:junit - + false + runtime + true