yahoo / CMAK

CMAK is a tool for managing Apache Kafka clusters
Apache License 2.0
11.84k stars 2.51k forks source link

Documentation Request - How to install #5

Open spuder opened 9 years ago

spuder commented 9 years ago

It would be nice if the readme had a basic overview of how to quickly get up and running with kafka-manager.

ghost commented 9 years ago

pretty easy - I had a tough time with sbt stuff at first because of my firewall. Once I got that sorted I ran into another issue as I had another process listening on the default port 9000... In summary this is what I did:

git clone https://github.com/yahoo/kafka-manager.git sbt clean dist unzip ../kafka-manager/target/universal/kafka-manager-1.0-SNAPSHOT.zip to wherever /opt/kafka-manager-1.0-SNAPSHOT/bin/kafka-manager -Dhttp.port=9002 ( i had to use 9002 because of the conflicting port) then open the browser to :9092 and you are good

spuder commented 9 years ago

Thanks, that worked for a quick proof of concept. How would you set this up in a web server that could be used in production?

(Start automatically, log to file, ect..)

mchesler commented 9 years ago

I'm currently working on adding the sbt-native-packager plugin to generate an installable RPM that will provide wrapping like what you're looking for

spuder commented 9 years ago

That would be great. Currently I we use ubuntu, so a .deb would be nice. 'pleaserun' could make this a lot easier.

https://github.com/jordansissel/pleaserun

prune998 commented 9 years ago

maintaining .deb and .rpm is a waste of time. Build , unzip and you're done...

mchesler commented 9 years ago

@spuder no worries -- the sbt-native-packager plugin will generate deb packages as well.

spuder commented 9 years ago

My goal is to install this with chef or run in a docker container. Packages would make this easier.

patelh commented 9 years ago

Yahoo has its own package manager so we build components differently and so we pointed everyone to the Play Framework documentation for deployment. We'll look into the native packager and add more documentation.

spuder commented 9 years ago

This issue can be closed once 3026f52 is merged in. I'd like to continue the conversation about packaging in issue #18

rvantassell commented 9 years ago

@prune998 - For those of us who maintain large environments and infrastructure (often with puppet, or similar), the RPM and DEB packages are much simpler than ZIP files. (ie. generally due to other repository management tools also in-use)

prune998 commented 9 years ago

I do maintain large envs (using Ansible, really great, try it :) )

What I see is : using the repository of the distrib:

This will require a "playbook" or RedHat style, one for Debian style, one for BSD style... and if you install it directly from the package (not using a repo), you kind of "break" all the useful things of the package system.

or you can :

If you then add the overhead for the devs to build packages and maintain a repo for every distrib....

Well, I will not be the one maintaining all this, but I seriously it have to be taken in account. On my side, a good config script and startup script would be a far better invested time for the devs.

rvantassell commented 9 years ago

Except @prune998, there's rpmbuild... once the spec file is built, building the RPM is no more difficult than creating the zip file; I'm not asking them to maintain a full repository... that's kind of insane (though I bet folks at Yahoo know how to do that, already).

On "our" side, there's just puppet... or simply (bare minimum, though this is not good/great puppet) . Read: Please don't actually try to use this, as there are better/cleaner and more complete ways to do this sort of thing... even though it'll "probably work." (YMMV)

class kafka-manager {
  package { 'kafka-manager':
    ensure => latest,
  }

  file { '/etc/kafka-manager.conf':
    content => template('kafka/kafka-manager.conf.erb'),
    owner   => 'root',
    group   => 'kafka-manager',
    mode    => '0640',
  }

  user { 'kafka-manager':
    ensure => present,
    shell => '/bin/false',
  }

  group { 'kafka-manager':
    ensure => present,
  }

  service { 'kafka-manager':
    ensure => 'running',
    enable => true,
  }

  User['kafka-manager'] ->
  Group['kafka-manager'] ->
  Package['kafka-manager'] ~>
  File['/etc/kafka-manager.conf'] ~>
  Service['kafka-manager']
}

Edit: Better line breaks in example puppet manifest.

udhayamgit commented 7 years ago

Anyone can tell me How to run this service in windows 10 , I'm getting the below exception C:\kafka-manager-master\target\universal\kafka-manager-1.3.3.14\bin>kafka-manager -Dhttp.port=9002 The input line is too long. The syntax of the command is incorrect.

cyrillesaxo commented 7 years ago

Answer for @udhayamgit
you will get that exception when the path is too long on windows. Solution: you need to move the directory to a shorter directory. For example move it to c:/

chuttipayan commented 6 years ago

Even removing the version helped solve the problem of input path being too long

simonalexander2005 commented 2 years ago

I still have the issue with input line too long. To resolve it, I edited the .bat file and changed the line where "APP_CLASSPATH" is set, to the following:

set "APP_CLASSPATH=%APP_LIB_DIR%\..\conf\;%APP_LIB_DIR%\*"