Fix install.sh for DS 2.0 and add comment to install_config.conf (#6506)
* Fix install.sh for DS 2.0
* Use #* make it work in macos
* Add comment for properties change
* Add JAVA HOME for only one file change to deploy
* Reduce config change by using default value of: plugin registry, alert, task as
* Change javaHome default value
* Delete config param zkQuorum
* Reorder param
* Add comment for install_config.conf
# The root of zookeeper, for now DolphinScheduler default registry server is zookeeper.
# Note: the deployment user needs to have sudo privileges and permissions to operate hdfs. If hdfs is enabled, the root directory needs to be created by itself
# Change configuration in conf/config/dolphinscheduler_env.sh
sed -i ${txt}"s@^export JAVA_HOME=.*@export JAVA_HOME=${javaHome}@g" conf/env/dolphinscheduler_env.sh
# Change configuration in conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.driver-class-name=.*@spring.datasource.driver-class-name=${datasourceDriverClassname}@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.driver-class-name=.*@spring.datasource.driver-class-name=${datasourceDriverClassname}@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.url=.*@spring.datasource.url=jdbc:${dbtype}://${dbhost}/${dbname}?characterEncoding=UTF-8\&allowMultiQueries=true@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.url=.*@spring.datasource.url=jdbc:${dbtype}://${dbhost}/${dbname}?characterEncoding=UTF-8\&allowMultiQueries=true@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.username=.*@spring.datasource.username=${username}@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.username=.*@spring.datasource.username=${username}@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.password=.*@spring.datasource.password=${password}@g" conf/datasource.properties
sed -i ${txt}"s@^spring.datasource.password=.*@spring.datasource.password=${password}@g" conf/datasource.properties
# Change configuration in conf/common.properties
sed -i ${txt}"s@^data.basedir.path=.*@data.basedir.path=${dataBasedirPath}@g" conf/common.properties
sed -i ${txt}"s@^data.basedir.path=.*@data.basedir.path=${dataBasedirPath}@g" conf/common.properties
sed -i ${txt}"s@^resource.storage.type=.*@resource.storage.type=${resourceStorageType}@g" conf/common.properties
sed -i ${txt}"s@^resource.storage.type=.*@resource.storage.type=${resourceStorageType}@g" conf/common.properties
sed -i ${txt}"s@^resource.upload.path=.*@resource.upload.path=${resourceUploadPath}@g" conf/common.properties
sed -i ${txt}"s@^resource.upload.path=.*@resource.upload.path=${resourceUploadPath}@g" conf/common.properties
@ -58,17 +64,22 @@ sed -i ${txt} "s@^yarn.application.status.address=.*@yarn.application.status.add
sed -i ${txt}"s@^yarn.job.history.status.address=.*@yarn.job.history.status.address=http://${singleYarnIp}:19888/ws/v1/history/mapreduce/jobs/%s@g" conf/common.properties
sed -i ${txt}"s@^yarn.job.history.status.address=.*@yarn.job.history.status.address=http://${singleYarnIp}:19888/ws/v1/history/mapreduce/jobs/%s@g" conf/common.properties
sed -i ${txt}"s@^sudo.enable=.*@sudo.enable=${sudoEnable}@g" conf/common.properties
sed -i ${txt}"s@^sudo.enable=.*@sudo.enable=${sudoEnable}@g" conf/common.properties
# the following configurations may be commented, so ddd #\? to ensure successful sed
# The following configurations may be commented, so ddd #* to ensure sed work correct
sed -i ${txt}"s@^#\?worker.tenant.auto.create=.*@worker.tenant.auto.create=${workerTenantAutoCreate}@g" conf/worker.properties
# Change configuration in conf/worker.properties
sed -i ${txt}"s@^#\?alert.listen.host=.*@alert.listen.host=${alertServer}@g" conf/worker.properties
sed -i ${txt}"s@^#*worker.tenant.auto.create=.*@worker.tenant.auto.create=${workerTenantAutoCreate}@g" conf/worker.properties
sed -i ${txt}"s@^#\?task.plugin.dir=.*@task.plugin.dir=${taskPluginDir}@g" conf/worker.properties
sed -i ${txt}"s@^#*alert.listen.host=.*@alert.listen.host=${alertServer}@g" conf/worker.properties
sed -i ${txt}"s@^#*task.plugin.dir=.*@task.plugin.dir=${installPath}/${taskPluginDir}@g" conf/worker.properties
# Change configuration in conf/alert.properties
sed -i ${txt}"s@^#*alert.plugin.dir=.*@alert.plugin.dir=${installPath}/${alertPluginDir}@g" conf/alert.properties
sed -i ${txt}"s@^#\?alert.plugin.dir=.*@alert.plugin.dir=${alertPluginDir}@g" conf/alert.properties
# Change configuration in conf/application-api.properties
sed -i ${txt}"s@^#\?server.port=.*@server.port=${apiServerPort}@g" conf/application-api.properties
sed -i ${txt}"s@^#*server.port=.*@server.port=${apiServerPort}@g" conf/application-api.properties
sed -i ${txt}"s@^#\?registry.plugin.dir=.*@registry.plugin.dir=${registryPluginDir}@g" conf/registry.properties
# Change configuration in conf/registry.properties
sed -i ${txt}"s@^#\?registry.plugin.name=.*@registry.plugin.name=${registryPluginName}@g" conf/registry.properties
sed -i ${txt}"s@^#*registry.plugin.dir=.*@registry.plugin.dir=${installPath}/${registryPluginDir}@g" conf/registry.properties
sed -i ${txt}"s@^#\?registry.servers=.*@registry.servers=${registryServers}@g" conf/registry.properties
sed -i ${txt}"s@^#*registry.plugin.name=.*@registry.plugin.name=${registryPluginName}@g" conf/registry.properties
sed -i ${txt}"s@^#*registry.servers=.*@registry.servers=${registryServers}@g" conf/registry.properties