2020-05-25 17:59:30 +08:00
### Instructions for using the Dolphin Scheduler's Ambari plug-in
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
#### Note
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
1. This document is intended for users with a basic understanding of Ambari
2020-06-30 11:02:25 +08:00
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
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
#### Installation preparation
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
1. Prepare the RPM packages
2020-04-30 19:36:08 +08:00
2021-04-16 22:56:51 +08:00
- 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 )
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
2. Create an installation for DS, who have read and write access to the installation directory (/opt/soft)
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
3. Install with rpm package
2020-05-21 19:09:11 +08:00
2020-05-25 17:59:30 +08:00
- Manual installation (recommended) :
2020-06-30 11:02:25 +08:00
- Copy the prepared RPM packages to each node of the cluster.
2021-04-16 22:56:51 +08:00
- Execute with DS installation user: ```rpm -ivh apache-dolphinscheduler-xxx.noarch.rpm```
2020-06-30 11:02:25 +08:00
- 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.
2020-05-25 17:59:30 +08:00
- 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
2020-05-21 19:09:11 +08:00
2020-05-25 17:59:30 +08:00
4. Copy plug-in directory
2020-05-21 19:09:11 +08:00
2020-05-25 17:59:30 +08:00
- 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
2020-05-21 19:09:11 +08:00
2020-05-25 17:59:30 +08:00
5. Initializes the database information
2020-04-30 19:36:08 +08:00
```
2020-05-25 17:59:30 +08:00
-- Create the database for the Dolphin Scheduler: dolphinscheduler
2020-04-30 19:36:08 +08:00
CREATE DATABASE dolphinscheduler DEFAULT CHARACTER SET utf8 DEFAULT COLLATE
utf8_general_ci;
2020-05-25 17:59:30 +08:00
-- 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
2020-04-30 19:36:08 +08:00
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'%' IDENTIFIED BY '{password}';
GRANT ALL PRIVILEGES ON dolphinscheduler.* TO '{user}'@'localhost' IDENTIFIED BY
'{password}';
flush privileges;
```
2020-05-25 17:59:30 +08:00
#### Ambari Install Dolphin Scheduler
2020-06-30 11:02:25 +08:00
- **NOTE: You have to install zookeeper first**
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
1. Install Dolphin Scheduler on ambari web interface
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_001.png)
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
2. Select the nodes for the Dolphin Scheduler's Master installation
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_002.png)
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
3. Configure the Dolphin Scheduler's nodes for Worker, Api, Logger, Alert installation
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_003.png)
2020-04-30 19:36:08 +08:00
2020-05-25 17:59:30 +08:00
4. Set the installation users of the Dolphin Scheduler service (created in step 1) and the user groups they belong to
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_004.png)
2020-04-30 19:36:08 +08:00
2020-06-30 11:02:25 +08:00
5. System Env Optimization will export some system environment config. Modify according to actual situation
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_020.png)
2020-06-30 11:02:25 +08:00
6. Configure the database information (same as in the initialization database in step 1)
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_005.png)
2020-04-30 19:36:08 +08:00
2020-06-30 11:02:25 +08:00
7. Configure additional information if needed
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_006.png)
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_007.png)
2020-04-30 19:36:08 +08:00
2020-06-30 11:02:25 +08:00
8. Perform the next steps as normal
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_008.png)
2020-04-30 19:36:08 +08:00
2020-06-30 11:02:25 +08:00
9. The interface after successful installation
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_009.png)
2020-05-25 17:59:30 +08:00
------
#### 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
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_011 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_011.png )
2020-05-25 17:59:30 +08:00
2. Add components -- the drop-down list is all addable
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_012 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_012.png )
2020-05-25 17:59:30 +08:00
3. Confirm component addition
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_013 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_013.png )
2020-05-25 17:59:30 +08:00
4. After adding DS Worker and DS Logger components
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_015 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_015.png )
2020-05-25 17:59:30 +08:00
5. Start the component
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_016 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_016.png )
2020-05-25 17:59:30 +08:00
#### Remove the component from the node with Ambari
1. Stop the component in the corresponding node
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_018 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_018.png )
2020-05-25 17:59:30 +08:00
2. Remove components
2020-04-30 19:36:08 +08:00
2021-04-16 10:56:48 +08:00
![DS2_AMBARI_019 ](https://github.com/apache/dolphinscheduler-website/blob/master/img/ambari-plugin/DS2_AMBARI_019.png )