[Feature] Support Ambari deployment of dolphinscheduler 2.0.6 (#3)
diff --git a/ambari_plugin-1.3.6/README.md b/ambari_plugin-1.3.6/README.md
new file mode 100644
index 0000000..2a91974
--- /dev/null
+++ b/ambari_plugin-1.3.6/README.md
@@ -0,0 +1,132 @@
+### Instructions for using the Dolphin Scheduler's Ambari plug-in
+
+#### Note
+
+1. This document is intended for users with a basic understanding of Ambari
+2. This document is a description of adding the Dolphin Scheduler service to the installed Ambari service
+3. This document is based on version 2.5.2 of Ambari
+
+#### Installation preparation
+
+1. Prepare the RPM packages
+
+ - It is generated by executing the command ```mvn -U clean install -Prpmbuild -Dmaven.test.skip=true -X``` in the project root directory (In the directory: dolphinscheduler-dist/target/rpm/apache-dolphinscheduler/RPMS/noarch )
+
+2. Create an installation for DS,who have read and write access to the installation directory (/opt/soft)
+
+3. Install with rpm package
+
+ - Manual installation (recommended):
+ - Copy the prepared RPM packages to each node of the cluster.
+ - Execute with DS installation user: ```rpm -ivh apache-dolphinscheduler-xxx.noarch.rpm```
+ - Mysql-connector-java packaged using the default POM file will not be included.
+ - The RPM package was packaged in the project with the installation path of /opt/soft.
+ If you use mysql as the database, you need add it manually.
+
+ - Automatic installation with ambari
+ - Each node of the cluster needs to configure the local yum source
+ - Copy the prepared RPM packages to each node local yum source
+
+4. Copy plug-in directory
+
+ - copy directory ambari_plugin/common-services/DOLPHIN to ambari-server/resources/common-services/
+ - copy directory ambari_plugin/statcks/DOLPHIN to ambari-server/resources/stacks/HDP/2.6/services/--stack version is selected based on the actual situation
+
+5. Initializes the database information
+
+ ```
+ -- Create the database for the Dolphin Scheduler:dolphinscheduler
+ CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE
+ utf8_general_ci;
+
+ -- Initialize the user and password for the dolphinscheduler database and assign permissions
+ -- Replace the {user} in the SQL statement below with the user of the dolphinscheduler database
+ GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
+ GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'localhost' IDENTIFIED BY
+ '{password}';
+ flush privileges;
+ ```
+
+
+
+#### Ambari Install Dolphin Scheduler
+- **NOTE: You have to install zookeeper first**
+
+1. Install Dolphin Scheduler on ambari web interface
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_001.png)
+
+2. Select the nodes for the Dolphin Scheduler's Master installation
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_002.png)
+
+3. Configure the Dolphin Scheduler's nodes for Worker, Api, Logger, Alert installation
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_003.png)
+
+4. Set the installation users of the Dolphin Scheduler service (created in step 1) and the user groups they belong to
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_004.png)
+
+5. System Env Optimization will export some system environment config. Modify according to actual situation
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_020.png)
+
+6. Configure the database information (same as in the initialization database in step 1)
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_005.png)
+
+7. Configure additional information if needed
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_006.png)
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_007.png)
+
+8. Perform the next steps as normal
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_008.png)
+
+9. The interface after successful installation
+
+ ![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_009.png)
+
+
+
+------
+
+
+
+#### Add components to the node through Ambari -- for example, add a DS Worker
+
+***NOTE***: DS Logger is the installation dependent component of DS Worker in Dolphin's Ambari installation (need to add installation first; Prevent the Job log on the corresponding Worker from being checked)
+
+1. Locate the component node to add -- for example, node ark3
+
+ ![DS2_AMBARI_011](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_011.png)
+
+2. Add components -- the drop-down list is all addable
+
+ ![DS2_AMBARI_012](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_012.png)
+
+3. Confirm component addition
+
+ ![DS2_AMBARI_013](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_013.png)
+
+4. After adding DS Worker and DS Logger components
+
+ ![DS2_AMBARI_015](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_015.png)
+
+5. Start the component
+
+ ![DS2_AMBARI_016](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_016.png)
+
+
+#### Remove the component from the node with Ambari
+
+1. Stop the component in the corresponding node
+
+ ![DS2_AMBARI_018](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_018.png)
+
+2. Remove components
+
+ ![DS2_AMBARI_019](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_019.png)
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/alerts.json b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/alerts.json
new file mode 100644
index 0000000..c0c3678
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/alerts.json
@@ -0,0 +1,158 @@
+{
+ "DOLPHIN": {
+ "service": [],
+ "DOLPHIN_API": [
+ {
+ "name": "dolphin_api_port_check",
+ "label": "dolphin_api_port_check",
+ "description": "dolphin_api_port_check.",
+ "interval": 10,
+ "scope": "ANY",
+ "source": {
+ "type": "PORT",
+ "uri": "{{dolphin-application-api/server.port}}",
+ "default_port": 12345,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ }
+ ],
+ "DOLPHIN_LOGGER": [
+ {
+ "name": "dolphin_logger_port_check",
+ "label": "dolphin_logger_port_check",
+ "description": "dolphin_logger_port_check.",
+ "interval": 10,
+ "scope": "ANY",
+ "source": {
+ "type": "PORT",
+ "uri": "{{dolphin-common/loggerserver.rpc.port}}",
+ "default_port": 50051,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ }
+ ],
+ "DOLPHIN_MASTER": [
+ {
+ "name": "DOLPHIN_MASTER_CHECK",
+ "label": "check dolphin scheduler master status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_MASTER",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ],
+ "DOLPHIN_WORKER": [
+ {
+ "name": "DOLPHIN_WORKER_CHECK",
+ "label": "check dolphin scheduler worker status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_WORKER",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ],
+ "DOLPHIN_ALERT": [
+ {
+ "name": "DOLPHIN_DOLPHIN_ALERT_CHECK",
+ "label": "check dolphin scheduler alert status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_ALERT",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-alert.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-alert.xml
new file mode 100644
index 0000000..32abcc7
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-alert.xml
@@ -0,0 +1,137 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>alert.type</name>
+ <value>EMAIL</value>
+ <description>alert type is EMAIL/SMS</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.protocol</name>
+ <value>SMTP</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.server.host</name>
+ <value>xxx.xxx.com</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.server.port</name>
+ <value>25</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.sender</name>
+ <value>admin</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.user</name>
+ <value>admin</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.passwd</name>
+ <value>000000</value>
+ <description></description>
+ <property-type>PASSWORD</property-type>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>mail.smtp.starttls.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.smtp.ssl.enable</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>mail.smtp.ssl.trust</name>
+ <value>xxx.xxx.com</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>enterprise.wechat.enable</name>
+ <value>false</value>
+ <description></description>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>true</value>
+ <label>Enabled</label>
+ </entry>
+ <entry>
+ <value>false</value>
+ <label>Disabled</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>enterprise.wechat.corp.id</name>
+ <value>wechatId</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>enterprise.wechat.secret</name>
+ <value>secret</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>enterprise.wechat.agent.id</name>
+ <value>agentId</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>enterprise.wechat.users</name>
+ <value>wechatUsers</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-application-api.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-application-api.xml
new file mode 100644
index 0000000..766c0f4
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-application-api.xml
@@ -0,0 +1,87 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>server.port</name>
+ <value>12345</value>
+ <description>
+ server port
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ </property>
+ <property>
+ <name>server.servlet.session.timeout</name>
+ <value>7200</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>server.servlet.context-path</name>
+ <value>/dolphinscheduler/</value>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.servlet.multipart.max-file-size</name>
+ <value>1024</value>
+ <value-attributes>
+ <unit>MB</unit>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.servlet.multipart.max-request-size</name>
+ <value>1024</value>
+ <value-attributes>
+ <unit>MB</unit>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>server.jetty.max-http-post-size</name>
+ <value>5000000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.messages.encoding</name>
+ <value>UTF-8</value>
+ <description></description>
+ </property>
+ <property>
+ <name>spring.messages.basename</name>
+ <value>i18n/messages</value>
+ <description></description>
+ </property>
+ <property>
+ <name>security.authentication.type</name>
+ <value>PASSWORD</value>
+ <description></description>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-common.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-common.xml
new file mode 100644
index 0000000..ba2d5dd
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-common.xml
@@ -0,0 +1,240 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>data.basedir.path</name>
+ <value>/tmp/dolphinscheduler</value>
+ <description>
+ user data local directory path, please make sure the directory exists and have read write permissions
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>resource.storage.type</name>
+ <display-name>Choose Resource Upload Startup Type</display-name>
+ <description>
+ resource storage type: HDFS, S3, NONE
+ </description>
+ <value>NONE</value>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>HDFS</value>
+ <label>HDFS</label>
+ </entry>
+ <entry>
+ <value>S3</value>
+ <label>S3</label>
+ </entry>
+ <entry>
+ <value>NONE</value>
+ <label>NONE</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>resource.upload.path</name>
+ <value>/dolphinscheduler</value>
+ <description>
+ resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>hadoop.security.authentication.startup.state</name>
+ <value>false</value>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>true</value>
+ <label>Enabled</label>
+ </entry>
+ <entry>
+ <value>false</value>
+ <label>Disabled</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <description>
+ whether to startup kerberos
+ </description>
+ </property>
+ <property>
+ <name>java.security.krb5.conf.path</name>
+ <value>/opt/krb5.conf</value>
+ <description>
+ java.security.krb5.conf path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>login.user.keytab.username</name>
+ <value>hdfs-mycluster@ESZ.COM</value>
+ <description>
+ login user from keytab username
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>login.user.keytab.path</name>
+ <value>/opt/hdfs.headless.keytab</value>
+ <description>
+ login user from keytab path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kerberos.expire.time</name>
+ <value>2</value>
+ <description>
+ kerberos expire time, the unit is hour
+ </description>
+ </property>
+ <property>
+ <name>resource.view.suffixs</name>
+ <value>txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js</value>
+ <description>
+ resource view suffixs
+ </description>
+ </property>
+ <property>
+ <name>hdfs.root.user</name>
+ <value>hdfs</value>
+ <description>
+ if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.defaultFS</name>
+ <value>hdfs://mycluster:8020</value>
+ <description>
+ if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.endpoint</name>
+ <value>http://host:9010</value>
+ <description>
+ s3 required,s3 endpoint
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.access.key</name>
+ <value>A3DXS30FO22544RE</value>
+ <description>
+ s3 required,s3 access key
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.secret.key</name>
+ <value>OloCLq3n+8+sdPHUhJ21XrSxTC+JK</value>
+ <description>
+ s3 required,s3 secret key
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>resource.manager.httpaddress.port</name>
+ <value>8088</value>
+ <description>
+ resourcemanager port, the default value is 8088 if not specified </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>yarn.resourcemanager.ha.rm.ids</name>
+ <value>192.168.xx.xx,192.168.xx.xx</value>
+ <description>
+ if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>yarn.application.status.address</name>
+ <value>http://ds1:8088/ws/v1/cluster/apps/%s</value>
+ <description>
+ if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>yarn.job.history.status.address</name>
+ <value>http://ds1:19888/ws/v1/history/mapreduce/jobs/%s</value>
+ <description>
+ job history status url when application number threshold is reached(default 10000, maybe it was set to 1000)
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>datasource.encryption.enable</name>
+ <value>false</value>
+ <description>
+ datasource encryption enable
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>datasource.encryption.salt</name>
+ <value>!@#$%^&*</value>
+ <description>
+ datasource encryption salt
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>support.hive.oneSession</name>
+ <value>false</value>
+ <description>
+ Whether hive SQL is executed in the same session
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>sudo.enable</name>
+ <value>true</value>
+ <description>
+ use sudo or not, if set true, executing user is tenant user and deploy user needs sudo permissions; if set false, executing user is the deploy user and doesn't need sudo permissions
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>development.state</name>
+ <value>false</value>
+ <description>
+ development state
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dolphinscheduler.env.path</name>
+ <value>lib/plugin/datasource</value>
+ <description>
+ system env path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-datasource.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-datasource.xml
new file mode 100644
index 0000000..02d8de0
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-datasource.xml
@@ -0,0 +1,206 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>spring.datasource.initialSize</name>
+ <value>5</value>
+ <description>
+ Init connection number
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.minIdle</name>
+ <value>5</value>
+ <description>
+ Min connection number
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.maxActive</name>
+ <value>50</value>
+ <description>
+ Max connection number
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.maxWait</name>
+ <value>60000</value>
+ <description>
+ Max wait time for get a connection in milliseconds.
+ If configuring maxWait, fair locks are enabled by default and concurrency efficiency decreases.
+ If necessary, unfair locks can be used by configuring the useUnfairLock attribute to true.
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.timeBetweenEvictionRunsMillis</name>
+ <value>60000</value>
+ <description>
+ Milliseconds for check to close free connections
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.timeBetweenConnectErrorMillis</name>
+ <value>60000</value>
+ <description>
+ The Destroy thread detects the connection interval and closes the physical connection in milliseconds
+ if the connection idle time is greater than or equal to minEvictableIdleTimeMillis.
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.minEvictableIdleTimeMillis</name>
+ <value>300000</value>
+ <description>
+ The longest time a connection remains idle without being evicted, in milliseconds
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.validationQuery</name>
+ <value>SELECT 1</value>
+ <description>
+ The SQL used to check whether the connection is valid requires a query statement.
+ If validation Query is null, testOnBorrow, testOnReturn, and testWhileIdle will not work.
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.validationQueryTimeout</name>
+ <value>3</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ Check whether the connection is valid for timeout, in seconds
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.testWhileIdle</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ When applying for a connection,
+ if it is detected that the connection is idle longer than time Between Eviction Runs Millis,
+ validation Query is performed to check whether the connection is valid
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.testOnBorrow</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Execute validation to check if the connection is valid when applying for a connection
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.testOnReturn</name>
+ <value>false</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Execute validation to check if the connection is valid when the connection is returned
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.defaultAutoCommit</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.keepAlive</name>
+ <value>false</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>spring.datasource.poolPreparedStatements</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description>
+ Open PSCache, specify count PSCache for every connection
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.maxPoolPreparedStatementPerConnectionSize</name>
+ <value>20</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.spring.datasource.filters</name>
+ <value>stat,wall,log4j</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>spring.datasource.connectionProperties</name>
+ <value>druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000</value>
+ <description></description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-env.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-env.xml
new file mode 100644
index 0000000..18501c6
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-env.xml
@@ -0,0 +1,124 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>dolphin.database.type</name>
+ <value>mysql</value>
+ <description>Dolphin Scheduler DataBase Type Which Is Select</description>
+ <display-name>Dolphin Database Type</display-name>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>mysql</value>
+ <label>Mysql</label>
+ </entry>
+ <entry>
+ <value>postgresql</value>
+ <label>Postgresql</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.host</name>
+ <value></value>
+ <display-name>Dolphin Database Host</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.port</name>
+ <value></value>
+ <display-name>Dolphin Database Port</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.username</name>
+ <value></value>
+ <display-name>Dolphin Database Username</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.password</name>
+ <value></value>
+ <display-name>Dolphin Database Password</display-name>
+ <property-type>PASSWORD</property-type>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.user</name>
+ <value></value>
+ <description>Which user to install and admin dolphin scheduler</description>
+ <display-name>Deploy User</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dolphin.group</name>
+ <value></value>
+ <description>Which user to install and admin dolphin scheduler</description>
+ <display-name>Deploy Group</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphinscheduler-env-content</name>
+ <display-name>Dolphinscheduler Env template</display-name>
+ <description>This is the jinja template for dolphinscheduler.env.sh file</description>
+ <value>#
+# 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.
+#
+
+export HADOOP_HOME=/opt/soft/hadoop
+export HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop
+export SPARK_HOME1=/opt/soft/spark1
+export SPARK_HOME2=/opt/soft/spark2
+export PYTHON_HOME=/opt/soft/python
+export JAVA_HOME=/opt/soft/java
+export HIVE_HOME=/opt/soft/hive
+export FLINK_HOME=/opt/soft/flink
+export DATAX_HOME=/opt/soft/datax</value>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>false</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-master.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-master.xml
new file mode 100644
index 0000000..e7b2df2
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-master.xml
@@ -0,0 +1,102 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>master.listen.port</name>
+ <value>5678</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master listen port</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.exec.threads</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master execute thread number to limit process instances</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.exec.task.num</name>
+ <value>20</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master execute task number in parallel per process instance</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.dispatch.task.num</name>
+ <value>3</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master dispatch task number per batch</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.host.selector</name>
+ <value>LowerWeight</value>
+ <description>master host selector to select a suitable worker, default value: LowerWeight. Optional values include Random, RoundRobin, LowerWeight</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.heartbeat.interval</name>
+ <value>10</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master heartbeat interval, the unit is second</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.task.commit.retryTimes</name>
+ <value>5</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master commit task retry times</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.task.commit.interval</name>
+ <value>1000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master commit task interval, the unit is millisecond</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.max.cpuload.avg</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master max cpuload avg, only higher than the system cpu load average, master server can schedule. default value -1: the number of cpu cores * 2</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.reserved.memory</name>
+ <value>0.3</value>
+ <description>master reserved memory, only lower than system available memory, master server can schedule. default value 0.3, the unit is G</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-worker.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-worker.xml
new file mode 100644
index 0000000..cd16f83
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-worker.xml
@@ -0,0 +1,66 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>worker.listen.port</name>
+ <value>1234</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker listen port</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.exec.threads</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker execute thread number to limit task instances</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.heartbeat.interval</name>
+ <value>10</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker heartbeat interval, the unit is second</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.max.cpuload.avg</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker max cpuload avg, only higher than the system cpu load average, worker server can be dispatched tasks. default value -1: the number of cpu cores * 2</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.reserved.memory</name>
+ <value>0.3</value>
+ <description>worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is G</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.groups</name>
+ <value>default</value>
+ <description>default worker groups separated by comma, like 'worker.groups=default,test'</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-zookeeper.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-zookeeper.xml
new file mode 100644
index 0000000..e89962d
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/configuration/dolphin-zookeeper.xml
@@ -0,0 +1,76 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>zookeeper.dolphinscheduler.root</name>
+ <value>/dolphinscheduler</value>
+ <description>
+ dolphinscheduler root directory
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>zookeeper.session.timeout</name>
+ <value>300</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>zookeeper.connection.timeout</name>
+ <value>300</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>zookeeper.retry.base.sleep</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>zookeeper.retry.max.sleep</name>
+ <value>30000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>zookeeper.retry.maxtime</name>
+ <value>5</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/metainfo.xml b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/metainfo.xml
new file mode 100644
index 0000000..55bff02
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/metainfo.xml
@@ -0,0 +1,135 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>DOLPHIN</name>
+ <displayName>Dolphin Scheduler</displayName>
+ <comment>分布式易扩展的可视化DAG工作流任务调度系统</comment>
+ <version>1.3.6</version>
+ <components>
+ <component>
+ <name>DOLPHIN_MASTER</name>
+ <displayName>DS Master</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_master_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_LOGGER</name>
+ <displayName>DS Logger</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_logger_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_WORKER</name>
+ <displayName>DS Worker</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <dependencies>
+ <dependency>
+ <name>DOLPHIN/DOLPHIN_LOGGER</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ </dependencies>
+ <commandScript>
+ <script>scripts/dolphin_worker_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_ALERT</name>
+ <displayName>DS Alert</displayName>
+ <category>SLAVE</category>
+ <cardinality>1</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_alert_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_API</name>
+ <displayName>DS_Api</displayName>
+ <category>SLAVE</category>
+ <cardinality>1</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_api_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+ </components>
+
+ <requiredServices>
+ <service>ZOOKEEPER</service>
+ </requiredServices>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>any</osFamily>
+ <packages>
+ <package>
+ <name>apache-dolphinscheduler*</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <configuration-dependencies>
+ <config-type>dolphin-alert</config-type>
+ <config-type>dolphin-app-api</config-type>
+ <config-type>dolphin-app-dao</config-type>
+ <config-type>dolphin-common</config-type>
+ <config-type>dolphin-env</config-type>
+ <config-type>dolphin-quartz</config-type>
+ </configuration-dependencies>
+
+ <themes>
+ <theme>
+ <fileName>theme.json</fileName>
+ <default>true</default>
+ </theme>
+ </themes>
+
+ <quickLinksConfigurations-dir>quicklinks</quickLinksConfigurations-dir>
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py
new file mode 100644
index 0000000..87cc7b4
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/alerts/alert_dolphin_scheduler_status.py
@@ -0,0 +1,124 @@
+"""
+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.
+"""
+
+import socket
+import urllib2
+import os
+import logging
+import ambari_simplejson as json
+from resource_management.libraries.script.script import Script
+import sys
+reload(sys)
+sys.setdefaultencoding('utf-8')
+
+logger = logging.getLogger('ambari_alerts')
+
+config = Script.get_config()
+
+
+def get_tokens():
+ """
+ Returns a tuple of tokens in the format {{site/property}} that will be used
+ to build the dictionary passed into execute
+
+ :rtype tuple
+ """
+
+def get_info(url, connection_timeout):
+ response = None
+
+ try:
+ response = urllib2.urlopen(url, timeout=connection_timeout)
+ json_data = response.read()
+ return json_data
+ finally:
+ if response is not None:
+ try:
+ response.close()
+ except:
+ pass
+
+
+def execute(configurations={}, parameters={}, host_name=None):
+ """
+ Returns a tuple containing the result code and a pre-formatted result label
+
+ Keyword arguments:
+ configurations : a mapping of configuration key to value
+ parameters : a mapping of script parameter key to value
+ host_name : the name of this host where the alert is running
+
+ :type configurations dict
+ :type parameters dict
+ :type host_name str
+ """
+
+ alert_name = parameters['alertName']
+
+ dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
+
+ pid = "0"
+
+
+ from resource_management.core import sudo
+
+ is_running = True
+ pid_file_path = ""
+ if alert_name == 'DOLPHIN_MASTER':
+ pid_file_path = dolphin_pidfile_dir + "/master-server.pid"
+ elif alert_name == 'DOLPHIN_WORKER':
+ pid_file_path = dolphin_pidfile_dir + "/worker-server.pid"
+ elif alert_name == 'DOLPHIN_ALERT':
+ pid_file_path = dolphin_pidfile_dir + "/alert-server.pid"
+ elif alert_name == 'DOLPHIN_LOGGER':
+ pid_file_path = dolphin_pidfile_dir + "/logger-server.pid"
+ elif alert_name == 'DOLPHIN_API':
+ pid_file_path = dolphin_pidfile_dir + "/api-server.pid"
+
+ if not pid_file_path or not os.path.isfile(pid_file_path):
+ is_running = False
+
+ try:
+ pid = int(sudo.read_file(pid_file_path))
+ except:
+ is_running = False
+
+ try:
+ # Kill will not actually kill the process
+ # From the doc:
+ # If sig is 0, then no signal is sent, but error checking is still
+ # performed; this can be used to check for the existence of a
+ # process ID or process group ID.
+ sudo.kill(pid, 0)
+ except OSError:
+ is_running = False
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ if not is_running:
+ result_code = "CRITICAL"
+ else:
+ result_code = "OK"
+
+ label = "The comment {0} of DOLPHIN_SCHEDULER on {1} is {2}".format(alert_name, host_name, result_code)
+
+ return ((result_code, [label]))
+
+if __name__ == "__main__":
+ pass
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_alert_service.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_alert_service.py
new file mode 100644
index 0000000..aa8a84d
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_alert_service.py
@@ -0,0 +1,62 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinAlertService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/alert-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/alert-server.pid` | grep `cat {dolphin_pidfile_dir}/alert-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start alert-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop alert-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "dolphinscheduler-alert-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinAlertService().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_api_service.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_api_service.py
new file mode 100644
index 0000000..f441941
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_api_service.py
@@ -0,0 +1,71 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinApiService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ #init
+ init_cmd=format("sh " + params.dolphin_home + "/script/create-dolphinscheduler.sh")
+ Execute(init_cmd, user=params.dolphin_user)
+
+ #upgrade
+ upgrade_cmd=format("sh " + params.dolphin_home + "/script/upgrade-dolphinscheduler.sh")
+ Execute(upgrade_cmd, user=params.dolphin_user)
+
+ no_op_test = format("ls {dolphin_pidfile_dir}/api-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/api-server.pid` | grep `cat {dolphin_pidfile_dir}/api-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start api-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop api-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "dolphinscheduler-api-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinApiService().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_env.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_env.py
new file mode 100644
index 0000000..1661d76
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_env.py
@@ -0,0 +1,123 @@
+"""
+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 resource_management import *
+
+
+def dolphin_env():
+ import params
+
+ Directory(params.dolphin_pidfile_dir,
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+ Directory(params.dolphin_log_dir,
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+ Directory(params.dolphin_conf_dir,
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+
+ Directory(params.dolphin_common_map['data.basedir.path'],
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+
+
+ File(format(params.dolphin_env_path),
+ mode=0777,
+ content=InlineTemplate(params.dolphin_env_content),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+
+ File(format(params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh"),
+ mode=0755,
+ content=Template("dolphin-daemon.sh.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/master.properties"),
+ mode=0755,
+ content=Template("master.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/worker.properties"),
+ mode=0755,
+ content=Template("worker.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+
+ File(format(params.dolphin_conf_dir + "/alert.properties"),
+ mode=0755,
+ content=Template("alert.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/datasource.properties"),
+ mode=0755,
+ content=Template("datasource.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/application-api.properties"),
+ mode=0755,
+ content=Template("application-api.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/common.properties"),
+ mode=0755,
+ content=Template("common.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/quartz.properties"),
+ mode=0755,
+ content=Template("quartz.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/zookeeper.properties"),
+ mode=0755,
+ content=Template("zookeeper.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_logger_service.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_logger_service.py
new file mode 100644
index 0000000..2c3fbd3
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_logger_service.py
@@ -0,0 +1,61 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinLoggerService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/logger-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/logger-server.pid` | grep `cat {dolphin_pidfile_dir}/logger-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start logger-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop logger-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "dolphinscheduler-logger-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinLoggerService().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_master_service.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_master_service.py
new file mode 100644
index 0000000..1513707
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_master_service.py
@@ -0,0 +1,62 @@
+# -*- coding: utf-8 -*-
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinMasterService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/master-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/master-server.pid` | grep `cat {dolphin_pidfile_dir}/master-server.pid` >/dev/null 2>&1")
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start master-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop master-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "dolphinscheduler-master-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinMasterService().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_worker_service.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_worker_service.py
new file mode 100644
index 0000000..40ad3b8
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/dolphin_worker_service.py
@@ -0,0 +1,61 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinWorkerService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/worker-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/worker-server.pid` | grep `cat {dolphin_pidfile_dir}/worker-server.pid` >/dev/null 2>&1")
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start worker-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop worker-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "dolphinscheduler-worker-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinWorkerService().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/params.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/params.py
new file mode 100644
index 0000000..8b26898
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/params.py
@@ -0,0 +1,142 @@
+"""
+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.
+"""
+
+import sys
+from resource_management import *
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions import default
+
+Logger.initialize_logger()
+reload(sys)
+sys.setdefaultencoding('utf-8')
+
+# server configurations
+config = Script.get_config()
+
+# conf_dir = "/etc/"
+dolphin_home = "/opt/soft/dolphinscheduler"
+dolphin_conf_dir = dolphin_home + "/conf"
+dolphin_log_dir = dolphin_home + "/logs"
+dolphin_bin_dir = dolphin_home + "/bin"
+dolphin_lib_jars = dolphin_home + "/lib/*"
+dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
+
+rmHosts = default("/clusterHostInfo/rm_host", [])
+
+# dolphin-env
+dolphin_env_map = {}
+dolphin_env_map.update(config['configurations']['dolphin-env'])
+
+# which user to install and admin dolphin scheduler
+dolphin_user = dolphin_env_map['dolphin.user']
+dolphin_group = dolphin_env_map['dolphin.group']
+
+# .dolphinscheduler_env.sh
+dolphin_env_path = dolphin_conf_dir + '/env/dolphinscheduler_env.sh'
+dolphin_env_content = dolphin_env_map['dolphinscheduler-env-content']
+
+# database config
+dolphin_database_config = {}
+dolphin_database_config['dolphin_database_type'] = dolphin_env_map['dolphin.database.type']
+dolphin_database_config['dolphin_database_username'] = dolphin_env_map['dolphin.database.username']
+dolphin_database_config['dolphin_database_password'] = dolphin_env_map['dolphin.database.password']
+if 'mysql' == dolphin_database_config['dolphin_database_type']:
+ dolphin_database_config['dolphin_database_driver'] = 'com.mysql.jdbc.Driver'
+ dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.StdJDBCDelegate'
+ dolphin_database_config['dolphin_database_url'] = 'jdbc:mysql://' + dolphin_env_map['dolphin.database.host'] \
+ + ':' + dolphin_env_map['dolphin.database.port'] \
+ + '/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8'
+else:
+ dolphin_database_config['dolphin_database_driver'] = 'org.postgresql.Driver'
+ dolphin_database_config['driverDelegateClass'] = 'org.quartz.impl.jdbcjobstore.PostgreSQLDelegate'
+ dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
+ + ':' + dolphin_env_map['dolphin.database.port'] \
+ + '/dolphinscheduler'
+
+# application-alert.properties
+dolphin_alert_map = {}
+wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
+wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
+wechat_team_send_msg = '{\"toparty\":\"$toParty\",\"agentid\":\"$agentId\",\"msgtype\":\"text\",\"text\":{\"content\":\"$msg\"},\"safe\":\"0\"}'
+wechat_user_send_msg = '{\"touser\":\"$toUser\",\"agentid\":\"$agentId\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"$msg\"}}'
+
+dolphin_alert_config_map = config['configurations']['dolphin-alert']
+
+if dolphin_alert_config_map['enterprise.wechat.enable']:
+ dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
+ dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
+ dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
+ dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg
+
+dolphin_alert_map.update(dolphin_alert_config_map)
+
+# application-api.properties
+dolphin_app_api_map = {}
+dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])
+
+# common.properties
+dolphin_common_map = {}
+
+if 'yarn-site' in config['configurations'] and \
+ 'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
+ yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
+ yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
+ dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address
+
+rmHosts = default("/clusterHostInfo/rm_host", [])
+if len(rmHosts) > 1:
+ dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
+else:
+ dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''
+
+dolphin_common_map_tmp = config['configurations']['dolphin-common']
+data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
+dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
+dolphin_common_map.update(config['configurations']['dolphin-common'])
+
+# datasource.properties
+dolphin_datasource_map = {}
+dolphin_datasource_map['spring.datasource.type'] = 'com.alibaba.druid.pool.DruidDataSource'
+dolphin_datasource_map['spring.datasource.driver-class-name'] = dolphin_database_config['dolphin_database_driver']
+dolphin_datasource_map['spring.datasource.url'] = dolphin_database_config['dolphin_database_url']
+dolphin_datasource_map['spring.datasource.username'] = dolphin_database_config['dolphin_database_username']
+dolphin_datasource_map['spring.datasource.password'] = dolphin_database_config['dolphin_database_password']
+dolphin_datasource_map.update(config['configurations']['dolphin-datasource'])
+
+# master.properties
+dolphin_master_map = config['configurations']['dolphin-master']
+
+# worker.properties
+dolphin_worker_map = config['configurations']['dolphin-worker']
+
+# zookeeper.properties
+dolphin_zookeeper_map={}
+zookeeperHosts = default("/clusterHostInfo/zookeeper_hosts", [])
+if len(zookeeperHosts) > 0 and "clientPort" in config['configurations']['zoo.cfg']:
+ clientPort = config['configurations']['zoo.cfg']['clientPort']
+ zookeeperPort = ":" + clientPort + ","
+ dolphin_zookeeper_map['zookeeper.quorum'] = zookeeperPort.join(zookeeperHosts) + ":" + clientPort
+dolphin_zookeeper_map.update(config['configurations']['dolphin-zookeeper'])
+if 'spring.servlet.multipart.max-file-size' in dolphin_app_api_map:
+ file_size = dolphin_app_api_map['spring.servlet.multipart.max-file-size']
+ dolphin_app_api_map['spring.servlet.multipart.max-file-size'] = file_size + "MB"
+if 'spring.servlet.multipart.max-request-size' in dolphin_app_api_map:
+ request_size = dolphin_app_api_map['spring.servlet.multipart.max-request-size']
+ dolphin_app_api_map['spring.servlet.multipart.max-request-size'] = request_size + "MB"
+
+
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/service_check.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/service_check.py
new file mode 100644
index 0000000..0e12f69
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/service_check.py
@@ -0,0 +1,31 @@
+"""
+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 resource_management import *
+from resource_management.libraries.functions import get_unique_id_and_date
+
+class ServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ #env.set_params(params)
+
+ # Execute(format("which pika_server"))
+
+if __name__ == "__main__":
+ ServiceCheck().execute()
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/status_params.py b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/status_params.py
new file mode 100644
index 0000000..24b2c8b
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/scripts/status_params.py
@@ -0,0 +1,23 @@
+"""
+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 resource_management import *
+
+config = Script.get_config()
+
+dolphin_run_dir = "/opt/soft/run/dolphinscheduler/"
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/alert.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/alert.properties.j2
new file mode 100644
index 0000000..73840b8
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/alert.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_alert_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/application-api.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/application-api.properties.j2
new file mode 100644
index 0000000..7011800
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/application-api.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_app_api_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/common.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/common.properties.j2
new file mode 100644
index 0000000..2220c4e
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/common.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_common_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/datasource.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/datasource.properties.j2
new file mode 100644
index 0000000..40aed83
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/datasource.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_datasource_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/dolphin-daemon.sh.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/dolphin-daemon.sh.j2
new file mode 100644
index 0000000..0802b74
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/dolphin-daemon.sh.j2
@@ -0,0 +1,116 @@
+#!/bin/sh
+#
+# 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.
+#
+
+usage="Usage: dolphinscheduler-daemon.sh (start|stop) <command> "
+
+# if no args specified, show usage
+if [ $# -le 1 ]; then
+ echo $usage
+ exit 1
+fi
+
+startStop=$1
+shift
+command=$1
+shift
+
+echo "Begin $startStop $command......"
+
+BIN_DIR=`dirname $0`
+BIN_DIR=`cd "$BIN_DIR"; pwd`
+DOLPHINSCHEDULER_HOME=$BIN_DIR/..
+
+export HOSTNAME=`hostname`
+
+DOLPHINSCHEDULER_LIB_JARS={{dolphin_lib_jars}}
+
+DOLPHINSCHEDULER_OPTS="-server -Xmx16g -Xms4g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70"
+STOP_TIMEOUT=5
+
+log={{dolphin_log_dir}}/dolphinscheduler-$command-$HOSTNAME.out
+pid={{dolphin_pidfile_dir}}/$command.pid
+
+cd $DOLPHINSCHEDULER_HOME
+
+if [ "$command" = "api-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-api.xml -Dspring.profiles.active=api"
+ CLASS=org.apache.dolphinscheduler.api.ApiApplicationServer
+elif [ "$command" = "master-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-master.xml -Ddruid.mysql.usePingMethod=false"
+ CLASS=org.apache.dolphinscheduler.server.master.MasterServer
+elif [ "$command" = "worker-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-worker.xml -Ddruid.mysql.usePingMethod=false"
+ CLASS=org.apache.dolphinscheduler.server.worker.WorkerServer
+elif [ "$command" = "alert-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/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
+
+case $startStop in
+ (start)
+
+ if [ -f $pid ]; then
+ if kill -0 `cat $pid` > /dev/null 2>&1; then
+ echo $command running as process `cat $pid`. Stop it first.
+ exit 1
+ fi
+ fi
+
+ echo starting $command, logging to $log
+
+ exec_command="$LOG_FILE $DOLPHINSCHEDULER_OPTS -classpath {{dolphin_conf_dir}}:{{dolphin_lib_jars}} $CLASS"
+
+ echo "nohup java $exec_command > $log 2>&1 < /dev/null &"
+ nohup java $exec_command > $log 2>&1 < /dev/null &
+ echo $! > $pid
+ ;;
+
+ (stop)
+
+ if [ -f $pid ]; then
+ TARGET_PID=`cat $pid`
+ if kill -0 $TARGET_PID > /dev/null 2>&1; then
+ echo stopping $command
+ kill $TARGET_PID
+ sleep $STOP_TIMEOUT
+ if kill -0 $TARGET_PID > /dev/null 2>&1; then
+ echo "$command did not stop gracefully after $STOP_TIMEOUT seconds: killing with kill -9"
+ kill -9 $TARGET_PID
+ fi
+ else
+ echo no $command to stop
+ fi
+ rm -f $pid
+ else
+ echo no $command to stop
+ fi
+ ;;
+
+ (*)
+ echo $usage
+ exit 1
+ ;;
+
+esac
+
+echo "End $startStop $command."
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/master.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/master.properties.j2
new file mode 100644
index 0000000..d9b85e1
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/master.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_master_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/worker.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/worker.properties.j2
new file mode 100644
index 0000000..a008b74
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/worker.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_worker_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/zookeeper.properties.j2 b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/zookeeper.properties.j2
new file mode 100644
index 0000000..9eb14ea
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/package/templates/zookeeper.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_zookeeper_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/quicklinks/quicklinks.json b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/quicklinks/quicklinks.json
new file mode 100644
index 0000000..8753004
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/quicklinks/quicklinks.json
@@ -0,0 +1,26 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "protocol":
+ {
+ "type":"http"
+ },
+
+ "links": [
+ {
+ "name": "dolphin-application-ui",
+ "label": "DolphinApplication UI",
+ "requires_user_name": "false",
+ "component_name": "DOLPHIN_API",
+ "url": "%@://%@:%@/dolphinscheduler/ui/view/login/index.html",
+ "port":{
+ "http_property": "server.port",
+ "http_default_port": "12345",
+ "regex": "^(\\d+)$",
+ "site": "dolphin-application-api"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/themes/theme.json b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/themes/theme.json
new file mode 100644
index 0000000..953e232
--- /dev/null
+++ b/ambari_plugin-1.3.6/common-services/DOLPHIN/1.3.6/themes/theme.json
@@ -0,0 +1,661 @@
+{
+ "name": "default",
+ "description": "Default theme for Dolphin Scheduler service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "default",
+ "tabs": [
+ {
+ "name": "settings",
+ "display-name": "Settings",
+ "layout": {
+ "tab-rows": "3",
+ "tab-columns": "3",
+ "sections": [
+ {
+ "name": "dolphin-env-config",
+ "display-name": "Dolphin Env Config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "2",
+ "subsections": [
+ {
+ "name": "env-row1-col1",
+ "display-name": "Deploy User Info",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "env-row1-col2",
+ "display-name": "System Env Optimization",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "dolphin-database-config",
+ "display-name": "Database Config",
+ "row-index": "1",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "3",
+ "subsections": [
+ {
+ "name": "database-row1-col1",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "database-row1-col2",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "database-row1-col3",
+ "row-index": "0",
+ "column-index": "2",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "dynamic-config",
+ "row-index": "2",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "3",
+ "subsections": [
+ {
+ "name": "dynamic-row1-col1",
+ "display-name": "Resource FS Config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "dynamic-row1-col2",
+ "display-name": "Kerberos Info",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "dynamic-row1-col3",
+ "display-name": "Wechat Info",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "dolphin-env/dolphin.database.type",
+ "subsection-name": "database-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.host",
+ "subsection-name": "database-row1-col2"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.port",
+ "subsection-name": "database-row1-col2"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.username",
+ "subsection-name": "database-row1-col3"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.password",
+ "subsection-name": "database-row1-col3"
+ },
+ {
+ "config": "dolphin-env/dolphin.user",
+ "subsection-name": "env-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphin.group",
+ "subsection-name": "env-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphinscheduler-env-content",
+ "subsection-name": "env-row1-col2"
+ },
+ {
+ "config": "dolphin-common/resource.storage.type",
+ "subsection-name": "dynamic-row1-col1"
+ },
+ {
+ "config": "dolphin-common/resource.upload.path",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS || ${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/hdfs.root.user",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/data.store2hdfs.basepath",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.defaultFS",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.endpoint",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.access.key",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.secret.key",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/hadoop.security.authentication.startup.state",
+ "subsection-name": "dynamic-row1-col2"
+ },
+ {
+ "config": "dolphin-common/java.security.krb5.conf.path",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.username",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.path",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/kerberos.expire.time",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.enable",
+ "subsection-name": "dynamic-row1-col3"
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.corp.id",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.secret",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.agent.id",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.users",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "dolphin-env/dolphin.database.type",
+ "widget": {
+ "type": "combo"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.host",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.port",
+ "widget": {
+ "type": "text-field",
+ "units": [
+ {
+ "unit-name": "int"
+ }
+ ]
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.username",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.password",
+ "widget": {
+ "type": "password"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.user",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.group",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphinscheduler-env-content",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "dolphin-common/resource.storage.type",
+ "widget": {
+ "type": "combo"
+ }
+ },
+ {
+ "config": "dolphin-common/resource.upload.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/hdfs.root.user",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/data.store2hdfs.basepath",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.defaultFS",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.endpoint",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.access.key",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.secret.key",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/hadoop.security.authentication.startup.state",
+ "widget": {
+ "type": "toggle"
+ }
+ },
+ {
+ "config": "dolphin-common/java.security.krb5.conf.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.username",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/kerberos.expire.time",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.enable",
+ "widget": {
+ "type": "toggle"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.corp.id",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.secret",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.agent.id",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.users",
+ "widget": {
+ "type": "text-field"
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari_plugin-1.3.6/statcks/DOLPHIN/metainfo.xml b/ambari_plugin-1.3.6/statcks/DOLPHIN/metainfo.xml
new file mode 100755
index 0000000..b763487
--- /dev/null
+++ b/ambari_plugin-1.3.6/statcks/DOLPHIN/metainfo.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>DOLPHIN</name>
+ <extends>common-services/DOLPHIN/1.3.6</extends>
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/alerts.json b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/alerts.json
new file mode 100644
index 0000000..1883287
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/alerts.json
@@ -0,0 +1,158 @@
+{
+ "DOLPHIN": {
+ "service": [],
+ "DOLPHIN_API": [
+ {
+ "name": "dolphin_api_port_check",
+ "label": "dolphin_api_port_check",
+ "description": "dolphin_api_port_check.",
+ "interval": 10,
+ "scope": "ANY",
+ "source": {
+ "type": "PORT",
+ "uri": "{{dolphin-application-api/server.port}}",
+ "default_port": 12345,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ }
+ ],
+ "DOLPHIN_LOGGER": [
+ {
+ "name": "dolphin_logger_port_check",
+ "label": "dolphin_logger_port_check",
+ "description": "dolphin_logger_port_check.",
+ "interval": 10,
+ "scope": "ANY",
+ "source": {
+ "type": "PORT",
+ "uri": "{{dolphin-common/loggerserver.rpc.port}}",
+ "default_port": 50051,
+ "reporting": {
+ "ok": {
+ "text": "TCP OK - {0:.3f}s response on port {1}"
+ },
+ "warning": {
+ "text": "TCP OK - {0:.3f}s response on port {1}",
+ "value": 1.5
+ },
+ "critical": {
+ "text": "Connection failed: {0} to {1}:{2}",
+ "value": 5.0
+ }
+ }
+ }
+ }
+ ],
+ "DOLPHIN_MASTER": [
+ {
+ "name": "DOLPHIN_MASTER_CHECK",
+ "label": "check dolphin scheduler master status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_MASTER",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ],
+ "DOLPHIN_WORKER": [
+ {
+ "name": "DOLPHIN_WORKER_CHECK",
+ "label": "check dolphin scheduler worker status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_WORKER",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ],
+ "DOLPHIN_ALERT": [
+ {
+ "name": "DOLPHIN_DOLPHIN_ALERT_CHECK",
+ "label": "check dolphin scheduler alert status",
+ "description": "",
+ "interval":10,
+ "scope": "HOST",
+ "enabled": true,
+ "source": {
+ "type": "SCRIPT",
+ "path": "DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py",
+ "parameters": [
+
+ {
+ "name": "connection.timeout",
+ "display_name": "Connection Timeout",
+ "value": 5.0,
+ "type": "NUMERIC",
+ "description": "The maximum time before this alert is considered to be CRITICAL",
+ "units": "seconds",
+ "threshold": "CRITICAL"
+ },
+ {
+ "name": "alertName",
+ "display_name": "alertName",
+ "value": "DOLPHIN_ALERT",
+ "type": "STRING",
+ "description": "alert name"
+ }
+ ]
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-api.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-api.xml
new file mode 100644
index 0000000..766c0f4
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-api.xml
@@ -0,0 +1,87 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>server.port</name>
+ <value>12345</value>
+ <description>
+ server port
+ </description>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ </property>
+ <property>
+ <name>server.servlet.session.timeout</name>
+ <value>7200</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>server.servlet.context-path</name>
+ <value>/dolphinscheduler/</value>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.servlet.multipart.max-file-size</name>
+ <value>1024</value>
+ <value-attributes>
+ <unit>MB</unit>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.servlet.multipart.max-request-size</name>
+ <value>1024</value>
+ <value-attributes>
+ <unit>MB</unit>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>server.jetty.max-http-post-size</name>
+ <value>5000000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.messages.encoding</name>
+ <value>UTF-8</value>
+ <description></description>
+ </property>
+ <property>
+ <name>spring.messages.basename</name>
+ <value>i18n/messages</value>
+ <description></description>
+ </property>
+ <property>
+ <name>security.authentication.type</name>
+ <value>PASSWORD</value>
+ <description></description>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-mysql.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-mysql.xml
new file mode 100644
index 0000000..a3ba6ad
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-application-mysql.xml
@@ -0,0 +1,37 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>spring.datasource.url</name>
+ <value>jdbc:mysql://127.0.0.1:3306/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8</value>
+ <description>
+ mysql url address
+ </description>
+ </property>
+ <property>
+ <name>spring.datasource.username</name>
+ <value>ds_user</value>
+ <description>
+ </description>
+ </property>
+ <property>
+ <name>spring.datasource.password</name>
+ <value>dolphinscheduler</value>
+ <description>
+ </description>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-common.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-common.xml
new file mode 100644
index 0000000..f0dafab
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-common.xml
@@ -0,0 +1,184 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>data.basedir.path</name>
+ <value>/tmp/dolphinscheduler</value>
+ <description>
+ user data local directory path, please make sure the directory exists and have read write permissions
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>resource.storage.type</name>
+ <display-name>Choose Resource Upload Startup Type</display-name>
+ <description>
+ resource storage type: HDFS, S3, NONE
+ </description>
+ <value>NONE</value>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>HDFS</value>
+ <label>HDFS</label>
+ </entry>
+ <entry>
+ <value>S3</value>
+ <label>S3</label>
+ </entry>
+ <entry>
+ <value>NONE</value>
+ <label>NONE</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>resource.upload.path</name>
+ <value>/dolphinscheduler</value>
+ <description>
+ resource store on HDFS/S3 path, resource file will store to this hadoop hdfs path, self configuration, please make sure the directory exists on hdfs and have read write permissions. "/dolphinscheduler" is recommended
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>hadoop.security.authentication.startup.state</name>
+ <value>false</value>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>true</value>
+ <label>Enabled</label>
+ </entry>
+ <entry>
+ <value>false</value>
+ <label>Disabled</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <description>
+ whether to startup kerberos
+ </description>
+ </property>
+ <property>
+ <name>java.security.krb5.conf.path</name>
+ <value>/opt/krb5.conf</value>
+ <description>
+ java.security.krb5.conf path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>login.user.keytab.username</name>
+ <value>hdfs-mycluster@ESZ.COM</value>
+ <description>
+ login user from keytab username
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>login.user.keytab.path</name>
+ <value>/opt/hdfs.headless.keytab</value>
+ <description>
+ login user from keytab path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>kerberos.expire.time</name>
+ <value>2</value>
+ <description>
+ kerberos expire time, the unit is hour
+ </description>
+ </property>
+ <property>
+ <name>resource.view.suffixs</name>
+ <value>txt,log,sh,bat,conf,cfg,py,java,sql,xml,hql,properties,json,yml,yaml,ini,js</value>
+ <description>
+ resource view suffixs
+ </description>
+ </property>
+ <property>
+ <name>hdfs.root.user</name>
+ <value>hdfs</value>
+ <description>
+ if resource.storage.type=HDFS, the user must have the permission to create directories under the HDFS root path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.defaultFS</name>
+ <value>hdfs://mycluster:8020</value>
+ <description>
+ if resource.storage.type=S3, the value like: s3a://dolphinscheduler; if resource.storage.type=HDFS and namenode HA is enabled, you need to copy core-site.xml and hdfs-site.xml to conf dir
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.endpoint</name>
+ <value>http://host:9010</value>
+ <description>
+ s3 required,s3 endpoint
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.access.key</name>
+ <value>A3DXS30FO22544RE</value>
+ <description>
+ s3 required,s3 access key
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>fs.s3a.secret.key</name>
+ <value>OloCLq3n+8+sdPHUhJ21XrSxTC+JK</value>
+ <description>
+ s3 required,s3 secret key
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>yarn.resourcemanager.ha.rm.ids</name>
+ <value>192.168.xx.xx,192.168.xx.xx</value>
+ <description>
+ if resourcemanager HA is enabled, please set the HA IPs; if resourcemanager is single, keep this value empty
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>yarn.application.status.address</name>
+ <value>http://ds1:8088/ws/v1/cluster/apps/%s</value>
+ <description>
+ if resourcemanager HA is enabled or not use resourcemanager, please keep the default value; If resourcemanager is single, you only need to replace ds1 to actual resourcemanager hostname
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dolphinscheduler.env.path</name>
+ <value>env/dolphinscheduler_env.sh</value>
+ <description>
+ system env path
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-env.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-env.xml
new file mode 100644
index 0000000..18501c6
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-env.xml
@@ -0,0 +1,124 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>dolphin.database.type</name>
+ <value>mysql</value>
+ <description>Dolphin Scheduler DataBase Type Which Is Select</description>
+ <display-name>Dolphin Database Type</display-name>
+ <value-attributes>
+ <type>value-list</type>
+ <entries>
+ <entry>
+ <value>mysql</value>
+ <label>Mysql</label>
+ </entry>
+ <entry>
+ <value>postgresql</value>
+ <label>Postgresql</label>
+ </entry>
+ </entries>
+ <selection-cardinality>1</selection-cardinality>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.host</name>
+ <value></value>
+ <display-name>Dolphin Database Host</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.port</name>
+ <value></value>
+ <display-name>Dolphin Database Port</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.username</name>
+ <value></value>
+ <display-name>Dolphin Database Username</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.database.password</name>
+ <value></value>
+ <display-name>Dolphin Database Password</display-name>
+ <property-type>PASSWORD</property-type>
+ <value-attributes>
+ <type>password</type>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphin.user</name>
+ <value></value>
+ <description>Which user to install and admin dolphin scheduler</description>
+ <display-name>Deploy User</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>dolphin.group</name>
+ <value></value>
+ <description>Which user to install and admin dolphin scheduler</description>
+ <display-name>Deploy Group</display-name>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
+ <name>dolphinscheduler-env-content</name>
+ <display-name>Dolphinscheduler Env template</display-name>
+ <description>This is the jinja template for dolphinscheduler.env.sh file</description>
+ <value>#
+# 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.
+#
+
+export HADOOP_HOME=/opt/soft/hadoop
+export HADOOP_CONF_DIR=/opt/soft/hadoop/etc/hadoop
+export SPARK_HOME1=/opt/soft/spark1
+export SPARK_HOME2=/opt/soft/spark2
+export PYTHON_HOME=/opt/soft/python
+export JAVA_HOME=/opt/soft/java
+export HIVE_HOME=/opt/soft/hive
+export FLINK_HOME=/opt/soft/flink
+export DATAX_HOME=/opt/soft/datax</value>
+ <value-attributes>
+ <type>content</type>
+ <empty-value-valid>false</empty-value-valid>
+ <show-property-name>false</show-property-name>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-master.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-master.xml
new file mode 100644
index 0000000..e7b2df2
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-master.xml
@@ -0,0 +1,102 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>master.listen.port</name>
+ <value>5678</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master listen port</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.exec.threads</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master execute thread number to limit process instances</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.exec.task.num</name>
+ <value>20</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master execute task number in parallel per process instance</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.dispatch.task.num</name>
+ <value>3</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master dispatch task number per batch</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.host.selector</name>
+ <value>LowerWeight</value>
+ <description>master host selector to select a suitable worker, default value: LowerWeight. Optional values include Random, RoundRobin, LowerWeight</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.heartbeat.interval</name>
+ <value>10</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master heartbeat interval, the unit is second</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.task.commit.retryTimes</name>
+ <value>5</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master commit task retry times</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.task.commit.interval</name>
+ <value>1000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master commit task interval, the unit is millisecond</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.max.cpuload.avg</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>master max cpuload avg, only higher than the system cpu load average, master server can schedule. default value -1: the number of cpu cores * 2</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>master.reserved.memory</name>
+ <value>0.3</value>
+ <description>master reserved memory, only lower than system available memory, master server can schedule. default value 0.3, the unit is G</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-quartz.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-quartz.xml
new file mode 100644
index 0000000..7a0c68b
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-quartz.xml
@@ -0,0 +1,126 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>org.quartz.scheduler.instanceName</name>
+ <value>DolphinScheduler</value>
+ <description></description>
+ </property>
+ <property>
+ <!-- 列举枚举值 -->
+ <name>org.quartz.scheduler.instanceId</name>
+ <value>AUTO</value>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.scheduler.makeSchedulerThreadDaemon</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.useProperties</name>
+ <value>false</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.threadPool.class</name>
+ <value>org.quartz.simpl.SimpleThreadPool</value>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.threadPool.makeThreadsDaemons</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.threadPool.threadCount</name>
+ <value>25</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.threadPool.threadPriority</name>
+ <value>5</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.class</name>
+ <value>org.quartz.impl.jdbcjobstore.JobStoreTX</value>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.tablePrefix</name>
+ <value>QRTZ_</value>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.isClustered</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.misfireThreshold</name>
+ <value>60000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.clusterCheckinInterval</name>
+ <value>5000</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.acquireTriggersWithinLock</name>
+ <value>true</value>
+ <value-attributes>
+ <type>boolean</type>
+ </value-attributes>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.jobStore.dataSource</name>
+ <value>myDs</value>
+ <description></description>
+ </property>
+ <property>
+ <name>org.quartz.dataSource.myDs.connectionProvider.class</name>
+ <value>org.apache.dolphinscheduler.service.quartz.DruidConnectionProvider</value>
+ <description></description>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-registry.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-registry.xml
new file mode 100644
index 0000000..7820520
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-registry.xml
@@ -0,0 +1,81 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>registry.plugin.name</name>
+ <value>zookeeper</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.servers</name>
+ <value>127.0.0.1:2181</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.namespace</name>
+ <value>dolphinscheduler</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.base.sleep.time.ms</name>
+ <value>60</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.max.sleep.ms</name>
+ <value>300</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.max.retries</name>
+ <value>5</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.session.timeout.ms</name>
+ <value>30000</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.connection.timeout.ms</name>
+ <value>7500</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>registry.block.until.connected.wait</name>
+ <value>600</value>
+ <description>
+ </description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-worker.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-worker.xml
new file mode 100644
index 0000000..cd16f83
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/configuration/dolphin-worker.xml
@@ -0,0 +1,66 @@
+<!--
+ ~ 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.
+ -->
+<configuration>
+ <property>
+ <name>worker.listen.port</name>
+ <value>1234</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker listen port</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.exec.threads</name>
+ <value>100</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker execute thread number to limit task instances</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.heartbeat.interval</name>
+ <value>10</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker heartbeat interval, the unit is second</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.max.cpuload.avg</name>
+ <value>-1</value>
+ <value-attributes>
+ <type>int</type>
+ </value-attributes>
+ <description>worker max cpuload avg, only higher than the system cpu load average, worker server can be dispatched tasks. default value -1: the number of cpu cores * 2</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.reserved.memory</name>
+ <value>0.3</value>
+ <description>worker reserved memory, only lower than system available memory, worker server can be dispatched tasks. default value 0.3, the unit is G</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+ <property>
+ <name>worker.groups</name>
+ <value>default</value>
+ <description>default worker groups separated by comma, like 'worker.groups=default,test'</description>
+ <on-ambari-upgrade add="true"/>
+ </property>
+</configuration>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/metainfo.xml b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/metainfo.xml
new file mode 100644
index 0000000..cb821f1
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/metainfo.xml
@@ -0,0 +1,136 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>DOLPHIN</name>
+ <displayName>Dolphin Scheduler</displayName>
+ <comment>分布式易扩展的可视化DAG工作流任务调度系统</comment>
+ <version>2.0.6</version>
+ <components>
+ <component>
+ <name>DOLPHIN_MASTER</name>
+ <displayName>DS Master</displayName>
+ <category>MASTER</category>
+ <cardinality>1+</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_master_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_LOGGER</name>
+ <displayName>DS Logger</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_logger_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_WORKER</name>
+ <displayName>DS Worker</displayName>
+ <category>SLAVE</category>
+ <cardinality>1+</cardinality>
+ <dependencies>
+ <dependency>
+ <name>DOLPHIN/DOLPHIN_LOGGER</name>
+ <scope>host</scope>
+ <auto-deploy>
+ <enabled>true</enabled>
+ </auto-deploy>
+ </dependency>
+ </dependencies>
+ <commandScript>
+ <script>scripts/dolphin_worker_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_ALERT</name>
+ <displayName>DS Alert</displayName>
+ <category>SLAVE</category>
+ <cardinality>1</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_alert_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+
+ <component>
+ <name>DOLPHIN_API</name>
+ <displayName>DS_Api</displayName>
+ <category>SLAVE</category>
+ <cardinality>1</cardinality>
+ <commandScript>
+ <script>scripts/dolphin_api_service.py</script>
+ <scriptType>PYTHON</scriptType>
+ <timeout>600</timeout>
+ </commandScript>
+ </component>
+ </components>
+
+ <requiredServices>
+ <service>ZOOKEEPER</service>
+ </requiredServices>
+
+ <osSpecifics>
+ <osSpecific>
+ <osFamily>any</osFamily>
+ <packages>
+ <package>
+ <name>apache-dolphinscheduler*</name>
+ </package>
+ </packages>
+ </osSpecific>
+ </osSpecifics>
+
+ <configuration-dependencies>
+ <config-type>dolphin-registry</config-type>
+ <config-type>dolphin-application-api</config-type>
+ <config-type>dolphin-application-mysql</config-type>
+ <config-type>dolphin-common</config-type>
+ <config-type>dolphin-env</config-type>
+ <config-type>dolphin-master</config-type>
+ <config-type>dolphin-worker</config-type>
+ </configuration-dependencies>
+
+ <themes>
+ <theme>
+ <fileName>theme.json</fileName>
+ <default>true</default>
+ </theme>
+ </themes>
+
+ <quickLinksConfigurations-dir>quicklinks</quickLinksConfigurations-dir>
+ <quickLinksConfigurations>
+ <quickLinksConfiguration>
+ <fileName>quicklinks.json</fileName>
+ <default>true</default>
+ </quickLinksConfiguration>
+ </quickLinksConfigurations>
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py
new file mode 100644
index 0000000..87cc7b4
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/alerts/alert_dolphin_scheduler_status.py
@@ -0,0 +1,124 @@
+"""
+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.
+"""
+
+import socket
+import urllib2
+import os
+import logging
+import ambari_simplejson as json
+from resource_management.libraries.script.script import Script
+import sys
+reload(sys)
+sys.setdefaultencoding('utf-8')
+
+logger = logging.getLogger('ambari_alerts')
+
+config = Script.get_config()
+
+
+def get_tokens():
+ """
+ Returns a tuple of tokens in the format {{site/property}} that will be used
+ to build the dictionary passed into execute
+
+ :rtype tuple
+ """
+
+def get_info(url, connection_timeout):
+ response = None
+
+ try:
+ response = urllib2.urlopen(url, timeout=connection_timeout)
+ json_data = response.read()
+ return json_data
+ finally:
+ if response is not None:
+ try:
+ response.close()
+ except:
+ pass
+
+
+def execute(configurations={}, parameters={}, host_name=None):
+ """
+ Returns a tuple containing the result code and a pre-formatted result label
+
+ Keyword arguments:
+ configurations : a mapping of configuration key to value
+ parameters : a mapping of script parameter key to value
+ host_name : the name of this host where the alert is running
+
+ :type configurations dict
+ :type parameters dict
+ :type host_name str
+ """
+
+ alert_name = parameters['alertName']
+
+ dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
+
+ pid = "0"
+
+
+ from resource_management.core import sudo
+
+ is_running = True
+ pid_file_path = ""
+ if alert_name == 'DOLPHIN_MASTER':
+ pid_file_path = dolphin_pidfile_dir + "/master-server.pid"
+ elif alert_name == 'DOLPHIN_WORKER':
+ pid_file_path = dolphin_pidfile_dir + "/worker-server.pid"
+ elif alert_name == 'DOLPHIN_ALERT':
+ pid_file_path = dolphin_pidfile_dir + "/alert-server.pid"
+ elif alert_name == 'DOLPHIN_LOGGER':
+ pid_file_path = dolphin_pidfile_dir + "/logger-server.pid"
+ elif alert_name == 'DOLPHIN_API':
+ pid_file_path = dolphin_pidfile_dir + "/api-server.pid"
+
+ if not pid_file_path or not os.path.isfile(pid_file_path):
+ is_running = False
+
+ try:
+ pid = int(sudo.read_file(pid_file_path))
+ except:
+ is_running = False
+
+ try:
+ # Kill will not actually kill the process
+ # From the doc:
+ # If sig is 0, then no signal is sent, but error checking is still
+ # performed; this can be used to check for the existence of a
+ # process ID or process group ID.
+ sudo.kill(pid, 0)
+ except OSError:
+ is_running = False
+
+ if host_name is None:
+ host_name = socket.getfqdn()
+
+ if not is_running:
+ result_code = "CRITICAL"
+ else:
+ result_code = "OK"
+
+ label = "The comment {0} of DOLPHIN_SCHEDULER on {1} is {2}".format(alert_name, host_name, result_code)
+
+ return ((result_code, [label]))
+
+if __name__ == "__main__":
+ pass
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_alert_service.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_alert_service.py
new file mode 100644
index 0000000..e78c38d
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_alert_service.py
@@ -0,0 +1,62 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinAlertService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/alert-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/alert-server.pid` | grep `cat {dolphin_pidfile_dir}/alert-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start alert-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop alert-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "alert-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinAlertService().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_api_service.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_api_service.py
new file mode 100644
index 0000000..5a28924
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_api_service.py
@@ -0,0 +1,71 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinApiService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+
+ #init
+ init_cmd=format("sh " + params.dolphin_home + "/script/create-dolphinscheduler.sh")
+ Execute(init_cmd, user=params.dolphin_user)
+
+ #upgrade
+ upgrade_cmd=format("sh " + params.dolphin_home + "/script/upgrade-dolphinscheduler.sh")
+ Execute(upgrade_cmd, user=params.dolphin_user)
+
+ no_op_test = format("ls {dolphin_pidfile_dir}/api-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/api-server.pid` | grep `cat {dolphin_pidfile_dir}/api-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start api-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop api-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "api-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinApiService().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_env.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_env.py
new file mode 100644
index 0000000..c79d50d
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_env.py
@@ -0,0 +1,113 @@
+"""
+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 resource_management import *
+
+def dolphin_env():
+ import params # import 导入params.py文件
+
+ Directory(params.dolphin_pidfile_dir, # Directory执行文件夹操作
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True # 父目录不存在时一起创建
+ )
+ Directory(params.dolphin_log_dir,
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+ Directory(params.dolphin_conf_dir,
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+
+ Directory(params.dolphin_common_map['data.basedir.path'],
+ mode=0777,
+ owner=params.dolphin_user,
+ group=params.dolphin_group,
+ create_parents=True
+ )
+
+ # 做配置文件的覆盖
+ File(format(params.dolphin_env_path), # File表示执行文件操作
+ mode=0777,
+ content=InlineTemplate(params.dolphin_env_content),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh"),
+ mode=0755,
+ content=Template("dolphin-daemon.sh.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/master.properties"),
+ mode=0755,
+ content=Template("master.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/worker.properties"),
+ mode=0755,
+ content=Template("worker.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/application-api.properties"),
+ mode=0755,
+ content=Template("application-api.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/common.properties"),
+ mode=0755,
+ content=Template("common.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/quartz.properties"),
+ mode=0755,
+ content=Template("quartz.properties.j2"),
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/registry.properties"),
+ mode=0755,
+ content=Template("registry.properties.j2"), #
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
+
+ File(format(params.dolphin_conf_dir + "/application-mysql.yaml"),
+ mode=755,
+ content=Template("application-mysql.yaml.j2"), # File表示执行文件操作,将这个文件的内容进行模版替换
+ owner=params.dolphin_user,
+ group=params.dolphin_group
+ )
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_logger_service.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_logger_service.py
new file mode 100644
index 0000000..fb47e13
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_logger_service.py
@@ -0,0 +1,61 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinLoggerService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/logger-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/logger-server.pid` | grep `cat {dolphin_pidfile_dir}/logger-server.pid` >/dev/null 2>&1")
+
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start logger-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop logger-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "logger-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinLoggerService().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_master_service.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_master_service.py
new file mode 100644
index 0000000..0f8014c
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_master_service.py
@@ -0,0 +1,61 @@
+# -*- coding: utf-8 -*-
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinMasterService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/master-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/master-server.pid` | grep `cat {dolphin_pidfile_dir}/master-server.pid` >/dev/null 2>&1")
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start master-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop master-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "master-server.pid")
+
+if __name__ == "__main__":
+ DolphinMasterService().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_worker_service.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_worker_service.py
new file mode 100644
index 0000000..1f542c0
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/dolphin_worker_service.py
@@ -0,0 +1,61 @@
+"""
+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.
+"""
+import time
+from resource_management import *
+
+from dolphin_env import dolphin_env
+
+
+class DolphinWorkerService(Script):
+ def install(self, env):
+ import params
+ env.set_params(params)
+ self.install_packages(env)
+ Execute(('chmod', '-R', '777', params.dolphin_home))
+ Execute(('chown', '-R', params.dolphin_user + ":" + params.dolphin_group, params.dolphin_home))
+
+ def configure(self, env):
+ import params
+ params.pika_slave = True
+ env.set_params(params)
+
+ dolphin_env()
+
+ def start(self, env):
+ import params
+ env.set_params(params)
+ self.configure(env)
+ no_op_test = format("ls {dolphin_pidfile_dir}/worker-server.pid >/dev/null 2>&1 && ps `cat {dolphin_pidfile_dir}/worker-server.pid` | grep `cat {dolphin_pidfile_dir}/worker-server.pid` >/dev/null 2>&1")
+ start_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh start worker-server")
+ Execute(start_cmd, user=params.dolphin_user, not_if=no_op_test)
+
+ def stop(self, env):
+ import params
+ env.set_params(params)
+ stop_cmd = format("sh " + params.dolphin_bin_dir + "/dolphinscheduler-daemon.sh stop worker-server")
+ Execute(stop_cmd, user=params.dolphin_user)
+ time.sleep(5)
+
+ def status(self, env):
+ import status_params
+ env.set_params(status_params)
+ check_process_status(status_params.dolphin_run_dir + "worker-server.pid")
+
+
+if __name__ == "__main__":
+ DolphinWorkerService().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/params.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/params.py
new file mode 100644
index 0000000..68166e6
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/params.py
@@ -0,0 +1,140 @@
+"""
+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.
+"""
+
+import sys
+from resource_management import *
+from resource_management.core.logger import Logger
+from resource_management.libraries.functions import default
+
+Logger.initialize_logger()
+reload(sys)
+sys.setdefaultencoding('utf-8')
+
+# server configurations
+config = Script.get_config()
+
+# conf_dir = "/etc/"
+dolphin_home = "/opt/soft/dolphinscheduler"
+dolphin_conf_dir = dolphin_home + "/conf"
+dolphin_log_dir = dolphin_home + "/logs"
+dolphin_bin_dir = dolphin_home + "/bin"
+dolphin_lib_jars = dolphin_home + "/lib/*"
+dolphin_pidfile_dir = "/opt/soft/run/dolphinscheduler"
+
+rmHosts = default("/clusterHostInfo/rm_host", [])
+
+# dolphin-env
+dolphin_env_map = {}
+dolphin_env_map.update(config['configurations']['dolphin-env'])
+
+# which user to install and admin dolphin scheduler
+dolphin_user = dolphin_env_map['dolphin.user']
+dolphin_group = dolphin_env_map['dolphin.group']
+
+# .dolphinscheduler_env.sh
+dolphin_env_path = dolphin_conf_dir + '/env/dolphinscheduler_env.sh'
+dolphin_env_content = dolphin_env_map['dolphinscheduler-env-content']
+
+# database config 开局让你填写 数据库的信息
+dolphin_database_config = {}
+dolphin_database_config['dolphin_database_type'] = dolphin_env_map['dolphin.database.type']
+dolphin_database_config['dolphin_database_username'] = dolphin_env_map['dolphin.database.username']
+dolphin_database_config['dolphin_database_password'] = dolphin_env_map['dolphin.database.password']
+if 'mysql' == dolphin_database_config['dolphin_database_type']:
+ dolphin_database_config['dolphin_database_driver'] = 'com.mysql.jdbc.Driver'
+ dolphin_database_config['dolphin_database_url'] = 'jdbc:mysql://' + dolphin_env_map['dolphin.database.host'] \
+ + ':' + dolphin_env_map['dolphin.database.port'] \
+ + '/dolphinscheduler?useUnicode=true&characterEncoding=UTF-8'
+else:
+ dolphin_database_config['dolphin_database_driver'] = 'org.postgresql.Driver'
+ dolphin_database_config['dolphin_database_url'] = 'jdbc:postgresql://' + dolphin_env_map['dolphin.database.host'] \
+ + ':' + dolphin_env_map['dolphin.database.port'] \
+ + '/dolphinscheduler'
+
+# application-alert.properties
+dolphin_alert_map = {}
+wechat_push_url = 'https://qyapi.weixin.qq.com/cgi-bin/message/send?access_token=$token'
+wechat_token_url = 'https://qyapi.weixin.qq.com/cgi-bin/gettoken?corpid=$corpId&corpsecret=$secret'
+wechat_team_send_msg = '{\"toparty\":\"$toParty\",\"agentid\":\"$agentId\",\"msgtype\":\"text\",\"text\":{\"content\":\"$msg\"},\"safe\":\"0\"}'
+wechat_user_send_msg = '{\"touser\":\"$toUser\",\"agentid\":\"$agentId\",\"msgtype\":\"markdown\",\"markdown\":{\"content\":\"$msg\"}}'
+
+dolphin_alert_config_map = config['configurations']['dolphin-alert']
+
+if dolphin_alert_config_map['enterprise.wechat.enable']:
+ dolphin_alert_map['enterprise.wechat.push.ur'] = wechat_push_url
+ dolphin_alert_map['enterprise.wechat.token.url'] = wechat_token_url
+ dolphin_alert_map['enterprise.wechat.team.send.msg'] = wechat_team_send_msg
+ dolphin_alert_map['enterprise.wechat.user.send.msg'] = wechat_user_send_msg
+
+dolphin_alert_map.update(dolphin_alert_config_map)
+
+# application-api.properties
+dolphin_app_api_map = {}
+dolphin_app_api_map.update(config['configurations']['dolphin-application-api'])
+
+# common.properties
+dolphin_common_map = {}
+
+if 'yarn-site' in config['configurations'] and \
+ 'yarn.resourcemanager.webapp.address' in config['configurations']['yarn-site']:
+ yarn_resourcemanager_webapp_address = config['configurations']['yarn-site']['yarn.resourcemanager.webapp.address']
+ yarn_application_status_address = 'http://' + yarn_resourcemanager_webapp_address + '/ws/v1/cluster/apps/%s'
+ dolphin_common_map['yarn.application.status.address'] = yarn_application_status_address
+
+rmHosts = default("/clusterHostInfo/rm_host", [])
+if len(rmHosts) > 1:
+ dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ','.join(rmHosts)
+else:
+ dolphin_common_map['yarn.resourcemanager.ha.rm.ids'] = ''
+
+dolphin_common_map_tmp = config['configurations']['dolphin-common']
+data_basedir_path = dolphin_common_map_tmp['data.basedir.path']
+dolphin_common_map['dolphinscheduler.env.path'] = dolphin_env_path
+dolphin_common_map.update(config['configurations']['dolphin-common'])
+
+# application-mysql.yaml
+dolphin_application_mysql_map = {}
+dolphin_application_mysql_map['spring.datasource.url'] = dolphin_database_config['dolphin_database_url']
+dolphin_application_mysql_map['spring.datasource.username'] = dolphin_database_config['dolphin_database_username']
+dolphin_application_mysql_map['spring.datasource.password'] = dolphin_database_config['dolphin_database_password']
+dolphin_application_mysql_map.update(config['configurations']['dolphin-application-mysql'])
+
+# master.properties
+dolphin_master_map = config['configurations']['dolphin-master']
+
+# quartz.properties
+dolphin_quartz_map = {}
+dolphin_quartz_map.update(config['configurations']['dolphin-quartz'])
+
+# worker.properties
+dolphin_worker_map = config['configurations']['dolphin-worker']
+
+# registry.properties
+dolphin_registry_map={}
+registryHosts = default("/clusterHostInfo/registry_hosts", [])
+if len(registryHosts) > 0 and "clientPort" in config['configurations']['zoo.cfg']:
+ clientPort = config['configurations']['zoo.cfg']['clientPort']
+ registryPort = ":" + clientPort + ","
+ dolphin_registry_map['registry.quorum'] = registryPort.join(registryHosts) + ":" + clientPort
+dolphin_registry_map.update(config['configurations']['dolphin-registry'])
+if 'spring.servlet.multipart.max-file-size' in dolphin_app_api_map:
+ file_size = dolphin_app_api_map['spring.servlet.multipart.max-file-size']
+ dolphin_app_api_map['spring.servlet.multipart.max-file-size'] = file_size + "MB"
+if 'spring.servlet.multipart.max-request-size' in dolphin_app_api_map:
+ request_size = dolphin_app_api_map['spring.servlet.multipart.max-request-size']
+ dolphin_app_api_map['spring.servlet.multipart.max-request-size'] = request_size + "MB"
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/service_check.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/service_check.py
new file mode 100644
index 0000000..0e12f69
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/service_check.py
@@ -0,0 +1,31 @@
+"""
+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 resource_management import *
+from resource_management.libraries.functions import get_unique_id_and_date
+
+class ServiceCheck(Script):
+ def service_check(self, env):
+ import params
+ #env.set_params(params)
+
+ # Execute(format("which pika_server"))
+
+if __name__ == "__main__":
+ ServiceCheck().execute()
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/status_params.py b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/status_params.py
new file mode 100644
index 0000000..7ced09c
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/scripts/status_params.py
@@ -0,0 +1,23 @@
+"""
+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 resource_management import *
+
+config = Script.get_config()
+
+dolphin_run_dir = "/opt/soft/dolphinscheduler/pid/"
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-api.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-api.properties.j2
new file mode 100644
index 0000000..7011800
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-api.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_app_api_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-mysql.yaml.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-mysql.yaml.j2
new file mode 100644
index 0000000..ff44ae7
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/application-mysql.yaml.j2
@@ -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.
+#
+spring:
+ datasource:
+ driver-class-name: com.mysql.jdbc.Driver
+ url: {{ dolphin_application_mysql_map['spring.datasource.url'] }}
+ username: {{ dolphin_application_mysql_map['spring.datasource.username'] }}
+ password: {{ dolphin_application_mysql_map['spring.datasource.password'] }}
+ hikari:
+ connection-test-query: select 1
+ minimum-idle: 5
+ auto-commit: true
+ validation-timeout: 3000
+ pool-name: DolphinScheduler
+ maximum-pool-size: 50
+ connection-timeout: 30000
+ idle-timeout: 600000
+ leak-detection-threshold: 0
+ initialization-fail-timeout: 1
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/common.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/common.properties.j2
new file mode 100644
index 0000000..2220c4e
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/common.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_common_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/dolphin-daemon.sh.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/dolphin-daemon.sh.j2
new file mode 100644
index 0000000..0802b74
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/dolphin-daemon.sh.j2
@@ -0,0 +1,116 @@
+#!/bin/sh
+#
+# 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.
+#
+
+usage="Usage: dolphinscheduler-daemon.sh (start|stop) <command> "
+
+# if no args specified, show usage
+if [ $# -le 1 ]; then
+ echo $usage
+ exit 1
+fi
+
+startStop=$1
+shift
+command=$1
+shift
+
+echo "Begin $startStop $command......"
+
+BIN_DIR=`dirname $0`
+BIN_DIR=`cd "$BIN_DIR"; pwd`
+DOLPHINSCHEDULER_HOME=$BIN_DIR/..
+
+export HOSTNAME=`hostname`
+
+DOLPHINSCHEDULER_LIB_JARS={{dolphin_lib_jars}}
+
+DOLPHINSCHEDULER_OPTS="-server -Xmx16g -Xms4g -Xss512k -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSParallelRemarkEnabled -XX:LargePageSizeInBytes=128m -XX:+UseFastAccessorMethods -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=70"
+STOP_TIMEOUT=5
+
+log={{dolphin_log_dir}}/dolphinscheduler-$command-$HOSTNAME.out
+pid={{dolphin_pidfile_dir}}/$command.pid
+
+cd $DOLPHINSCHEDULER_HOME
+
+if [ "$command" = "api-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-api.xml -Dspring.profiles.active=api"
+ CLASS=org.apache.dolphinscheduler.api.ApiApplicationServer
+elif [ "$command" = "master-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-master.xml -Ddruid.mysql.usePingMethod=false"
+ CLASS=org.apache.dolphinscheduler.server.master.MasterServer
+elif [ "$command" = "worker-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/logback-worker.xml -Ddruid.mysql.usePingMethod=false"
+ CLASS=org.apache.dolphinscheduler.server.worker.WorkerServer
+elif [ "$command" = "alert-server" ]; then
+ LOG_FILE="-Dlogging.config={{dolphin_conf_dir}}/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
+
+case $startStop in
+ (start)
+
+ if [ -f $pid ]; then
+ if kill -0 `cat $pid` > /dev/null 2>&1; then
+ echo $command running as process `cat $pid`. Stop it first.
+ exit 1
+ fi
+ fi
+
+ echo starting $command, logging to $log
+
+ exec_command="$LOG_FILE $DOLPHINSCHEDULER_OPTS -classpath {{dolphin_conf_dir}}:{{dolphin_lib_jars}} $CLASS"
+
+ echo "nohup java $exec_command > $log 2>&1 < /dev/null &"
+ nohup java $exec_command > $log 2>&1 < /dev/null &
+ echo $! > $pid
+ ;;
+
+ (stop)
+
+ if [ -f $pid ]; then
+ TARGET_PID=`cat $pid`
+ if kill -0 $TARGET_PID > /dev/null 2>&1; then
+ echo stopping $command
+ kill $TARGET_PID
+ sleep $STOP_TIMEOUT
+ if kill -0 $TARGET_PID > /dev/null 2>&1; then
+ echo "$command did not stop gracefully after $STOP_TIMEOUT seconds: killing with kill -9"
+ kill -9 $TARGET_PID
+ fi
+ else
+ echo no $command to stop
+ fi
+ rm -f $pid
+ else
+ echo no $command to stop
+ fi
+ ;;
+
+ (*)
+ echo $usage
+ exit 1
+ ;;
+
+esac
+
+echo "End $startStop $command."
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/master.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/master.properties.j2
new file mode 100644
index 0000000..d9b85e1
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/master.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_master_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/quartz.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/quartz.properties.j2
new file mode 100644
index 0000000..e027a26
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/quartz.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_quartz_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/registry.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/registry.properties.j2
new file mode 100644
index 0000000..f582684
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/registry.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_registry_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/worker.properties.j2 b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/worker.properties.j2
new file mode 100644
index 0000000..a008b74
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/package/templates/worker.properties.j2
@@ -0,0 +1,20 @@
+#
+# 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.
+#
+
+{% for key, value in dolphin_worker_map.iteritems() -%}
+ {{key}}={{value}}
+{% endfor %}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/quicklinks/quicklinks.json b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/quicklinks/quicklinks.json
new file mode 100644
index 0000000..8753004
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/quicklinks/quicklinks.json
@@ -0,0 +1,26 @@
+{
+ "name": "default",
+ "description": "default quick links configuration",
+ "configuration": {
+ "protocol":
+ {
+ "type":"http"
+ },
+
+ "links": [
+ {
+ "name": "dolphin-application-ui",
+ "label": "DolphinApplication UI",
+ "requires_user_name": "false",
+ "component_name": "DOLPHIN_API",
+ "url": "%@://%@:%@/dolphinscheduler/ui/view/login/index.html",
+ "port":{
+ "http_property": "server.port",
+ "http_default_port": "12345",
+ "regex": "^(\\d+)$",
+ "site": "dolphin-application-api"
+ }
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/themes/theme.json b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/themes/theme.json
new file mode 100644
index 0000000..953e232
--- /dev/null
+++ b/ambari_plugin-2.0.6/common-services/DOLPHIN/2.0.6/themes/theme.json
@@ -0,0 +1,661 @@
+{
+ "name": "default",
+ "description": "Default theme for Dolphin Scheduler service",
+ "configuration": {
+ "layouts": [
+ {
+ "name": "default",
+ "tabs": [
+ {
+ "name": "settings",
+ "display-name": "Settings",
+ "layout": {
+ "tab-rows": "3",
+ "tab-columns": "3",
+ "sections": [
+ {
+ "name": "dolphin-env-config",
+ "display-name": "Dolphin Env Config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "2",
+ "subsections": [
+ {
+ "name": "env-row1-col1",
+ "display-name": "Deploy User Info",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "env-row1-col2",
+ "display-name": "System Env Optimization",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "dolphin-database-config",
+ "display-name": "Database Config",
+ "row-index": "1",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "3",
+ "subsections": [
+ {
+ "name": "database-row1-col1",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "database-row1-col2",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "database-row1-col3",
+ "row-index": "0",
+ "column-index": "2",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ },
+ {
+ "name": "dynamic-config",
+ "row-index": "2",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "2",
+ "section-rows": "1",
+ "section-columns": "3",
+ "subsections": [
+ {
+ "name": "dynamic-row1-col1",
+ "display-name": "Resource FS Config",
+ "row-index": "0",
+ "column-index": "0",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "dynamic-row1-col2",
+ "display-name": "Kerberos Info",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ },
+ {
+ "name": "dynamic-row1-col3",
+ "display-name": "Wechat Info",
+ "row-index": "0",
+ "column-index": "1",
+ "row-span": "1",
+ "column-span": "1"
+ }
+ ]
+ }
+ ]
+ }
+ }
+ ]
+ }
+ ],
+ "placement": {
+ "configuration-layout": "default",
+ "configs": [
+ {
+ "config": "dolphin-env/dolphin.database.type",
+ "subsection-name": "database-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.host",
+ "subsection-name": "database-row1-col2"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.port",
+ "subsection-name": "database-row1-col2"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.username",
+ "subsection-name": "database-row1-col3"
+ },
+ {
+ "config": "dolphin-env/dolphin.database.password",
+ "subsection-name": "database-row1-col3"
+ },
+ {
+ "config": "dolphin-env/dolphin.user",
+ "subsection-name": "env-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphin.group",
+ "subsection-name": "env-row1-col1"
+ },
+ {
+ "config": "dolphin-env/dolphinscheduler-env-content",
+ "subsection-name": "env-row1-col2"
+ },
+ {
+ "config": "dolphin-common/resource.storage.type",
+ "subsection-name": "dynamic-row1-col1"
+ },
+ {
+ "config": "dolphin-common/resource.upload.path",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS || ${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/hdfs.root.user",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/data.store2hdfs.basepath",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.defaultFS",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === HDFS",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.endpoint",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.access.key",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/fs.s3a.secret.key",
+ "subsection-name": "dynamic-row1-col1",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/resource.storage.type"
+ ],
+ "if": "${dolphin-common/resource.storage.type} === S3",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/hadoop.security.authentication.startup.state",
+ "subsection-name": "dynamic-row1-col2"
+ },
+ {
+ "config": "dolphin-common/java.security.krb5.conf.path",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.username",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.path",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-common/kerberos.expire.time",
+ "subsection-name": "dynamic-row1-col2",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-common/hadoop.security.authentication.startup.state"
+ ],
+ "if": "${dolphin-common/hadoop.security.authentication.startup.state}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.enable",
+ "subsection-name": "dynamic-row1-col3"
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.corp.id",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.secret",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.agent.id",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.users",
+ "subsection-name": "dynamic-row1-col3",
+ "depends-on": [
+ {
+ "configs":[
+ "dolphin-alert/enterprise.wechat.enable"
+ ],
+ "if": "${dolphin-alert/enterprise.wechat.enable}",
+ "then": {
+ "property_value_attributes": {
+ "visible": true
+ }
+ },
+ "else": {
+ "property_value_attributes": {
+ "visible": false
+ }
+ }
+ }
+ ]
+ }
+ ]
+ },
+ "widgets": [
+ {
+ "config": "dolphin-env/dolphin.database.type",
+ "widget": {
+ "type": "combo"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.host",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.port",
+ "widget": {
+ "type": "text-field",
+ "units": [
+ {
+ "unit-name": "int"
+ }
+ ]
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.username",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.database.password",
+ "widget": {
+ "type": "password"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.user",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphin.group",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-env/dolphinscheduler-env-content",
+ "widget": {
+ "type": "text-area"
+ }
+ },
+ {
+ "config": "dolphin-common/resource.storage.type",
+ "widget": {
+ "type": "combo"
+ }
+ },
+ {
+ "config": "dolphin-common/resource.upload.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/hdfs.root.user",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/data.store2hdfs.basepath",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.defaultFS",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.endpoint",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.access.key",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/fs.s3a.secret.key",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/hadoop.security.authentication.startup.state",
+ "widget": {
+ "type": "toggle"
+ }
+ },
+ {
+ "config": "dolphin-common/java.security.krb5.conf.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.username",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/login.user.keytab.path",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-common/kerberos.expire.time",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.enable",
+ "widget": {
+ "type": "toggle"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.corp.id",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.secret",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.agent.id",
+ "widget": {
+ "type": "text-field"
+ }
+ },
+ {
+ "config": "dolphin-alert/enterprise.wechat.users",
+ "widget": {
+ "type": "text-field"
+ }
+ }
+ ]
+ }
+}
diff --git a/ambari_plugin-2.0.6/statcks/DOLPHIN/metainfo.xml b/ambari_plugin-2.0.6/statcks/DOLPHIN/metainfo.xml
new file mode 100755
index 0000000..5c8a3d1
--- /dev/null
+++ b/ambari_plugin-2.0.6/statcks/DOLPHIN/metainfo.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<metainfo>
+ <schemaVersion>2.0</schemaVersion>
+ <services>
+ <service>
+ <name>DOLPHIN</name>
+ <extends>common-services/DOLPHIN/2.0.6</extends>
+ </service>
+ </services>
+</metainfo>
\ No newline at end of file