puppet-kafka icon indicating copy to clipboard operation
puppet-kafka copied to clipboard

Systemd

Open paul-cs opened this issue 9 years ago • 8 comments
trafficstars

Hi there,

I was just about to give you all the stuff for systemd that I'd just created, but see that in the last 9 hours you have pushed your own stuff. Just a couple of things from my playing with your module.

To your systemd template you probably want to add: Environment=LOG_DIR=/var/log/kafka As other wise its going to default to . (thats buried in kafka_run_class.sh)

In class kafka::broker::service, before you create the systemd template you probably want to add:

    if $kafka::broker::install_dir == '' {
        $install_directory = "/opt/kafka-${kafka::broker::scala_version}-${kafka::broker::version}"
    } else {
        $install_directory = $kafka::broker::install_dir
    }

Which is what you do in the installer. And then change the execstart and execstop to:

ExecStart=<%= @install_directory %>/bin/kafka-server-start.sh <%= @install_directory %>/config/server.properties
ExecStop=<%= @install_directory %>/bin/kafka-server-stop.sh

Otherwise if the user changes the install location (like I did) it will all still work. Hope that helps.

Really like your module. Keep up the excellent work. Thanks. Paul.

paul-cs avatar Apr 07 '16 05:04 paul-cs

Hi, would you be willing to provide a PR with the changes?

bastelfreak avatar Apr 07 '16 08:04 bastelfreak

Hi Tim,

I possibly can. The problem is time at the moment. What I did the other day was for work. Generating a pull request isn't going to be covered by that.... I'll see what I can do.

On Thu, Apr 7, 2016 at 6:28 PM, Tim Meusel [email protected] wrote:

Hi, would you be willing to provide a PR with the changes?

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/voxpupuli/puppet-kafka/issues/58#issuecomment-206758271

paul-cs avatar Apr 08 '16 06:04 paul-cs

@paul-cs

About the logpath: It was always set to install-dir/logs, so by default to /opt/kafka/logs. So log4j (therefore kafka-broker) logs to that directory. /var/log/kafka was only used for startup logging (before log4j can take over)

bjoernhaeuser avatar Apr 09 '16 08:04 bjoernhaeuser

@paul-cs

I also do not understand your comment about the install-dir ;)

bjoernhaeuser avatar Apr 09 '16 08:04 bjoernhaeuser

I was playing against the version that is currently released. Therefore when I created the systemd template and tried to use install_dir I discovered it was always emtpy. The bit of puppet I pasted above was direct out of your puppet (the broker install class), where it checks and sets install_directory. If you have changed how it works then ignore what I had to say, I don't have time at the moment to go back and look through the current version.

paul-cs avatar Apr 10 '16 23:04 paul-cs

are there any future plans to support systemd?

confiq avatar Aug 23 '17 11:08 confiq

@confiq is the support missing? From reading this issue, it just deals with some implementation details, but the general support should be available.

ffrank avatar Oct 03 '17 00:10 ffrank

not really, it is supported very well!

confiq avatar Oct 03 '17 13:10 confiq