First, fork the dolphinscheduler code from the remote repository to your local repository.
Install MySQL/PostgreSQL, JDK and MAVEN in your own software development environment.
Clone your forked repository to the local file system.
git clone https://github.com/apache/dolphinscheduler.git
git branch -a #check the branch
git checkout dev #switch to the dev branch
git pull #sychronize the branch with the remote branch
mvn -U clean package -Prelease -Dmaven.test.skip=true #because the project uses gRPC, you need to compile the project to generate the required classes
Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh
Refresh the environment variables
source ~/.bash_profile
Install node
nvm install v12.12.0
note:mac users could install npm through brew:brew install npm
Validate the node installation
node --version
Download zookeeper
http://apache.mirrors.hoobly.com/zookeeper/zookeeper-3.6.2/apache-zookeeper-3.6.2-bin.tar.gz
Copy the zookeeper config file
cp conf/zoo_sample.cfg conf/zoo.cfg
Modify zookepper config
vi conf/zoo.cfg
dataDir=./tmp/zookeeper
Start/stop zookeeper
./bin/zkServer.sh start
./bin/zkServer.sh stop
Create user, user name: ds_user, password: dolphinscheduler
mysql> CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'ds_user'@'%' IDENTIFIED BY 'dolphinscheduler';
mysql> GRANT ALL PRIVILEGES ON dolphinscheduler.* TO 'ds_user'@'localhost' IDENTIFIED BY 'dolphinscheduler';
mysql> flush privileges;
Enter the dolphinscheduler-ui directory
cd dolphinscheduler-ui
Run npm install
Import the project to IDEA
file-->open
Modify the database configuration in the datasource.properties file in the resource directory of the dao module
spring.datasource.driver-class-name=com.mysql.jdbc.Driver
spring.datasource.url=jdbc:mysql://localhost:3306/dolphinscheduler
spring.datasource.username=ds_user
spring.datasource.password=dolphinscheduler
Modify pom.xml in the root directory and modify the scope of mysql-connector-java to compile
Refresh the dao module, run the main method of org.apache.dolphinscheduler.dao.upgrade.shell.CreateDolphinScheduler to automatically insert the tables and data required by the project.
Modify the service module
try to change the zookeeper.quorum part of the zookeeper.properties file
zookeeper.quorum=localhost:2181
Modify the .env file of the dolphinscheduler-ui module
API_BASE = http://localhost:12345
DEV_HOST = localhost
Start zookeeper
./bin/zkServer.sh start
Start MasterServer
run the main method of org.apache.dolphinscheduler.server.master.MasterServer, you need to set the following VM options:
-Dlogging.config=classpath:logback-master.xml -Ddruid.mysql.usePingMethod=false
-Dlogging.config=classpath:logback-worker.xml -Ddruid.mysql.usePingMethod=false
-Dlogging.config=classpath:logback-api.xml -Dspring.profiles.active=api
if [ "$command" = "api-server" ]; then
LOG_FILE="-Dlogging.config=classpath:logback-api.xml -Dspring.profiles.active=api"
CLASS=org.apache.dolphinscheduler.api.ApiApplicationServer
elif [ "$command" = "master-server" ]; then
LOG_FILE="-Dlogging.config=classpath:logback-master.xml -Ddruid.mysql.usePingMethod=false"
CLASS=org.apache.dolphinscheduler.server.master.MasterServer
elif [ "$command" = "worker-server" ]; then
LOG_FILE="-Dlogging.config=classpath:logback-worker.xml -Ddruid.mysql.usePingMethod=false"
CLASS=org.apache.dolphinscheduler.server.worker.WorkerServer
elif [ "$command" = "alert-server" ]; then
LOG_FILE="-Dlogback.configurationFile=conf/logback-alert.xml"
CLASS=org.apache.dolphinscheduler.alert.AlertServer
elif [ "$command" = "logger-server" ]; then
CLASS=org.apache.dolphinscheduler.server.log.LoggerServer
else
echo "Error: No command named \`$command' was found."
exit 1
fi
Sign in with the administrator account
username: admin
password: dolphinscheduler123