Browse Source
* Split the components into individual package A follow-up PR will be made to build dedicated Docker images for each component, so that every component Docker image has minimal jars, which is easy to maintain and good for security fixes. * Split the components into individual package A follow-up PR will be made to build dedicated Docker images for each component, so that every component Docker image has minimal jars, which is easy to maintain and good for security fixes. * Split the components into individual package A follow-up PR will be made to build dedicated Docker images for each component, so that every component Docker image has minimal jars, which is easy to maintain and good for security fixes.3.0.0/version-upgrade
kezhenxu94
3 years ago
committed by
GitHub
284 changed files with 3025 additions and 3414 deletions
@ -0,0 +1,153 @@
|
||||
# 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. |
||||
|
||||
version: "3.8" |
||||
|
||||
services: |
||||
dolphinscheduler-postgresql: |
||||
image: bitnami/postgresql:11.11.0 |
||||
environment: |
||||
POSTGRESQL_USERNAME: root |
||||
POSTGRESQL_PASSWORD: root |
||||
POSTGRESQL_DATABASE: dolphinscheduler |
||||
volumes: |
||||
- dolphinscheduler-postgresql:/bitnami/postgresql |
||||
healthcheck: |
||||
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/5432"] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-zookeeper: |
||||
image: bitnami/zookeeper:3.6.2 |
||||
environment: |
||||
ALLOW_ANONYMOUS_LOGIN: "yes" |
||||
ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons |
||||
volumes: |
||||
- dolphinscheduler-zookeeper:/bitnami/zookeeper |
||||
healthcheck: |
||||
test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/2181"] |
||||
interval: 5s |
||||
timeout: 60s |
||||
retries: 120 |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-schema-initializer: |
||||
image: ${HUB}/dolphinscheduler-tools:${TAG} |
||||
env_file: .env |
||||
command: [ bin/create-schema.sh ] |
||||
depends_on: |
||||
dolphinscheduler-postgresql: |
||||
condition: service_healthy |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
- dolphinscheduler-resource-local:/dolphinscheduler |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-api: |
||||
image: ${HUB}/dolphinscheduler-api:${TAG} |
||||
ports: |
||||
- "12345:12345" |
||||
env_file: .env |
||||
healthcheck: |
||||
test: [ "CMD", "curl", "http://localhost:12345/actuator/health" ] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
dolphinscheduler-schema-initializer: |
||||
condition: service_completed_successfully |
||||
dolphinscheduler-zookeeper: |
||||
condition: service_healthy |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
- dolphinscheduler-resource-local:/dolphinscheduler |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-alert: |
||||
image: ${HUB}/dolphinscheduler-alert-server:${TAG} |
||||
env_file: .env |
||||
healthcheck: |
||||
test: [ "CMD", "curl", "http://localhost:50053/actuator/health" ] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
dolphinscheduler-schema-initializer: |
||||
condition: service_completed_successfully |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-master: |
||||
image: ${HUB}/dolphinscheduler-master:${TAG} |
||||
env_file: .env |
||||
healthcheck: |
||||
test: [ "CMD", "curl", "http://localhost:5679/actuator/health" ] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
dolphinscheduler-schema-initializer: |
||||
condition: service_completed_successfully |
||||
dolphinscheduler-zookeeper: |
||||
condition: service_healthy |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-worker: |
||||
image: ${HUB}/dolphinscheduler-worker:${TAG} |
||||
env_file: .env |
||||
healthcheck: |
||||
test: [ "CMD", "curl", "http://localhost:1235/actuator/health" ] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
dolphinscheduler-schema-initializer: |
||||
condition: service_completed_successfully |
||||
dolphinscheduler-zookeeper: |
||||
condition: service_healthy |
||||
volumes: |
||||
- dolphinscheduler-worker-data:/tmp/dolphinscheduler |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
- dolphinscheduler-resource-local:/dolphinscheduler |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
networks: |
||||
dolphinscheduler: |
||||
driver: bridge |
||||
|
||||
volumes: |
||||
dolphinscheduler-postgresql: |
||||
dolphinscheduler-zookeeper: |
||||
dolphinscheduler-worker-data: |
||||
dolphinscheduler-logs: |
||||
dolphinscheduler-shared-local: |
||||
dolphinscheduler-resource-local: |
@ -1,71 +0,0 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
FROM openjdk:8-jre-slim-buster |
||||
|
||||
ARG VERSION |
||||
ARG DEBIAN_FRONTEND=noninteractive |
||||
|
||||
ENV TZ Asia/Shanghai |
||||
ENV LANG C.UTF-8 |
||||
ENV DOCKER true |
||||
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler |
||||
|
||||
# 1. install command/library/software |
||||
# If install slowly, you can replcae debian's mirror with new mirror, Example: |
||||
# RUN { \ |
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster main contrib non-free"; \ |
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-updates main contrib non-free"; \ |
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian/ buster-backports main contrib non-free"; \ |
||||
# echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security buster/updates main contrib non-free"; \ |
||||
# } > /etc/apt/sources.list |
||||
RUN apt-get update && \ |
||||
apt-get install -y --no-install-recommends tzdata dos2unix python supervisor procps psmisc netcat sudo tini && \ |
||||
echo "Asia/Shanghai" > /etc/timezone && \ |
||||
rm -f /etc/localtime && \ |
||||
dpkg-reconfigure tzdata && \ |
||||
rm -rf /var/lib/apt/lists/* /tmp/* |
||||
|
||||
# 2. add dolphinscheduler |
||||
ADD ./apache-dolphinscheduler-${VERSION}-bin.tar.gz /opt/ |
||||
RUN ln -s -r /opt/apache-dolphinscheduler-${VERSION}-bin /opt/dolphinscheduler |
||||
WORKDIR /opt/apache-dolphinscheduler-${VERSION}-bin |
||||
|
||||
# 3. add configuration and modify permissions and set soft links |
||||
COPY ./checkpoint.sh /root/checkpoint.sh |
||||
COPY ./startup-init-conf.sh /root/startup-init-conf.sh |
||||
COPY ./startup.sh /root/startup.sh |
||||
COPY ./conf/dolphinscheduler/*.tpl /opt/dolphinscheduler/conf/ |
||||
COPY ./conf/dolphinscheduler/logback/* /opt/dolphinscheduler/conf/ |
||||
COPY ./conf/dolphinscheduler/supervisor/supervisor.ini /etc/supervisor/conf.d/ |
||||
COPY ./conf/dolphinscheduler/env/dolphinscheduler_env.sh.tpl /opt/dolphinscheduler/conf/env/ |
||||
RUN sed -i 's/*.conf$/*.ini/' /etc/supervisor/supervisord.conf && \ |
||||
dos2unix /root/checkpoint.sh && \ |
||||
dos2unix /root/startup-init-conf.sh && \ |
||||
dos2unix /root/startup.sh && \ |
||||
dos2unix /opt/dolphinscheduler/script/*.sh && \ |
||||
dos2unix /opt/dolphinscheduler/bin/*.sh && \ |
||||
rm -f /bin/sh && \ |
||||
ln -s /bin/bash /bin/sh && \ |
||||
mkdir -p /tmp/xls && \ |
||||
echo PS1=\'\\w \\$ \' >> ~/.bashrc && \ |
||||
echo "Set disable_coredump false" >> /etc/sudo.conf |
||||
|
||||
# 4. expose port |
||||
EXPOSE 5678 1234 12345 50051 50052 |
||||
|
||||
ENTRYPOINT ["/usr/bin/tini", "--", "/root/startup.sh"] |
@ -1,91 +0,0 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
# user data local directory path, please make sure the directory exists and have read write permissions |
||||
data.basedir.path=${DATA_BASEDIR_PATH} |
||||
|
||||
# resource storage type: HDFS, S3, NONE |
||||
resource.storage.type=${RESOURCE_STORAGE_TYPE} |
||||
|
||||
# resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended |
||||
resource.upload.path=${RESOURCE_UPLOAD_PATH} |
||||
|
||||
# whether to startup kerberos |
||||
hadoop.security.authentication.startup.state=${HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE} |
||||
|
||||
# java.security.krb5.conf path |
||||
java.security.krb5.conf.path=${JAVA_SECURITY_KRB5_CONF_PATH} |
||||
|
||||
# login user from keytab username |
||||
login.user.keytab.username=${LOGIN_USER_KEYTAB_USERNAME} |
||||
|
||||
# login user from keytab path |
||||
login.user.keytab.path=${LOGIN_USER_KEYTAB_PATH} |
||||
|
||||
# kerberos expire time, the unit is hour |
||||
kerberos.expire.time=${KERBEROS_EXPIRE_TIME} |
||||
|
||||
# resource view suffixs |
||||
#resource.view.suffixs=txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js |
||||
|
||||
# if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path |
||||
hdfs.root.user=${HDFS_ROOT_USER} |
||||
|
||||
# if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir |
||||
fs.defaultFS=${FS_DEFAULT_FS} |
||||
|
||||
# if resource.storage.type=S3, s3 endpoint |
||||
fs.s3a.endpoint=${FS_S3A_ENDPOINT} |
||||
|
||||
# if resource.storage.type=S3, s3 access key |
||||
fs.s3a.access.key=${FS_S3A_ACCESS_KEY} |
||||
|
||||
# if resource.storage.type=S3, s3 secret key |
||||
fs.s3a.secret.key=${FS_S3A_SECRET_KEY} |
||||
|
||||
# resourcemanager port, the default value is 8088 if not specified |
||||
resource.manager.httpaddress.port=${RESOURCE_MANAGER_HTTPADDRESS_PORT} |
||||
|
||||
# if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty |
||||
yarn.resourcemanager.ha.rm.ids=${YARN_RESOURCEMANAGER_HA_RM_IDS} |
||||
|
||||
# if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname |
||||
yarn.application.status.address=${YARN_APPLICATION_STATUS_ADDRESS} |
||||
|
||||
# job history status url when application number threshold is reached(default 10000, maybe it was set to 1000) |
||||
yarn.job.history.status.address=${YARN_JOB_HISTORY_STATUS_ADDRESS} |
||||
|
||||
# datasource encryption enable |
||||
datasource.encryption.enable=${DATASOURCE_ENCRYPTION_ENABLE} |
||||
|
||||
# datasource encryption salt |
||||
datasource.encryption.salt=${DATASOURCE_ENCRYPTION_SALT} |
||||
|
||||
# use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions; if set false, executing user is the deploy user and doesn't need sudo permissions |
||||
sudo.enable=${SUDO_ENABLE} |
||||
|
||||
# network interface preferred like eth0, default: empty |
||||
#dolphin.scheduler.network.interface.preferred= |
||||
|
||||
# network IP gets priority, default: inner outer |
||||
#dolphin.scheduler.network.priority.strategy=default |
||||
|
||||
# system env path |
||||
#dolphinscheduler.env.path=env/dolphinscheduler_env.sh |
||||
|
||||
# development state |
||||
development.state=false |
@ -1,28 +0,0 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
export HADOOP_HOME=$HADOOP_HOME |
||||
export HADOOP_CONF_DIR=$HADOOP_CONF_DIR |
||||
export SPARK_HOME1=$SPARK_HOME1 |
||||
export SPARK_HOME2=$SPARK_HOME2 |
||||
export PYTHON_HOME=$PYTHON_HOME |
||||
export JAVA_HOME=$JAVA_HOME |
||||
export HIVE_HOME=$HIVE_HOME |
||||
export FLINK_HOME=$FLINK_HOME |
||||
export DATAX_HOME=$DATAX_HOME |
||||
|
||||
export PATH=$HADOOP_HOME/bin:$SPARK_HOME1/bin:$SPARK_HOME2/bin:$PYTHON_HOME/bin:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_HOME/bin:$PATH |
@ -1,62 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- api server logback config start --> |
||||
<appender name="APILOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-api.log</file> |
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-api.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>64MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- api server logback config end --> |
||||
|
||||
<logger name="org.apache.zookeeper" level="WARN"/> |
||||
<logger name="org.apache.hbase" level="WARN"/> |
||||
<logger name="org.apache.hadoop" level="WARN"/> |
||||
|
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
<appender-ref ref="APILOGFILE"/> |
||||
</root> |
||||
|
||||
</configuration> |
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<conversionRule conversionWord="messsage" |
||||
converterClass="org.apache.dolphinscheduler.server.log.SensitiveDataConverter"/> |
||||
<appender name="TASKLOGFILE" class="ch.qos.logback.classic.sift.SiftingAppender"> |
||||
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> --> |
||||
<filter class="org.apache.dolphinscheduler.server.log.TaskLogFilter"/> |
||||
<Discriminator class="org.apache.dolphinscheduler.server.log.TaskLogDiscriminator"> |
||||
<key>taskAppId</key> |
||||
<logBase>${log.base}</logBase> |
||||
</Discriminator> |
||||
<sift> |
||||
<appender name="FILE-${taskAppId}" class="ch.qos.logback.core.FileAppender"> |
||||
<file>${log.base}/${taskAppId}.log</file> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
<append>true</append> |
||||
</appender> |
||||
</sift> |
||||
</appender> |
||||
<!-- master server logback config start --> |
||||
<appender name="MASTERLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-master.log</file> |
||||
<!--<filter class="org.apache.dolphinscheduler.server.log.MasterLogFilter"> |
||||
<level>INFO</level> |
||||
</filter>--> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-master.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>200MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- master server logback config end --> |
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
<appender-ref ref="TASKLOGFILE"/> |
||||
<appender-ref ref="MASTERLOGFILE"/> |
||||
</root> |
||||
|
||||
</configuration> |
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<!-- Logback configuration. See http://logback.qos.ch/manual/index.html --> |
||||
<configuration scan="true" scanPeriod="120 seconds"> <!--debug="true" --> |
||||
|
||||
<property name="log.base" value="logs"/> |
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %msg%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
|
||||
<!-- worker server logback config start --> |
||||
<conversionRule conversionWord="messsage" |
||||
converterClass="org.apache.dolphinscheduler.server.log.SensitiveDataConverter"/> |
||||
<appender name="TASKLOGFILE" class="ch.qos.logback.classic.sift.SiftingAppender"> |
||||
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> --> |
||||
<filter class="org.apache.dolphinscheduler.server.log.TaskLogFilter"/> |
||||
<Discriminator class="org.apache.dolphinscheduler.server.log.TaskLogDiscriminator"> |
||||
<key>taskAppId</key> |
||||
<logBase>${log.base}</logBase> |
||||
</Discriminator> |
||||
<sift> |
||||
<appender name="FILE-${taskAppId}" class="ch.qos.logback.core.FileAppender"> |
||||
<file>${log.base}/${taskAppId}.log</file> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
<append>true</append> |
||||
</appender> |
||||
</sift> |
||||
</appender> |
||||
<appender name="WORKERLOGFILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
||||
<file>${log.base}/dolphinscheduler-worker.log</file> |
||||
<!-- <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
||||
<level>INFO</level> |
||||
</filter> --> |
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy"> |
||||
<fileNamePattern>${log.base}/dolphinscheduler-worker.%d{yyyy-MM-dd_HH}.%i.log</fileNamePattern> |
||||
<maxHistory>168</maxHistory> |
||||
<maxFileSize>200MB</maxFileSize> |
||||
</rollingPolicy> |
||||
<encoder> |
||||
<pattern> |
||||
[%level] %date{yyyy-MM-dd HH:mm:ss.SSS} %logger{96}:[%line] - %messsage%n |
||||
</pattern> |
||||
<charset>UTF-8</charset> |
||||
</encoder> |
||||
</appender> |
||||
<!-- worker server logback config end --> |
||||
|
||||
<root level="INFO"> |
||||
<appender-ref ref="STDOUT"/> |
||||
<appender-ref ref="TASKLOGFILE"/> |
||||
<appender-ref ref="WORKERLOGFILE"/> |
||||
</root> |
||||
|
||||
</configuration> |
@ -1,19 +0,0 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
registry.plugin.name=${REGISTRY_PLUGIN_NAME} |
||||
registry.servers=${REGISTRY_SERVERS} |
@ -1,107 +0,0 @@
|
||||
; 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. |
||||
|
||||
; program config file |
||||
|
||||
[program:master] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start master-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_MASTER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:worker] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start worker-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_WORKER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:api] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start api-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_API_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=10 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:alert] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start alert-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_ALERT_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=5 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:logger] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start logger-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_LOGGER_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=5 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
||||
|
||||
[program:standalone] |
||||
command=%(ENV_DOLPHINSCHEDULER_BIN)s/dolphinscheduler-daemon.sh start standalone-server |
||||
directory=%(ENV_DOLPHINSCHEDULER_HOME)s |
||||
priority=999 |
||||
autostart=%(ENV_STANDALONE_START_ENABLED)s |
||||
autorestart=true |
||||
startsecs=5 |
||||
stopwaitsecs=3 |
||||
exitcodes=0 |
||||
stopasgroup=true |
||||
killasgroup=true |
||||
redirect_stderr=true |
||||
stdout_logfile=/dev/fd/1 |
||||
stdout_logfile_maxbytes=0 |
@ -1,34 +0,0 @@
|
||||
#!/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. |
||||
# |
||||
|
||||
set -e |
||||
|
||||
ROOT_DIR=$(dirname "$0")/../../.. |
||||
MVN="$ROOT_DIR"/mvnw |
||||
VERSION=$("$MVN" -q -DforceStdout -N org.apache.maven.plugins:maven-help-plugin:3.2.0:evaluate -Dexpression=project.version) |
||||
|
||||
DOCKER_REPO=${DOCKER_REPO:-"apache/dolphinscheduler"} |
||||
TAG=${TAG:-"$VERSION"} |
||||
|
||||
echo "Building Docker image as: $DOCKER_REPO:$TAG" |
||||
|
||||
"$MVN" -B clean package -Prelease -Dmaven.test.skip=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 |
||||
|
||||
cp "$ROOT_DIR"/dolphinscheduler-dist/target/apache-dolphinscheduler-$VERSION-bin.tar.gz "$ROOT_DIR"/docker/build/ |
||||
|
||||
docker build --build-arg VERSION=$VERSION -t $DOCKER_REPO:$TAG "$ROOT_DIR"/docker/build/ |
@ -1,61 +0,0 @@
|
||||
:: 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. |
||||
:: |
||||
@echo off |
||||
|
||||
echo "------ dolphinscheduler start - build -------" |
||||
set |
||||
setlocal enableextensions enabledelayedexpansion |
||||
|
||||
if not defined VERSION ( |
||||
echo "set environment variable [VERSION]" |
||||
set first=1 |
||||
for /f "tokens=3 delims=<>" %%a in ('findstr "<version>[0-9].*</version>" %cd%\pom.xml') do ( |
||||
if !first! EQU 1 (set VERSION=%%a) |
||||
set first=0 |
||||
) |
||||
) |
||||
|
||||
if not defined DOCKER_REPO ( |
||||
echo "set environment variable [DOCKER_REPO]" |
||||
set DOCKER_REPO=dolphinscheduler |
||||
) |
||||
|
||||
echo "Version: %VERSION%" |
||||
echo "Repo: %DOCKER_REPO%" |
||||
|
||||
echo "Current Directory is %cd%" |
||||
|
||||
:: maven package(Project Directory) |
||||
echo "mvn clean package -Prelease -DskipTests=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120" |
||||
call mvn clean package -Prelease -DskipTests=true -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.httpconnectionManager.ttlSeconds=120 |
||||
if "%errorlevel%"=="1" goto :mvnFailed |
||||
|
||||
:: move dolphinscheduler-bin.tar.gz file to docker/build directory |
||||
echo "move %cd%\dolphinscheduler-dist\target\apache-dolphinscheduler-%VERSION%-bin.tar.gz %cd%\docker\build\" |
||||
move %cd%\dolphinscheduler-dist\target\apache-dolphinscheduler-%VERSION%-bin.tar.gz %cd%\docker\build\ |
||||
|
||||
:: docker build |
||||
echo "docker build --build-arg VERSION=%VERSION% -t %DOCKER_REPO%:%VERSION% %cd%\docker\build\" |
||||
docker build --build-arg VERSION=%VERSION% -t %DOCKER_REPO%:%VERSION% %cd%\docker\build\ |
||||
if "%errorlevel%"=="1" goto :dockerBuildFailed |
||||
|
||||
echo "------ dolphinscheduler end - build -------" |
||||
|
||||
:mvnFailed |
||||
echo "MAVEN PACKAGE FAILED!" |
||||
|
||||
:dockerBuildFailed |
||||
echo "DOCKER BUILD FAILED!" |
@ -1,23 +0,0 @@
|
||||
:: 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. |
||||
:: |
||||
@echo off |
||||
|
||||
echo "------ push start -------" |
||||
set |
||||
|
||||
docker push %DOCKER_REPO%:%VERSION% |
||||
|
||||
echo "------ push end -------" |
@ -1,143 +0,0 @@
|
||||
#!/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. |
||||
# |
||||
|
||||
set -e |
||||
|
||||
echo "init env variables" |
||||
|
||||
# Define parameters default value |
||||
|
||||
#============================================================================ |
||||
# Database |
||||
#============================================================================ |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_TYPE=${DATABASE_TYPE:-"postgresql"} |
||||
# export DATABASE_DRIVER=${DATABASE_DRIVER:-"org.postgresql.Driver"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_HOST=${DATABASE_HOST:-"127.0.0.1"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PORT=${DATABASE_PORT:-"5432"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_USERNAME=${DATABASE_USERNAME:-"root"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PASSWORD=${DATABASE_PASSWORD:-"root"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_DATABASE=${DATABASE_DATABASE:-"dolphinscheduler"} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export DATABASE_PARAMS=${DATABASE_PARAMS:-"characterEncoding=utf8"} |
||||
# transform params to SPRING_DATASOURCE_XXX |
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_URL="jdbc:${DATABASE_TYPE}://${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_DATABASE}?${DATABASE_PARAMS}" |
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_USERNAME=${DATABASE_USERNAME} |
||||
[ "h2" == ${DATABASE_TYPE} ] || export SPRING_DATASOURCE_PASSWORD=${DATABASE_PASSWORD} |
||||
# export SPRING_DATASOURCE_DRIVER_CLASS_NAME=${DATABASE_DRIVER} |
||||
|
||||
|
||||
#============================================================================ |
||||
# Registry |
||||
#============================================================================ |
||||
export REGISTRY_PLUGIN_NAME=${REGISTRY_PLUGIN_NAME:-"zookeeper"} |
||||
export REGISTRY_SERVERS=${REGISTRY_SERVERS:-"127.0.0.1:2181"} |
||||
|
||||
#============================================================================ |
||||
# Common |
||||
#============================================================================ |
||||
# common opts |
||||
export DOLPHINSCHEDULER_OPTS=${DOLPHINSCHEDULER_OPTS:-""} |
||||
# common env |
||||
export DATA_BASEDIR_PATH=${DATA_BASEDIR_PATH:-"/tmp/dolphinscheduler"} |
||||
export RESOURCE_STORAGE_TYPE=${RESOURCE_STORAGE_TYPE:-"HDFS"} |
||||
export RESOURCE_UPLOAD_PATH=${RESOURCE_UPLOAD_PATH:-"/dolphinscheduler"} |
||||
export FS_DEFAULT_FS=${FS_DEFAULT_FS:-"file:///"} |
||||
export FS_S3A_ENDPOINT=${FS_S3A_ENDPOINT:-"s3.xxx.amazonaws.com"} |
||||
export FS_S3A_ACCESS_KEY=${FS_S3A_ACCESS_KEY:-"xxxxxxx"} |
||||
export FS_S3A_SECRET_KEY=${FS_S3A_SECRET_KEY:-"xxxxxxx"} |
||||
export HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE=${HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE:-"false"} |
||||
export JAVA_SECURITY_KRB5_CONF_PATH=${JAVA_SECURITY_KRB5_CONF_PATH:-"/opt/krb5.conf"} |
||||
export LOGIN_USER_KEYTAB_USERNAME=${LOGIN_USER_KEYTAB_USERNAME:-"hdfs@HADOOP.COM"} |
||||
export LOGIN_USER_KEYTAB_PATH=${LOGIN_USER_KEYTAB_PATH:-"/opt/hdfs.keytab"} |
||||
export KERBEROS_EXPIRE_TIME=${KERBEROS_EXPIRE_TIME:-"2"} |
||||
export HDFS_ROOT_USER=${HDFS_ROOT_USER:-"hdfs"} |
||||
export RESOURCE_MANAGER_HTTPADDRESS_PORT=${RESOURCE_MANAGER_HTTPADDRESS_PORT:-"8088"} |
||||
export YARN_RESOURCEMANAGER_HA_RM_IDS=${YARN_RESOURCEMANAGER_HA_RM_IDS:-""} |
||||
export YARN_APPLICATION_STATUS_ADDRESS=${YARN_APPLICATION_STATUS_ADDRESS:-"http://ds1:%s/ws/v1/cluster/apps/%s"} |
||||
export YARN_JOB_HISTORY_STATUS_ADDRESS=${YARN_JOB_HISTORY_STATUS_ADDRESS:-"http://ds1:19888/ws/v1/history/mapreduce/jobs/%s"} |
||||
export DATASOURCE_ENCRYPTION_ENABLE=${DATASOURCE_ENCRYPTION_ENABLE:-"false"} |
||||
export DATASOURCE_ENCRYPTION_SALT=${DATASOURCE_ENCRYPTION_SALT:-"!@#$%^&*"} |
||||
export SUDO_ENABLE=${SUDO_ENABLE:-"true"} |
||||
# dolphinscheduler env |
||||
export HADOOP_HOME=${HADOOP_HOME:-"/opt/soft/hadoop"} |
||||
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-"/opt/soft/hadoop/etc/hadoop"} |
||||
export SPARK_HOME1=${SPARK_HOME1:-"/opt/soft/spark1"} |
||||
export SPARK_HOME2=${SPARK_HOME2:-"/opt/soft/spark2"} |
||||
export PYTHON_HOME=${PYTHON_HOME:-"/usr/bin/python"} |
||||
export JAVA_HOME=${JAVA_HOME:-"/usr/local/openjdk-8"} |
||||
export HIVE_HOME=${HIVE_HOME:-"/opt/soft/hive"} |
||||
export FLINK_HOME=${FLINK_HOME:-"/opt/soft/flink"} |
||||
export DATAX_HOME=${DATAX_HOME:-"/opt/soft/datax"} |
||||
|
||||
#============================================================================ |
||||
# Master Server |
||||
#============================================================================ |
||||
export MASTER_SERVER_OPTS=${MASTER_SERVER_OPTS:-"-Xms1g -Xmx1g -Xmn512m"} |
||||
export MASTER_EXEC_THREADS=${MASTER_EXEC_THREADS:-"100"} |
||||
export MASTER_EXEC_TASK_NUM=${MASTER_EXEC_TASK_NUM:-"20"} |
||||
export MASTER_DISPATCH_TASK_NUM=${MASTER_DISPATCH_TASK_NUM:-"3"} |
||||
export MASTER_HOST_SELECTOR=${MASTER_HOST_SELECTOR:-"LowerWeight"} |
||||
export MASTER_HEARTBEAT_INTERVAL=${MASTER_HEARTBEAT_INTERVAL:-"10"} |
||||
export MASTER_TASK_COMMIT_RETRYTIMES=${MASTER_TASK_COMMIT_RETRYTIMES:-"5"} |
||||
export MASTER_TASK_COMMIT_INTERVAL=${MASTER_TASK_COMMIT_INTERVAL:-"1000"} |
||||
export MASTER_MAX_CPULOAD_AVG=${MASTER_MAX_CPULOAD_AVG:-"-1"} |
||||
export MASTER_RESERVED_MEMORY=${MASTER_RESERVED_MEMORY:-"0.3"} |
||||
|
||||
#============================================================================ |
||||
# Worker Server |
||||
#============================================================================ |
||||
export WORKER_SERVER_OPTS=${WORKER_SERVER_OPTS:-"-Xms1g -Xmx1g -Xmn512m"} |
||||
export WORKER_EXEC_THREADS=${WORKER_EXEC_THREADS:-"100"} |
||||
export WORKER_HEARTBEAT_INTERVAL=${WORKER_HEARTBEAT_INTERVAL:-"10"} |
||||
export WORKER_HOST_WEIGHT=${WORKER_HOST_WEIGHT:-"100"} |
||||
export WORKER_MAX_CPULOAD_AVG=${WORKER_MAX_CPULOAD_AVG:-"-1"} |
||||
export WORKER_RESERVED_MEMORY=${WORKER_RESERVED_MEMORY:-"0.3"} |
||||
export WORKER_GROUPS=${WORKER_GROUPS:-"default"} |
||||
export ALERT_LISTEN_HOST=${ALERT_LISTEN_HOST:-"localhost"} |
||||
|
||||
#============================================================================ |
||||
# Alert Server |
||||
#============================================================================ |
||||
export ALERT_SERVER_OPTS=${ALERT_SERVER_OPTS:-"-Xms512m -Xmx512m -Xmn256m"} |
||||
|
||||
#============================================================================ |
||||
# Api Server |
||||
#============================================================================ |
||||
export API_SERVER_OPTS=${API_SERVER_OPTS:-"-Xms512m -Xmx512m -Xmn256m"} |
||||
|
||||
#============================================================================ |
||||
# Logger Server |
||||
#============================================================================ |
||||
export LOGGER_SERVER_OPTS=${LOGGER_SERVER_OPTS:-"-Xms512m -Xmx512m -Xmn256m"} |
||||
|
||||
echo "generate dolphinscheduler config" |
||||
ls ${DOLPHINSCHEDULER_HOME}/conf/ | grep ".tpl" | while read line; do |
||||
eval "cat << EOF |
||||
$(cat ${DOLPHINSCHEDULER_HOME}/conf/${line}) |
||||
EOF |
||||
" > ${DOLPHINSCHEDULER_HOME}/conf/${line%.*} |
||||
done |
||||
|
||||
# generate dolphinscheduler env |
||||
DOLPHINSCHEDULER_ENV_PATH=${DOLPHINSCHEDULER_HOME}/conf/env/dolphinscheduler_env.sh |
||||
if [ -r "${DOLPHINSCHEDULER_ENV_PATH}.tpl" ]; then |
||||
eval "cat << EOF |
||||
$(cat ${DOLPHINSCHEDULER_ENV_PATH}.tpl) |
||||
EOF |
||||
" > ${DOLPHINSCHEDULER_ENV_PATH} |
||||
chmod +x ${DOLPHINSCHEDULER_ENV_PATH} |
||||
fi |
@ -1,132 +0,0 @@
|
||||
#!/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. |
||||
# |
||||
|
||||
set -e |
||||
|
||||
export DOLPHINSCHEDULER_BIN=${DOLPHINSCHEDULER_HOME}/bin |
||||
export MASTER_START_ENABLED=false |
||||
export WORKER_START_ENABLED=false |
||||
export API_START_ENABLED=false |
||||
export ALERT_START_ENABLED=false |
||||
export LOGGER_START_ENABLED=false |
||||
export STANDALONE_START_ENABLED=false |
||||
|
||||
# wait database |
||||
waitDatabase() { |
||||
echo "try to connect ${DATABASE_TYPE} ..." |
||||
while ! nc -z ${DATABASE_HOST} ${DATABASE_PORT}; do |
||||
local counter=$((counter+1)) |
||||
if [ $counter == 30 ]; then |
||||
echo "Error: Couldn't connect to ${DATABASE_TYPE}." |
||||
exit 1 |
||||
fi |
||||
echo "Trying to connect to ${DATABASE_TYPE} at ${DATABASE_HOST}:${DATABASE_PORT}. Attempt $counter." |
||||
sleep 5 |
||||
done |
||||
echo "${DATABASE_TYPE} connection is ok" |
||||
} |
||||
|
||||
# init database |
||||
initDatabase() { |
||||
echo "import sql data" |
||||
${DOLPHINSCHEDULER_HOME}/script/create-dolphinscheduler.sh |
||||
} |
||||
|
||||
# wait zk |
||||
waitZK() { |
||||
echo "try to connect zookeeper ..." |
||||
echo "${ZOOKEEPER_QUORUM}" | awk -F ',' 'BEGIN{ i=1 }{ while( i <= NF ){ print $i; i++ } }' | while read line; do |
||||
while ! nc -z ${line%:*} ${line#*:}; do |
||||
local counter=$((counter+1)) |
||||
if [ $counter == 30 ]; then |
||||
echo "Error: Couldn't connect to zookeeper." |
||||
exit 1 |
||||
fi |
||||
echo "Trying to connect to zookeeper at ${line}. Attempt $counter." |
||||
sleep 5 |
||||
done |
||||
done |
||||
echo "zookeeper connection is ok" |
||||
} |
||||
|
||||
# print usage |
||||
printUsage() { |
||||
echo -e "Dolphin Scheduler is a distributed and easy-to-expand visual DAG workflow scheduling system," |
||||
echo -e "dedicated to solving the complex dependencies in data processing, making the scheduling system out of the box for data processing.\n" |
||||
echo -e "Usage: [ all | master-server | worker-server | api-server | alert-server | standalone-server ]\n" |
||||
printf "%-13s: %s\n" "all" "Run master-server, worker-server, api-server and alert-server" |
||||
printf "%-13s: %s\n" "master-server" "MasterServer is mainly responsible for DAG task split, task submission monitoring." |
||||
printf "%-13s: %s\n" "worker-server" "WorkerServer is mainly responsible for task execution and providing log services." |
||||
printf "%-13s: %s\n" "api-server" "ApiServer is mainly responsible for processing requests and providing the front-end UI layer." |
||||
printf "%-13s: %s\n" "alert-server" "AlertServer mainly include Alarms." |
||||
printf "%-13s: %s\n" "standalone-server" "Standalone server that uses embedded zookeeper and database, only for testing and demostration." |
||||
} |
||||
|
||||
# init config file |
||||
source /root/startup-init-conf.sh |
||||
|
||||
case "$1" in |
||||
(all) |
||||
waitZK |
||||
waitDatabase |
||||
initDatabase |
||||
export MASTER_START_ENABLED=true |
||||
export WORKER_START_ENABLED=true |
||||
export API_START_ENABLED=true |
||||
export ALERT_START_ENABLED=true |
||||
export LOGGER_START_ENABLED=true |
||||
;; |
||||
(master-server) |
||||
waitZK |
||||
waitDatabase |
||||
export MASTER_START_ENABLED=true |
||||
;; |
||||
(worker-server) |
||||
waitZK |
||||
waitDatabase |
||||
export WORKER_START_ENABLED=true |
||||
export LOGGER_START_ENABLED=true |
||||
;; |
||||
(api-server) |
||||
waitZK |
||||
waitDatabase |
||||
initDatabase |
||||
export API_START_ENABLED=true |
||||
;; |
||||
(alert-server) |
||||
waitDatabase |
||||
export ALERT_START_ENABLED=true |
||||
;; |
||||
(standalone-server) |
||||
export STANDALONE_START_ENABLED=true |
||||
;; |
||||
(help) |
||||
printUsage |
||||
exit 1 |
||||
;; |
||||
(*) |
||||
printUsage |
||||
exit 1 |
||||
;; |
||||
esac |
||||
|
||||
# init directories |
||||
mkdir -p ${DOLPHINSCHEDULER_HOME}/logs |
||||
|
||||
# start supervisord |
||||
supervisord -n -u root |
@ -1,42 +0,0 @@
|
||||
#!/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. |
||||
# |
||||
|
||||
echo "------- check server status -------" |
||||
cd $(dirname $0) |
||||
until [ $(docker-compose top | grep java | grep "dolphinscheduler" | awk -F 'classpath ' '{print $2}' | awk '{print $2}' | sort | uniq -c | wc -l) -eq 5 ]; do |
||||
counter=$((counter+1)) |
||||
if [ $counter -eq 30 ]; then |
||||
echo "error: all servers start failed" |
||||
exit 1 |
||||
fi |
||||
echo "waiting for all servers started ..." |
||||
sleep 5 |
||||
done |
||||
echo "all servers start successfully" |
||||
|
||||
counter=0 |
||||
until docker logs docker-swarm_dolphinscheduler-api_1 2>&1 | grep '0.0.0.0:12345' &>/dev/null; do |
||||
counter=$((counter+1)) |
||||
if [ $counter -eq 30 ]; then |
||||
echo "error: api server is not ready" |
||||
exit 1 |
||||
fi |
||||
echo "waiting for api server ready ..." |
||||
sleep 5 |
||||
done |
||||
echo "api server is ready" |
@ -1,121 +0,0 @@
|
||||
# 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. |
||||
# |
||||
|
||||
#============================================================================ |
||||
# Database |
||||
#============================================================================ |
||||
# postgresql |
||||
DATABASE_TYPE=postgresql |
||||
DATABASE_DRIVER=org.postgresql.Driver |
||||
DATABASE_HOST=dolphinscheduler-postgresql |
||||
DATABASE_PORT=5432 |
||||
DATABASE_USERNAME=root |
||||
DATABASE_PASSWORD=root |
||||
DATABASE_DATABASE=dolphinscheduler |
||||
DATABASE_PARAMS=characterEncoding=utf8 |
||||
# mysql |
||||
# DATABASE_TYPE=mysql |
||||
# DATABASE_DRIVER=com.mysql.cj.jdbc.Driver |
||||
# DATABASE_HOST=dolphinscheduler-mysql |
||||
# DATABASE_PORT=3306 |
||||
# DATABASE_USERNAME=root |
||||
# DATABASE_PASSWORD=root |
||||
# DATABASE_DATABASE=dolphinscheduler |
||||
# DATABASE_PARAMS=useUnicode=true&characterEncoding=UTF-8 |
||||
|
||||
#============================================================================ |
||||
# Registry |
||||
#============================================================================ |
||||
REGISTRY_PLUGIN_NAME=zookeeper |
||||
REGISTRY_SERVERS=dolphinscheduler-zookeeper:2181 |
||||
|
||||
#============================================================================ |
||||
# Common |
||||
#============================================================================ |
||||
# common opts |
||||
DOLPHINSCHEDULER_OPTS= |
||||
# common env |
||||
DATA_BASEDIR_PATH=/tmp/dolphinscheduler |
||||
RESOURCE_STORAGE_TYPE=HDFS |
||||
RESOURCE_UPLOAD_PATH=/dolphinscheduler |
||||
FS_DEFAULT_FS=file:/// |
||||
FS_S3A_ENDPOINT=s3.xxx.amazonaws.com |
||||
FS_S3A_ACCESS_KEY=xxxxxxx |
||||
FS_S3A_SECRET_KEY=xxxxxxx |
||||
HADOOP_SECURITY_AUTHENTICATION_STARTUP_STATE=false |
||||
JAVA_SECURITY_KRB5_CONF_PATH=/opt/krb5.conf |
||||
LOGIN_USER_KEYTAB_USERNAME=hdfs@HADOOP.COM |
||||
LOGIN_USER_KEYTAB_PATH=/opt/hdfs.keytab |
||||
KERBEROS_EXPIRE_TIME=2 |
||||
HDFS_ROOT_USER=hdfs |
||||
RESOURCE_MANAGER_HTTPADDRESS_PORT=8088 |
||||
YARN_RESOURCEMANAGER_HA_RM_IDS= |
||||
YARN_APPLICATION_STATUS_ADDRESS=http://ds1:%s/ws/v1/cluster/apps/%s |
||||
YARN_JOB_HISTORY_STATUS_ADDRESS=http://ds1:19888/ws/v1/history/mapreduce/jobs/%s |
||||
DATASOURCE_ENCRYPTION_ENABLE=false |
||||
DATASOURCE_ENCRYPTION_SALT=!@#$%^&* |
||||
SUDO_ENABLE=true |
||||
# dolphinscheduler env |
||||
HADOOP_HOME=/opt/soft/hadoop |
||||
HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop |
||||
SPARK_HOME1=/opt/soft/spark1 |
||||
SPARK_HOME2=/opt/soft/spark2 |
||||
PYTHON_HOME=/usr/bin/python |
||||
JAVA_HOME=/usr/local/openjdk-8 |
||||
HIVE_HOME=/opt/soft/hive |
||||
FLINK_HOME=/opt/soft/flink |
||||
DATAX_HOME=/opt/soft/datax |
||||
|
||||
#============================================================================ |
||||
# Master Server |
||||
#============================================================================ |
||||
MASTER_SERVER_OPTS=-Xms1g -Xmx1g -Xmn512m |
||||
MASTER_EXEC_THREADS=100 |
||||
MASTER_EXEC_TASK_NUM=20 |
||||
MASTER_DISPATCH_TASK_NUM=3 |
||||
MASTER_HOST_SELECTOR=LowerWeight |
||||
MASTER_HEARTBEAT_INTERVAL=10 |
||||
MASTER_TASK_COMMIT_RETRYTIMES=5 |
||||
MASTER_TASK_COMMIT_INTERVAL=1000 |
||||
MASTER_MAX_CPULOAD_AVG=-1 |
||||
MASTER_RESERVED_MEMORY=0.3 |
||||
|
||||
#============================================================================ |
||||
# Worker Server |
||||
#============================================================================ |
||||
WORKER_SERVER_OPTS=-Xms1g -Xmx1g -Xmn512m |
||||
WORKER_EXEC_THREADS=100 |
||||
WORKER_HEARTBEAT_INTERVAL=10 |
||||
WORKER_HOST_WEIGHT=100 |
||||
WORKER_MAX_CPULOAD_AVG=-1 |
||||
WORKER_RESERVED_MEMORY=0.3 |
||||
WORKER_GROUPS=default |
||||
ALERT_LISTEN_HOST=dolphinscheduler-alert |
||||
|
||||
#============================================================================ |
||||
# Alert Server |
||||
#============================================================================ |
||||
ALERT_SERVER_OPTS=-Xms512m -Xmx512m -Xmn256m |
||||
|
||||
#============================================================================ |
||||
# Api Server |
||||
#============================================================================ |
||||
API_SERVER_OPTS=-Xms512m -Xmx512m -Xmn256m |
||||
|
||||
#============================================================================ |
||||
# Logger Server |
||||
#============================================================================ |
||||
LOGGER_SERVER_OPTS=-Xms512m -Xmx512m -Xmn256m |
@ -1,143 +0,0 @@
|
||||
# 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. |
||||
|
||||
version: "3.1" |
||||
|
||||
services: |
||||
|
||||
dolphinscheduler-postgresql: |
||||
image: bitnami/postgresql:11.11.0 |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
POSTGRESQL_USERNAME: root |
||||
POSTGRESQL_PASSWORD: root |
||||
POSTGRESQL_DATABASE: dolphinscheduler |
||||
volumes: |
||||
- dolphinscheduler-postgresql:/bitnami/postgresql |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-zookeeper: |
||||
image: bitnami/zookeeper:3.6.2 |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
ALLOW_ANONYMOUS_LOGIN: "yes" |
||||
ZOO_4LW_COMMANDS_WHITELIST: srvr,ruok,wchs,cons |
||||
volumes: |
||||
- dolphinscheduler-zookeeper:/bitnami/zookeeper |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-api: |
||||
image: dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler:2.0.0-SNAPSHOT |
||||
command: api-server |
||||
ports: |
||||
- 12345:12345 |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
env_file: config.env.sh |
||||
healthcheck: |
||||
test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
- dolphinscheduler-postgresql |
||||
- dolphinscheduler-zookeeper |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
- dolphinscheduler-resource-local:/dolphinscheduler |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-alert: |
||||
image: dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler:2.0.0-SNAPSHOT |
||||
command: alert-server |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
env_file: config.env.sh |
||||
healthcheck: |
||||
test: ["CMD", "/root/checkpoint.sh", "AlertServer"] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
- dolphinscheduler-postgresql |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-master: |
||||
image: dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler:2.0.0-SNAPSHOT |
||||
command: master-server |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
env_file: config.env.sh |
||||
healthcheck: |
||||
test: ["CMD", "/root/checkpoint.sh", "MasterServer"] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
- dolphinscheduler-postgresql |
||||
- dolphinscheduler-zookeeper |
||||
volumes: |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
dolphinscheduler-worker: |
||||
image: dolphinscheduler.docker.scarf.sh/apache/dolphinscheduler:2.0.0-SNAPSHOT |
||||
command: worker-server |
||||
environment: |
||||
TZ: Asia/Shanghai |
||||
env_file: config.env.sh |
||||
healthcheck: |
||||
test: ["CMD", "/root/checkpoint.sh", "WorkerServer"] |
||||
interval: 30s |
||||
timeout: 5s |
||||
retries: 3 |
||||
depends_on: |
||||
- dolphinscheduler-postgresql |
||||
- dolphinscheduler-zookeeper |
||||
volumes: |
||||
- dolphinscheduler-worker-data:/tmp/dolphinscheduler |
||||
- dolphinscheduler-logs:/opt/dolphinscheduler/logs |
||||
- dolphinscheduler-shared-local:/opt/soft |
||||
- dolphinscheduler-resource-local:/dolphinscheduler |
||||
restart: unless-stopped |
||||
networks: |
||||
- dolphinscheduler |
||||
|
||||
networks: |
||||
dolphinscheduler: |
||||
driver: bridge |
||||
|
||||
volumes: |
||||
dolphinscheduler-postgresql: |
||||
dolphinscheduler-zookeeper: |
||||
dolphinscheduler-worker-data: |
||||
dolphinscheduler-logs: |
||||
dolphinscheduler-shared-local: |
||||
dolphinscheduler-resource-local: |
@ -0,0 +1,64 @@
|
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> |
||||
<id>dolphinscheduler-alert-server</id> |
||||
<formats> |
||||
<format>dir</format> |
||||
</formats> |
||||
<includeBaseDirectory>false</includeBaseDirectory> |
||||
<baseDirectory>alert-server</baseDirectory> |
||||
<fileSets> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/resources</directory> |
||||
<includes> |
||||
<include>*.yaml</include> |
||||
<include>*.xml</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/bin</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../../script/env</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<includes> |
||||
<include>dolphinscheduler_env.sh</include> |
||||
</includes> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../../dolphinscheduler-common/src/main/resources</directory> |
||||
<includes> |
||||
<include>**/*.properties</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
</fileSets> |
||||
<dependencySets> |
||||
<dependencySet> |
||||
<outputDirectory>libs</outputDirectory> |
||||
</dependencySet> |
||||
</dependencySets> |
||||
</assembly> |
@ -0,0 +1,32 @@
|
||||
#!/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 |
||||
|
||||
java $JAVA_OPTS \ |
||||
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \ |
||||
org.apache.dolphinscheduler.alert.AlertServer |
@ -0,0 +1,34 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
FROM openjdk:8-jre-slim-buster |
||||
|
||||
ENV DOCKER true |
||||
ENV TZ Asia/Shanghai |
||||
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler |
||||
|
||||
RUN apt update ; \ |
||||
apt install -y curl ; \ |
||||
rm -rf /var/lib/apt/lists/* |
||||
|
||||
WORKDIR $DOLPHINSCHEDULER_HOME |
||||
|
||||
ADD ./target/alert-server $DOLPHINSCHEDULER_HOME |
||||
|
||||
EXPOSE 50052 50053 |
||||
|
||||
CMD [ "/bin/bash", "./bin/start.sh" ] |
@ -0,0 +1,35 @@
|
||||
/* |
||||
* 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. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.alert; |
||||
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties; |
||||
import org.springframework.stereotype.Component; |
||||
|
||||
@Component |
||||
@ConfigurationProperties("alert") |
||||
public final class AlertConfig { |
||||
private int port; |
||||
|
||||
public int getPort() { |
||||
return port; |
||||
} |
||||
|
||||
public void setPort(final int port) { |
||||
this.port = port; |
||||
} |
||||
} |
@ -0,0 +1,68 @@
|
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> |
||||
<id>dolphinscheduler-api-server</id> |
||||
<formats> |
||||
<format>dir</format> |
||||
</formats> |
||||
<includeBaseDirectory>false</includeBaseDirectory> |
||||
<baseDirectory>api-server</baseDirectory> |
||||
<fileSets> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/resources</directory> |
||||
<includes> |
||||
<include>*.yaml</include> |
||||
<include>*.xml</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/bin</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../script/env</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<includes> |
||||
<include>dolphinscheduler_env.sh</include> |
||||
</includes> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../dolphinscheduler-common/src/main/resources</directory> |
||||
<includes> |
||||
<include>**/*.properties</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../dolphinscheduler-ui/dist</directory> |
||||
<outputDirectory>./ui</outputDirectory> |
||||
</fileSet> |
||||
</fileSets> |
||||
<dependencySets> |
||||
<dependencySet> |
||||
<outputDirectory>libs</outputDirectory> |
||||
</dependencySet> |
||||
</dependencySets> |
||||
</assembly> |
@ -0,0 +1,32 @@
|
||||
#!/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 |
||||
|
||||
java $JAVA_OPTS \ |
||||
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \ |
||||
org.apache.dolphinscheduler.api.ApiApplicationServer |
@ -0,0 +1,34 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
FROM openjdk:8-jre-slim-buster |
||||
|
||||
ENV DOCKER true |
||||
ENV TZ Asia/Shanghai |
||||
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler |
||||
|
||||
RUN apt update ; \ |
||||
apt install -y curl ; \ |
||||
rm -rf /var/lib/apt/lists/* |
||||
|
||||
WORKDIR $DOLPHINSCHEDULER_HOME |
||||
|
||||
ADD ./target/api-server $DOLPHINSCHEDULER_HOME |
||||
|
||||
EXPOSE 12345 |
||||
|
||||
CMD [ "/bin/bash", "./bin/start.sh" ] |
@ -0,0 +1,116 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
server: |
||||
port: 12345 |
||||
servlet: |
||||
session: |
||||
timeout: 120m |
||||
context-path: /dolphinscheduler/ |
||||
compression: |
||||
enabled: true |
||||
mime-types: text/html,text/xml,text/plain,text/css,text/javascript,application/javascript,application/json,application/xml |
||||
jetty: |
||||
max-http-form-post-size: 5000000 |
||||
|
||||
spring: |
||||
application: |
||||
name: api-server |
||||
main: |
||||
banner-mode: off |
||||
jackson: |
||||
time-zone: GMT+8 |
||||
servlet: |
||||
multipart: |
||||
max-file-size: 1024MB |
||||
max-request-size: 1024MB |
||||
messages: |
||||
basename: i18n/messages |
||||
datasource: |
||||
driver-class-name: org.postgresql.Driver |
||||
url: jdbc:postgresql://127.0.0.1:5432/dolphinscheduler |
||||
username: root |
||||
password: root |
||||
hikari: |
||||
connection-test-query: select 1 |
||||
minimum-idle: 5 |
||||
auto-commit: true |
||||
validation-timeout: 3000 |
||||
pool-name: DolphinScheduler |
||||
maximum-pool-size: 50 |
||||
connection-timeout: 30000 |
||||
idle-timeout: 600000 |
||||
leak-detection-threshold: 0 |
||||
initialization-fail-timeout: 1 |
||||
quartz: |
||||
auto-startup: false |
||||
job-store-type: jdbc |
||||
jdbc: |
||||
initialize-schema: never |
||||
properties: |
||||
org.quartz.threadPool:threadPriority: 5 |
||||
org.quartz.jobStore.isClustered: true |
||||
org.quartz.jobStore.class: org.quartz.impl.jdbcjobstore.JobStoreTX |
||||
org.quartz.scheduler.instanceId: AUTO |
||||
org.quartz.jobStore.tablePrefix: QRTZ_ |
||||
org.quartz.jobStore.acquireTriggersWithinLock: true |
||||
org.quartz.scheduler.instanceName: DolphinScheduler |
||||
org.quartz.threadPool.class: org.quartz.simpl.SimpleThreadPool |
||||
org.quartz.jobStore.useProperties: false |
||||
org.quartz.threadPool.makeThreadsDaemons: true |
||||
org.quartz.threadPool.threadCount: 25 |
||||
org.quartz.jobStore.misfireThreshold: 60000 |
||||
org.quartz.scheduler.makeSchedulerThreadDaemon: true |
||||
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.PostgreSQLDelegate |
||||
org.quartz.jobStore.clusterCheckinInterval: 5000 |
||||
|
||||
management: |
||||
endpoints: |
||||
web: |
||||
exposure: |
||||
include: '*' |
||||
metrics: |
||||
tags: |
||||
application: ${spring.application.name} |
||||
|
||||
registry: |
||||
type: zookeeper |
||||
zookeeper: |
||||
namespace: dolphinscheduler |
||||
connect-string: localhost:2181 |
||||
retry-policy: |
||||
base-sleep-time: 60ms |
||||
max-sleep: 300ms |
||||
max-retries: 5 |
||||
session-timeout: 30s |
||||
connection-timeout: 9s |
||||
block-until-connected: 600ms |
||||
digest: ~ |
||||
|
||||
# Override by profile |
||||
|
||||
--- |
||||
spring: |
||||
config: |
||||
activate: |
||||
on-profile: mysql |
||||
datasource: |
||||
driver-class-name: com.mysql.jdbc.Driver |
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 |
||||
quartz: |
||||
properties: |
||||
org.quartz.jobStore.driverDelegateClass: org.quartz.impl.jdbcjobstore.StdJDBCDelegate |
@ -1,34 +0,0 @@
|
||||
# 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. |
||||
# |
||||
spring: |
||||
datasource: |
||||
driver-class-name: org.h2.Driver |
||||
url: jdbc:h2:mem:dolphinscheduler;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;INIT=runscript from 'classpath:sql/dolphinscheduler_h2.sql' |
||||
username: sa |
||||
password: "" |
||||
hikari: |
||||
connection-test-query: select 1 |
||||
minimum-idle: 5 |
||||
auto-commit: true |
||||
validation-timeout: 3000 |
||||
pool-name: DolphinScheduler |
||||
maximum-pool-size: 50 |
||||
connection-timeout: 30000 |
||||
idle-timeout: 600000 |
||||
leak-detection-threshold: 0 |
||||
initialization-fail-timeout: 1 |
@ -1,34 +0,0 @@
|
||||
# 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. |
||||
# |
||||
spring: |
||||
datasource: |
||||
driver-class-name: com.mysql.jdbc.Driver |
||||
url: jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8 |
||||
username: ds_user |
||||
password: dolphinscheduler |
||||
hikari: |
||||
connection-test-query: select 1 |
||||
minimum-idle: 5 |
||||
auto-commit: true |
||||
validation-timeout: 3000 |
||||
pool-name: DolphinScheduler |
||||
maximum-pool-size: 50 |
||||
connection-timeout: 30000 |
||||
idle-timeout: 600000 |
||||
leak-detection-threshold: 0 |
||||
initialization-fail-timeout: 1 |
@ -1 +1 @@
|
||||
2.0.0 |
||||
2.0.1 |
||||
|
@ -0,0 +1,31 @@
|
||||
Janino - An embedded Java[TM] compiler |
||||
|
||||
Copyright (c) 2001-2016, Arno Unkrig |
||||
Copyright (c) 2015-2016 TIBCO Software Inc. |
||||
All rights reserved. |
||||
|
||||
Redistribution and use in source and binary forms, with or without |
||||
modification, are permitted provided that the following conditions |
||||
are met: |
||||
|
||||
1. Redistributions of source code must retain the above copyright |
||||
notice, this list of conditions and the following disclaimer. |
||||
2. Redistributions in binary form must reproduce the above |
||||
copyright notice, this list of conditions and the following |
||||
disclaimer in the documentation and/or other materials |
||||
provided with the distribution. |
||||
3. Neither the name of JANINO nor the names of its contributors |
||||
may be used to endorse or promote products derived from this |
||||
software without specific prior written permission. |
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE |
||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE |
||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR |
||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF |
||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS |
||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER |
||||
IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
||||
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN |
||||
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
@ -0,0 +1,89 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
||||
<parent> |
||||
<artifactId>dolphinscheduler</artifactId> |
||||
<groupId>org.apache.dolphinscheduler</groupId> |
||||
<version>2.0.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
|
||||
<artifactId>dolphinscheduler-log-server</artifactId> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.apache.dolphinscheduler</groupId> |
||||
<artifactId>dolphinscheduler-service</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.dolphinscheduler</groupId> |
||||
<artifactId>dolphinscheduler-server</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.apache.dolphinscheduler</groupId> |
||||
<artifactId>dolphinscheduler-spi</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.mockito</groupId> |
||||
<artifactId>mockito-core</artifactId> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
</dependencies> |
||||
|
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
<artifactId>maven-assembly-plugin</artifactId> |
||||
<executions> |
||||
<execution> |
||||
<id>dolphinscheduler-logger-server</id> |
||||
<phase>package</phase> |
||||
<goals> |
||||
<goal>single</goal> |
||||
</goals> |
||||
<configuration> |
||||
<finalName>logger-server</finalName> |
||||
<descriptors> |
||||
<descriptor>src/main/assembly/dolphinscheduler-log-server.xml</descriptor> |
||||
</descriptors> |
||||
<appendAssemblyId>false</appendAssemblyId> |
||||
</configuration> |
||||
</execution> |
||||
</executions> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
|
||||
<profiles> |
||||
<profile> |
||||
<id>docker</id> |
||||
<build> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>org.codehaus.mojo</groupId> |
||||
<artifactId>exec-maven-plugin</artifactId> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
</profile> |
||||
</profiles> |
||||
</project> |
@ -0,0 +1,56 @@
|
||||
<!-- |
||||
~ 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. |
||||
--> |
||||
|
||||
<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.1.0" |
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
||||
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd"> |
||||
<id>dolphinscheduler-logger-server</id> |
||||
<formats> |
||||
<format>dir</format> |
||||
</formats> |
||||
<includeBaseDirectory>false</includeBaseDirectory> |
||||
<baseDirectory>logger-server</baseDirectory> |
||||
<fileSets> |
||||
<fileSet> |
||||
<directory>${basedir}/src/main/bin</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../script/env</directory> |
||||
<outputDirectory>bin</outputDirectory> |
||||
<includes> |
||||
<include>dolphinscheduler_env.sh</include> |
||||
</includes> |
||||
<fileMode>0755</fileMode> |
||||
<directoryMode>0755</directoryMode> |
||||
</fileSet> |
||||
<fileSet> |
||||
<directory>${basedir}/../../dolphinscheduler-common/src/main/resources</directory> |
||||
<includes> |
||||
<include>**/*.properties</include> |
||||
</includes> |
||||
<outputDirectory>conf</outputDirectory> |
||||
</fileSet> |
||||
</fileSets> |
||||
<dependencySets> |
||||
<dependencySet> |
||||
<outputDirectory>libs</outputDirectory> |
||||
</dependencySet> |
||||
</dependencySets> |
||||
</assembly> |
@ -0,0 +1,32 @@
|
||||
#!/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 |
||||
|
||||
java $JAVA_OPTS \ |
||||
-cp "$DOLPHINSCHEDULER_HOME/conf":"$DOLPHINSCHEDULER_HOME/libs/*" \ |
||||
org.apache.dolphinscheduler.server.log.LoggerServer |
@ -0,0 +1,34 @@
|
||||
# |
||||
# 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. |
||||
# |
||||
|
||||
FROM openjdk:8-jre-slim-buster |
||||
|
||||
ENV DOCKER true |
||||
ENV TZ Asia/Shanghai |
||||
ENV DOLPHINSCHEDULER_HOME /opt/dolphinscheduler |
||||
|
||||
RUN apt update ; \ |
||||
apt install -y curl ; \ |
||||
rm -rf /var/lib/apt/lists/* |
||||
|
||||
WORKDIR $DOLPHINSCHEDULER_HOME |
||||
|
||||
ADD ./target/logger-server $DOLPHINSCHEDULER_HOME |
||||
|
||||
EXPOSE 50051 |
||||
|
||||
CMD [ "/bin/bash", "./bin/start.sh" ] |
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue