githubzhangchunyang commented on a change in pull request #1970: Add ambari 
plugin #1469
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/1970#discussion_r380442120
 
 

 ##########
 File path: 
ambari_plugin/common-services/DOLPHIN/1.2.1/package/scripts/dolphin_alert_service.py
 ##########
 @@ -0,0 +1,44 @@
+# -*- coding: utf-8 -*-
+
+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), 
user=params.dolphin_user, sudo=True)
+
+    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)
+        start_cmd = format("sh " + params.dolphin_bin_dir + 
"/dolphinscheduler-daemon.sh start alert-server")
+        Execute(start_cmd, user=params.dolphin_user)
 
 Review comment:
   OK! I will

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to