You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/09/14 15:50:05 UTC

[GitHub] [dolphinscheduler] EricGao888 commented on a diff in pull request #11917: Remove sensitive configs from dolphinscheduler_env.sh

EricGao888 commented on code in PR #11917:
URL: https://github.com/apache/dolphinscheduler/pull/11917#discussion_r970999115


##########
docs/docs/en/guide/howto/datasource-setting.md:
##########
@@ -72,9 +72,10 @@ echo "host    dolphinscheduler   {user}    {ip}     md5" >> $PGDATA/pg_hba.conf
 pg_ctl reload
 ```
 
-Then, modify `./bin/env/dolphinscheduler_env.sh`, change {user} and {password} to what you set in the previous step.
+Then, set the database configurations by exporting the following environment variables, change {user} and {password} to what you set in the previous step.
 
 For MySQL:
+

Review Comment:
   Do we have some duplicates here from L75-L86 with L11-L18? BTW, we have `export SPRING_DATASOURCE_URL="jdbc:postgresql://127.0.0.1:5432/dolphinscheduler"` here but we don't have this in L75-L86



##########
docs/docs/en/architecture/configuration.md:
##########
@@ -339,28 +339,12 @@ The default configuration is as follows:
 ### dolphinscheduler_env.sh [load environment variables configs]
 
 When using shell to commit tasks, DolphinScheduler will export environment variables from `bin/env/dolphinscheduler_env.sh`. The
-mainly configuration including `JAVA_HOME`, mata database, registry center, and task configuration.
+mainly configuration including `JAVA_HOME` and other environment paths.
 
 ```bash
 # JAVA_HOME, will use it to start DolphinScheduler server
 export JAVA_HOME=${JAVA_HOME:-/opt/soft/java}
 
-# Database related configuration, set database type, username and password
-export DATABASE=${DATABASE:-postgresql}
-export SPRING_PROFILES_ACTIVE=${DATABASE}
-export SPRING_DATASOURCE_URL
-export SPRING_DATASOURCE_USERNAME
-export SPRING_DATASOURCE_PASSWORD
-
-# 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

Review Comment:
   Just for confirmation, users could configure those registry stuff in application.yaml instead of in `dolphinscheduler_env.sh` and that's why you remove those duplicated zk related configurations (L360-L362), correct?



##########
script/env/dolphinscheduler_env.sh:
##########
@@ -18,21 +18,8 @@
 # JAVA_HOME, will use it to start DolphinScheduler server
 export JAVA_HOME=${JAVA_HOME:-/opt/soft/java}
 
-# Database related configuration, set database type, username and password
-export DATABASE=${DATABASE:-postgresql}
-export SPRING_PROFILES_ACTIVE=${DATABASE}
-export SPRING_DATASOURCE_URL
-export SPRING_DATASOURCE_USERNAME
-export SPRING_DATASOURCE_PASSWORD
-
-# 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:-zookeeper}
-export REGISTRY_ZOOKEEPER_CONNECT_STRING=${REGISTRY_ZOOKEEPER_CONNECT_STRING:-localhost:2181}
+# Never put sensitive config such as database password here in your production environment,
+# this file will be sourced everytime a new task is 

Review Comment:
   ```suggestion
   # this file will be sourced everytime a new task is executed.
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org