Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands #3313

Closed
wants to merge 1 commit into from

Conversation

Projects
None yet
4 participants
@monsieurp
Copy link
Contributor

commented Feb 21, 2019

What is this PR for?

Here's a possible systemd unit file to control the Zeppelin Java process using systemd commands. Typically on a Ubuntu Linux server for instance. I've also written a very short README to get noobs started.

What type of PR is it?

Feature

Todos

  • Review code.
  • Merge.

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-4015

How should this be tested?

  • Install systemd unit file.
  • Test.
  • Report back.

Screenshots (if appropriate)

  • None required.

Questions:

  • Does the licenses files need update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? Yes. Written in a README file for the time being. Might need to write a lengthy documentation page if contribution is accepted.

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch from 0917e3f to c046c06 Feb 22, 2019

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Feb 22, 2019

@liuxunorg: Thanks for your input. How about now?

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch from c046c06 to 5a08736 Feb 22, 2019

@liuxunorg

This comment has been minimized.

Copy link
Contributor

commented Feb 22, 2019

  1. You need to determine whether the execution user is root, Because only root can copy files to /etc/systemd/system.
function check_user()
{
  if [[ $(id -u) -ne 0 ]];then
    echo "This script must be run with a ROOT user!"
    exit
  fi
}
  1. Need to determine whether the operating system is using systemd and systemctl for service startup (for example, debian 6 does not have systemd), Because there is no systemd and systemctl, executing the systemctl command will fail, so you need to give a prompt information.

  2. Combine the disable_zeppelin_systemd_service.sh and enable_zeppelin_systemd_service.sh files into one file (for example, zeppelin_systemd_service.sh), disable and enable by executing parameters, Would it be better?

Because not all operating systems use systemd for self-starting services. So maybe you can support the operating system with systemd installed first?
This is just my suggestion, See if other people have any opinions?
anyway, Thank you for your contribution! :-)

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch from 5a08736 to 7824f6a Feb 22, 2019

@felixcheung
Copy link
Member

left a comment

should this #3313 (comment) be in a doc or md file?

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Feb 24, 2019

@felixcheung I wondered about the same thing... :)

@zjffdu

This comment has been minimized.

Copy link
Contributor

commented Feb 25, 2019

We do need to doc for it. @monsieurp

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch from 7824f6a to 54112d2 Mar 3, 2019

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 3, 2019

Hi guys. Thanks for the feedback. I've added the needed and requested documentation. Please have a look and review. Cheers.

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch 2 times, most recently from d8f099c to b9edb46 Mar 3, 2019

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 5, 2019

@zjffdu @felixcheung: Hi guys! Can someone take a look at this PR? Cheers!

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 8, 2019

ping?

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 9, 2019

@zjffdu

This comment has been minimized.

Copy link
Contributor

commented Mar 13, 2019

@liuxunorg Could you help review it ? Thanks

@liuxunorg
Copy link
Contributor

left a comment

Because systemctl only supports centos, you need to check the operating system version.

Show resolved Hide resolved bin/zeppelin-systemd-service.sh
Show resolved Hide resolved bin/zeppelin-systemd-service.sh
ZEPPELIN-4015: add a systemd unit file to launch the Zeppelin daemon …
…via systemd commands.

Also write a shell script to manage the systemd unit file easily and
create a new documentation entry.

@monsieurp monsieurp force-pushed the monsieurp:ZEPPELIN-4015 branch from b9edb46 to 6ebfe55 Mar 15, 2019

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 15, 2019

@zjffdu @liuxunorg: PR updated with your suggestions. Please review.

@liuxunorg

This comment has been minimized.

Copy link
Contributor

commented Mar 15, 2019

LGTM, thanks for the contribution @monsieurp :-)

@monsieurp

This comment has been minimized.

Copy link
Contributor Author

commented Mar 16, 2019

Hi! Can this PR be merged now? @zjffdu @felixcheung?

@asfgit asfgit closed this in 393cb98 Mar 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.