-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9437d27
commit 6c52601
Showing
47 changed files
with
1,110 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
.github/workflows/cluster-test/mysql_with_mysql_registry/deploy.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
#!/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 -euox pipefail | ||
|
||
|
||
USER=root | ||
|
||
#Create database | ||
mysql -hmysql -P3306 -uroot -p123456 -e "CREATE DATABASE IF NOT EXISTS dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;" | ||
|
||
#Sudo | ||
sed -i '$a'$USER' ALL=(ALL) NOPASSWD: NOPASSWD: ALL' /etc/sudoers | ||
sed -i 's/Defaults requirett/#Defaults requirett/g' /etc/sudoers | ||
|
||
#SSH | ||
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa | ||
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys | ||
chmod 600 ~/.ssh/authorized_keys | ||
service ssh start | ||
|
||
#Init schema | ||
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/upgrade-schema.sh | ||
/bin/bash $DOLPHINSCHEDULER_HOME/tools/bin/initialize-jdbc-registry.sh | ||
|
||
#Start Cluster | ||
/bin/bash $DOLPHINSCHEDULER_HOME/bin/start-all.sh | ||
|
||
#Keep running | ||
tail -f /dev/null |
34 changes: 34 additions & 0 deletions
34
.github/workflows/cluster-test/mysql_with_mysql_registry/docker-compose-base.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
# | ||
|
||
version: "3" | ||
|
||
services: | ||
mysql: | ||
container_name: mysql | ||
image: mysql:5.7.36 | ||
command: --default-authentication-plugin=mysql_native_password | ||
restart: always | ||
environment: | ||
MYSQL_ROOT_PASSWORD: 123456 | ||
ports: | ||
- "3306:3306" | ||
healthcheck: | ||
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD | ||
interval: 5s | ||
timeout: 60s | ||
retries: 120 |
File renamed without changes.
58 changes: 58 additions & 0 deletions
58
.github/workflows/cluster-test/mysql_with_mysql_registry/dolphinscheduler_env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
# JAVA_HOME, will use it to start DolphinScheduler server | ||
export JAVA_HOME=${JAVA_HOME:-/opt/java/openjdk} | ||
|
||
# Database related configuration, set database type, username and password | ||
export DATABASE=${DATABASE:-mysql} | ||
export SPRING_PROFILES_ACTIVE=${DATABASE} | ||
export SPRING_DATASOURCE_URL="jdbc:mysql://mysql:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8&useSSL=false" | ||
export SPRING_DATASOURCE_USERNAME=root | ||
export SPRING_DATASOURCE_PASSWORD=123456 | ||
|
||
# DolphinScheduler server related configuration | ||
export SPRING_CACHE_TYPE=${SPRING_CACHE_TYPE:-none} | ||
export SPRING_JACKSON_TIME_ZONE=${SPRING_JACKSON_TIME_ZONE:-UTC} | ||
export MASTER_FETCH_COMMAND_NUM=${MASTER_FETCH_COMMAND_NUM:-10} | ||
|
||
# Registry center configuration, determines the type and link of the registry center | ||
export REGISTRY_TYPE=${REGISTRY_TYPE:-jdbc} | ||
export REGISTRY_HIKARI_CONFIG_JDBC_URL="jdbc:mysql://mysql:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8&useSSL=false" | ||
export REGISTRY_HIKARI_CONFIG_USERNAME=root | ||
export REGISTRY_HIKARI_CONFIG_PASSWORD=123456 | ||
|
||
# Tasks related configurations, need to change the configuration if you use the related tasks. | ||
export HADOOP_HOME=${HADOOP_HOME:-/opt/soft/hadoop} | ||
export HADOOP_CONF_DIR=${HADOOP_CONF_DIR:-/opt/soft/hadoop/etc/hadoop} | ||
export SPARK_HOME=${SPARK_HOME:-/opt/soft/spark} | ||
export PYTHON_LAUNCHER=${PYTHON_LAUNCHER:-/opt/soft/python/bin/python3} | ||
export HIVE_HOME=${HIVE_HOME:-/opt/soft/hive} | ||
export FLINK_HOME=${FLINK_HOME:-/opt/soft/flink} | ||
export DATAX_LAUNCHER=${DATAX_LAUNCHER:-/opt/soft/datax/bin/datax.py} | ||
|
||
export PATH=$HADOOP_HOME/bin:$SPARK_HOME/bin:$PYTHON_LAUNCHER:$JAVA_HOME/bin:$HIVE_HOME/bin:$FLINK_HOME/bin:$DATAX_LAUNCHER:$PATH | ||
|
||
export MASTER_RESERVED_MEMORY=0.01 | ||
export WORKER_RESERVED_MEMORY=0.01 | ||
|
||
# applicationId auto collection related configuration, the following configurations are unnecessary if setting appId.collect=log | ||
#export HADOOP_CLASSPATH=`hadoop classpath`:${DOLPHINSCHEDULER_HOME}/tools/libs/* | ||
#export SPARK_DIST_CLASSPATH=$HADOOP_CLASSPATH:$SPARK_DIST_CLASS_PATH | ||
#export HADOOP_CLIENT_OPTS="-javaagent:${DOLPHINSCHEDULER_HOME}/tools/libs/aspectjweaver-1.9.7.jar":$HADOOP_CLIENT_OPTS | ||
#export SPARK_SUBMIT_OPTS="-javaagent:${DOLPHINSCHEDULER_HOME}/tools/libs/aspectjweaver-1.9.7.jar":$SPARK_SUBMIT_OPTS | ||
#export FLINK_ENV_JAVA_OPTS="-javaagent:${DOLPHINSCHEDULER_HOME}/tools/libs/aspectjweaver-1.9.7.jar":$FLINK_ENV_JAVA_OPTS |
58 changes: 58 additions & 0 deletions
58
.github/workflows/cluster-test/mysql_with_mysql_registry/install_env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
# --------------------------------------------------------- | ||
# INSTALL MACHINE | ||
# --------------------------------------------------------- | ||
# A comma separated list of machine hostname or IP would be installed DolphinScheduler, | ||
# including master, worker, api, alert. If you want to deploy in pseudo-distributed | ||
# mode, just write a pseudo-distributed hostname | ||
# Example for hostnames: ips="ds1,ds2,ds3,ds4,ds5", Example for IPs: ips="192.168.8.1,192.168.8.2,192.168.8.3,192.168.8.4,192.168.8.5" | ||
ips=${ips:-"localhost"} | ||
|
||
# Port of SSH protocol, default value is 22. For now we only support same port in all `ips` machine | ||
# modify it if you use different ssh port | ||
sshPort=${sshPort:-"22"} | ||
|
||
# A comma separated list of machine hostname or IP would be installed Master server, it | ||
# must be a subset of configuration `ips`. | ||
# Example for hostnames: masters="ds1,ds2", Example for IPs: masters="192.168.8.1,192.168.8.2" | ||
masters=${masters:-"localhost"} | ||
|
||
# A comma separated list of machine <hostname>:<workerGroup> or <IP>:<workerGroup>.All hostname or IP must be a | ||
# subset of configuration `ips`, And workerGroup have default value as `default`, but we recommend you declare behind the hosts | ||
# Example for hostnames: workers="ds1:default,ds2:default,ds3:default", Example for IPs: workers="192.168.8.1:default,192.168.8.2:default,192.168.8.3:default" | ||
workers=${workers:-"localhost:default"} | ||
|
||
# A comma separated list of machine hostname or IP would be installed Alert server, it | ||
# must be a subset of configuration `ips`. | ||
# Example for hostname: alertServer="ds3", Example for IP: alertServer="192.168.8.3" | ||
alertServer=${alertServer:-"localhost"} | ||
|
||
# A comma separated list of machine hostname or IP would be installed API server, it | ||
# must be a subset of configuration `ips`. | ||
# Example for hostname: apiServers="ds1", Example for IP: apiServers="192.168.8.1" | ||
apiServers=${apiServers:-"localhost"} | ||
|
||
# The directory to install DolphinScheduler for all machine we config above. It will automatically be created by `install.sh` script if not exists. | ||
# Do not set this configuration same as the current path (pwd) | ||
installPath=${installPath:-"/root/apache-dolphinscheduler-*-SNAPSHOT-bin"} | ||
|
||
# The user to deploy DolphinScheduler for all machine we config above. For now user must create by yourself before running `install.sh` | ||
# script. The user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled than the root directory needs | ||
# to be created by this user | ||
deployUser=${deployUser:-"dolphinscheduler"} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
.github/workflows/cluster-test/mysql_with_zookeeper_registry/Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# | ||
# 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 eclipse-temurin:8-jre | ||
|
||
RUN apt update ; \ | ||
apt install -y wget default-mysql-client sudo openssh-server netcat-traditional ; | ||
|
||
COPY ./apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz /root | ||
RUN tar -zxvf /root/apache-dolphinscheduler-*-SNAPSHOT-bin.tar.gz -C ~ | ||
|
||
RUN mv /root/apache-dolphinscheduler-*-SNAPSHOT-bin /root/apache-dolphinscheduler-test-SNAPSHOT-bin | ||
|
||
ENV DOLPHINSCHEDULER_HOME /root/apache-dolphinscheduler-test-SNAPSHOT-bin | ||
|
||
#Setting install.sh | ||
COPY .github/workflows/cluster-test/mysql_with_zookeeper_registry/install_env.sh $DOLPHINSCHEDULER_HOME/bin/env/install_env.sh | ||
|
||
#Setting dolphinscheduler_env.sh | ||
COPY .github/workflows/cluster-test/mysql_with_zookeeper_registry/dolphinscheduler_env.sh $DOLPHINSCHEDULER_HOME/bin/env/dolphinscheduler_env.sh | ||
|
||
#Download mysql jar | ||
ENV MYSQL_URL "https://repo.maven.apache.org/maven2/mysql/mysql-connector-java/8.0.16/mysql-connector-java-8.0.16.jar" | ||
ENV MYSQL_DRIVER "mysql-connector-java-8.0.16.jar" | ||
RUN wget -O $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $MYSQL_URL ; \ | ||
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/api-server/libs/$MYSQL_DRIVER ; \ | ||
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/master-server/libs/$MYSQL_DRIVER ; \ | ||
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/worker-server/libs/$MYSQL_DRIVER ; \ | ||
cp $DOLPHINSCHEDULER_HOME/alert-server/libs/$MYSQL_DRIVER $DOLPHINSCHEDULER_HOME/tools/libs/$MYSQL_DRIVER | ||
|
||
#Deploy | ||
COPY .github/workflows/cluster-test/mysql_with_zookeeper_registry/deploy.sh /root/deploy.sh | ||
|
||
CMD [ "/bin/bash", "/root/deploy.sh" ] |
File renamed without changes.
File renamed without changes.
29 changes: 29 additions & 0 deletions
29
.github/workflows/cluster-test/mysql_with_zookeeper_registry/docker-compose-cluster.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# | ||
# 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" | ||
|
||
services: | ||
ds: | ||
container_name: ds | ||
image: jdk8:ds_mysql_cluster | ||
restart: always | ||
ports: | ||
- "12345:12345" | ||
- "5679:5679" | ||
- "1235:1235" | ||
- "50053:50053" |
File renamed without changes.
File renamed without changes.
Oops, something went wrong.