diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml index 5116857a3d..3b113741c1 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-bin.xml @@ -58,6 +58,19 @@ ${basedir}/../dolphinscheduler-standalone-server/target/standalone-server standalone-server + + libs/ + bin/ + dist-bin/ + + + + ${basedir}/../dolphinscheduler-standalone-server/target/standalone-server/libs/standalone-server + standalone-server/libs/standalone-server + + + ${basedir}/../dolphinscheduler-standalone-server/target/standalone-server/dist-bin + standalone-server/bin diff --git a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/download-mysql.sh b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/download-mysql.sh index ff848739cd..ef0ea7309c 100644 --- a/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/download-mysql.sh +++ b/dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/resources/docker/datasource-mysql/download-mysql.sh @@ -17,7 +17,7 @@ set -ex -DS_HOME=/opt/dolphinscheduler/libs +DS_HOME=/opt/dolphinscheduler/libs/standalone-server MYSQL_URL="https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar" MYSQL_DRIVER="mysql-connector-java-8.0.16.jar" diff --git a/dolphinscheduler-standalone-server/src/main/assembly/dolphinscheduler-standalone-server.xml b/dolphinscheduler-standalone-server/src/main/assembly/dolphinscheduler-standalone-server.xml index 9971ad0556..8ecd8c5128 100644 --- a/dolphinscheduler-standalone-server/src/main/assembly/dolphinscheduler-standalone-server.xml +++ b/dolphinscheduler-standalone-server/src/main/assembly/dolphinscheduler-standalone-server.xml @@ -26,46 +26,28 @@ standalone-server - ${basedir}/../dolphinscheduler-alert/dolphinscheduler-alert-server/target/alert-server - . - - libs - + ${basedir}/../dolphinscheduler-alert/dolphinscheduler-alert-server/target/alert-server/libs + libs/alert-server - ${basedir}/../dolphinscheduler-api/target/api-server - - libs - - . + ${basedir}/../dolphinscheduler-api/target/api-server/libs + libs/api-server - ${basedir}/../dolphinscheduler-master/target/master-server - - libs - - . + ${basedir}/../dolphinscheduler-master/target/master-server/libs + libs/master-server - ${basedir}/../dolphinscheduler-worker/target/worker-server - - libs - - . + ${basedir}/../dolphinscheduler-worker/target/worker-server/libs + libs/worker-server - ${basedir}/../dolphinscheduler-log-server/target/logger-server - - libs - - . + ${basedir}/../dolphinscheduler-log-server/target/logger-server/libs + libs/logger-server - ${basedir}/../dolphinscheduler-python-gateway/target/python-gateway - - libs - - . + ${basedir}/../dolphinscheduler-python/target/python-gateway-server/libs + libs/python-gateway @@ -83,6 +65,12 @@ 0755 0755 + + ${basedir}/src/main/dist-bin + dist-bin + 0755 + 0755 + ${basedir}/../script/env bin @@ -92,6 +80,15 @@ 0755 0755 + + ${basedir}/../script/env + dist-bin + + dolphinscheduler_env.sh + + 0755 + 0755 + ${basedir}/../dolphinscheduler-dao/src/main/resources @@ -108,7 +105,8 @@ - libs + false + libs/standalone-server com.amazonaws:aws-java-sdk-emr com.amazonaws:aws-java-sdk-core diff --git a/dolphinscheduler-standalone-server/src/main/bin/start.sh b/dolphinscheduler-standalone-server/src/main/bin/start.sh index d8c76115ce..6e1a4f4b1a 100755 --- a/dolphinscheduler-standalone-server/src/main/bin/start.sh +++ b/dolphinscheduler-standalone-server/src/main/bin/start.sh @@ -27,6 +27,13 @@ if [[ "$DOCKER" == "true" ]]; then JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport" fi +CP="" +for d in $DOLPHINSCHEDULER_HOME/libs/*; do + for f in $d/*.jar; do + CP=$CP:$f + done +done + java $JAVA_OPTS \ - -cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \ + -cp "$DOLPHINSCHEDULER_HOME/conf":"$CP" \ org.apache.dolphinscheduler.StandaloneServer diff --git a/dolphinscheduler-standalone-server/src/main/dist-bin/start.sh b/dolphinscheduler-standalone-server/src/main/dist-bin/start.sh new file mode 100755 index 0000000000..b90a6dbe05 --- /dev/null +++ b/dolphinscheduler-standalone-server/src/main/dist-bin/start.sh @@ -0,0 +1,39 @@ +#!/bin/bash +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +BIN_DIR=$(dirname $0) +DOLPHINSCHEDULER_HOME=${DOLPHINSCHEDULER_HOME:-$(cd $BIN_DIR/..; pwd)} + +source "$BIN_DIR/dolphinscheduler_env.sh" + +JAVA_OPTS=${JAVA_OPTS:-"-server -Xms1g -Xmx1g -Xmn512m -XX:+PrintGCDetails -Xloggc:gc.log -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=dump.hprof"} + +if [[ "$DOCKER" == "true" ]]; then + JAVA_OPTS="${JAVA_OPTS} -XX:-UseContainerSupport" +fi + +CP=$DOLPHINSCHEDULER_HOME/libs/standalone-server/* +for d in alert-server api-server master-server python-gateway-server worker-server; do + for f in $DOLPHINSCHEDULER_HOME/../$d/libs/*.jar; do + CP=$CP:$f + done +done + +java $JAVA_OPTS \ + -cp "$DOLPHINSCHEDULER_HOME/conf":"$CP" \ + org.apache.dolphinscheduler.StandaloneServer