diff --git a/hadoop/CDH/tasks/zeppelin.yml b/hadoop/CDH/tasks/zeppelin.yml index 6aeec9de..fe40c43f 100644 --- a/hadoop/CDH/tasks/zeppelin.yml +++ b/hadoop/CDH/tasks/zeppelin.yml @@ -18,6 +18,9 @@ args: creates: '{{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}' + - name: zeppelin wants to write into the conf directory + file: dest={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/conf owner={{ cdh_zeppelin_user }} group={{ cdh_zeppelin_group }} + - name: Install the zeppelin env file template: src=zeppelin-env.sh dest={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/conf/zeppelin-env.sh owner=root group=root mode=0444 notify: Restart zeppelin @@ -26,6 +29,10 @@ template: src=zeppelin_upstart.conf dest=/etc/init/zeppelin.conf when: ansible_service_mgr != 'systemd' + - name: Install the zeppelin systemd startup script + template: src=zeppelin_systemd.service dest=/etc/systemd/system/zeppelin.service + when: ansible_service_mgr == 'systemd' + - name: Ensure that the zeppelin service is enabled and running service: name=zeppelin state=started enabled=yes @@ -33,4 +40,4 @@ service: name=apache2 state=stopped enabled=no notify: Restart nginx - tags: [ 'cdh', 'zeppelin' ] \ No newline at end of file + tags: [ 'cdh', 'zeppelin' ] diff --git a/hadoop/CDH/templates/zeppelin_systemd.service b/hadoop/CDH/templates/zeppelin_systemd.service new file mode 100644 index 00000000..68b09de3 --- /dev/null +++ b/hadoop/CDH/templates/zeppelin_systemd.service @@ -0,0 +1,12 @@ +[Unit] +Description=Zeppelin +After=network.target + +[Service] +Type=simple + +User={{ cdh_zeppelin_user }} +Group={{ cdh_zeppelin_group }} + +WorkingDirectory={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }} +ExecStart={{ cdh_zeppelin_home }}/{{ cdh_zeppelin_dir }}/bin/zeppelin-daemon.sh upstart