From 1c07892fea86f14a5465231b285120c6de8e5f31 Mon Sep 17 00:00:00 2001 From: lgcareer <18610854716@163.com> Date: Thu, 17 Sep 2020 11:36:25 +0800 Subject: [PATCH] [Fix-3238][docker]Fix that can not create folder in docker with standalone mode (#3741) --- docker/build/conf/dolphinscheduler/common.properties.tpl | 4 ++-- docker/docker-swarm/docker-compose.yml | 8 ++++++++ sql/dolphinscheduler-postgre.sql | 4 ++-- sql/dolphinscheduler_mysql.sql | 2 +- sql/soft_version | 2 +- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/docker/build/conf/dolphinscheduler/common.properties.tpl b/docker/build/conf/dolphinscheduler/common.properties.tpl index f318ff8414..14ea58ba6e 100644 --- a/docker/build/conf/dolphinscheduler/common.properties.tpl +++ b/docker/build/conf/dolphinscheduler/common.properties.tpl @@ -25,7 +25,7 @@ dolphinscheduler.env.path=${DOLPHINSCHEDULER_ENV_PATH} data.basedir.path=${DOLPHINSCHEDULER_DATA_BASEDIR_PATH} # resource upload startup type : HDFS,S3,NONE -resource.storage.type=NONE +resource.storage.type=${DOLPHINSCHEDULER_RESOURCE_STORAGE_TYPE} #============================================================================ # HDFS @@ -58,7 +58,7 @@ kerberos.expire.time=7 # S3 #============================================================================ # if resource.storage.type=S3,the value like: s3a://dolphinscheduler ; if resource.storage.type=HDFS, When namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir -fs.defaultFS=hdfs://mycluster:8020 +fs.defaultFS=${DOLPHINSCHEDULER_FS_DEFAULTFS} # if resource.storage.type=S3,s3 endpoint #fs.s3a.endpoint=http://192.168.199.91:9010 diff --git a/docker/docker-swarm/docker-compose.yml b/docker/docker-swarm/docker-compose.yml index ee8be2570d..e6cf391f5a 100644 --- a/docker/docker-swarm/docker-compose.yml +++ b/docker/docker-swarm/docker-compose.yml @@ -28,6 +28,7 @@ services: POSTGRESQL_USERNAME: root POSTGRESQL_PASSWORD: root POSTGRESQL_DATABASE: dolphinscheduler + POSTGRESQL_REPLICATION_PASSWORD: dolphinscheduler@123 volumes: - dolphinscheduler-postgresql:/bitnami/postgresql - dolphinscheduler-postgresql-initdb:/docker-entrypoint-initdb.d @@ -62,6 +63,8 @@ services: POSTGRESQL_PASSWORD: root POSTGRESQL_DATABASE: dolphinscheduler ZOOKEEPER_QUORUM: dolphinscheduler-zookeeper:2181 + DOLPHINSCHEDULER_RESOURCE_STORAGE_TYPE: "HDFS" + DOLPHINSCHEDULER_FS_DEFAULTFS: "file:///data/dolphinscheduler" healthcheck: test: ["CMD", "/root/checkpoint.sh", "ApiApplicationServer"] interval: 30s @@ -73,6 +76,7 @@ services: - dolphinscheduler-zookeeper volumes: - dolphinscheduler-logs:/opt/dolphinscheduler/logs + - dolphinscheduler-resource-storage-local:/dolphinscheduler networks: - dolphinscheduler @@ -213,6 +217,9 @@ services: - type: volume source: dolphinscheduler-logs target: /opt/dolphinscheduler/logs + - type: volume + source: dolphinscheduler-resource-storage-local + target: /dolphinscheduler networks: - dolphinscheduler @@ -226,6 +233,7 @@ volumes: dolphinscheduler-zookeeper: dolphinscheduler-worker-data: dolphinscheduler-logs: + dolphinscheduler-resource-storage-local: configs: dolphinscheduler-worker-task-env: diff --git a/sql/dolphinscheduler-postgre.sql b/sql/dolphinscheduler-postgre.sql index df93c1b9c7..0e93a272d9 100644 --- a/sql/dolphinscheduler-postgre.sql +++ b/sql/dolphinscheduler-postgre.sql @@ -750,7 +750,7 @@ ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT NEXTVAL('t_ds_worker_ -- Records of t_ds_user?user : admin , password : dolphinscheduler123 -INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,state,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', '', '0', 1, '2018-03-27 15:48:50', '2018-10-24 17:40:22'); +INSERT INTO t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,create_time,update_time) VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', '', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22'); -- Records of t_ds_alertgroup,dolphinscheduler warning group INSERT INTO t_ds_alertgroup(group_name,group_type,description,create_time,update_time) VALUES ('dolphinscheduler warning group', '0', 'dolphinscheduler warning group','2018-11-29 10:20:39', '2018-11-29 10:20:39'); @@ -760,4 +760,4 @@ INSERT INTO t_ds_relation_user_alertgroup(alertgroup_id,user_id,create_time,upda INSERT INTO t_ds_queue(queue_name,queue,create_time,update_time) VALUES ('default', 'default','2018-11-29 10:22:33', '2018-11-29 10:22:33'); -- Records of t_ds_queue,default queue name : default -INSERT INTO t_ds_version(version) VALUES ('1.3.0'); \ No newline at end of file +INSERT INTO t_ds_version(version) VALUES ('1.3.3'); \ No newline at end of file diff --git a/sql/dolphinscheduler_mysql.sql b/sql/dolphinscheduler_mysql.sql index 657014b422..3661eefff9 100644 --- a/sql/dolphinscheduler_mysql.sql +++ b/sql/dolphinscheduler_mysql.sql @@ -798,7 +798,7 @@ CREATE TABLE `t_ds_version` ( -- ---------------------------- -- Records of t_ds_version -- ---------------------------- -INSERT INTO `t_ds_version` VALUES ('1', '1.3.0'); +INSERT INTO `t_ds_version` VALUES ('1', '1.3.3'); -- ---------------------------- diff --git a/sql/soft_version b/sql/soft_version index d5e98f723f..785cda807c 100644 --- a/sql/soft_version +++ b/sql/soft_version @@ -1 +1 @@ -1.3.2 \ No newline at end of file +1.3.3 \ No newline at end of file