[GitHub] liuxunorg commented on issue #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands
liuxunorg commented on issue #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands URL: https://github.com/apache/zeppelin/pull/3313#issuecomment-466470641 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 } ``` 2. 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. 3. 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! :-) This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] monsieurp commented on issue #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands
monsieurp commented on issue #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands URL: https://github.com/apache/zeppelin/pull/3313#issuecomment-466381519 @liuxunorg: Thanks for your input. How about now? This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] liuxunorg commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands
liuxunorg commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands URL: https://github.com/apache/zeppelin/pull/3313#discussion_r259246967 ## File path: scripts/systemd/zeppelin.systemd ## @@ -0,0 +1,12 @@ +[Unit] +Description=Apache Zeppelin daemon +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=/opt/zeppelin-0.8.1-bin-all/bin/zeppelin-daemon.sh start Review comment: Perhaps you can add a script for `add_daemon.sh` to `zeppelin/bin/`. Use this script to generate the correct path to the `zeppelin.service` file in the `/etc/systemd/system` directory. But you need to pay attention to the following points: 1. You need to determine whether the execution user is `root` in `add_daemon.sh` 2. You need to determine the version of the operating system in `add_daemon.sh`, because the path of the `systemd` folder of different operating systems may be different. 3. You need to determine the version of the operating system in `add_daemon.sh`, because the `systemctl` commands may be different for different operating systems. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] monsieurp commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands
monsieurp commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands URL: https://github.com/apache/zeppelin/pull/3313#discussion_r259243463 ## File path: scripts/systemd/zeppelin.systemd ## @@ -0,0 +1,12 @@ +[Unit] +Description=Apache Zeppelin daemon +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=/opt/zeppelin-0.8.1-bin-all/bin/zeppelin-daemon.sh start Review comment: I have made this assumption very clear in the `README.md` file. Please have a look. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] monsieurp commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands
monsieurp commented on a change in pull request #3313: [ZEPPELIN-4004] add a systemd unit file to launch the Zeppelin daemon via systemd commands URL: https://github.com/apache/zeppelin/pull/3313#discussion_r259243161 ## File path: scripts/systemd/zeppelin.systemd ## @@ -0,0 +1,12 @@ +[Unit] +Description=Apache Zeppelin daemon +After=syslog.target network.target + +[Service] +Type=oneshot +ExecStart=/opt/zeppelin-0.8.1-bin-all/bin/zeppelin-daemon.sh start Review comment: Hi @liuxunorg! Thanks for reviewing. You are absolutely right: the directory in which Zeppelin files are to be installed can sit anywhere on the filesystem. I tend to install Zeppelin in `/opt` but that's just my personal preference. Of course, someone else may install Zeppelin in a different place and therefore, the path may not be `/opt/...` in this case. What do you suggest then? Because a path has to be specified in the systemd unit file. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services