Hacker News new | ask | show | jobs
by antoncohen 5247 days ago
I really appreciate the hard work you have done, like I said, it is something I want, and I haven't put in the effort to do it. I know how annoying it is to log JSON, I made a tornado app the logged JSON through the logging module, and it was really annoying that the logging Formatter pickled objects into strings.

I'm not sure what the issue is with MongoDB. But if you aren't aware there is the EPEL (Extra Packages for Enterprise Linux) repository for RHEL and CentOS. It's a semi-official and safe repository run by the Fedora Project to add addition packages to EL. MongoDB is in there for EL5 (pretty old) and EL6. Also, easy_install is available for Red Hat and Debian in the 'python-setuptools' package.

I know it's common for people to install things form source on their own systems, but I feel that if you are doing something on someone else's system you need to extra careful. And that means ask permission before installing, use package management, and if you can't use package management suggest ways to resolve the dependencies (easy_install, pip, gem) without actually doing it. See the Homebrew install script as a good example (https://gist.github.com/323731). Another thing is following convention. The way you are using /usr/local is how /opt is supposed to be used. If you use /usr/local the files should be in /usr/local/{bin,etc,lib}. If want to create a package directory and have things like 'bin/' in it, use something like /opt/amon/{bin,etc,sbin,var}. http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html

Jordan Sissel, who created logstash, also created fpm (Effing Package Management) (https://github.com/jordansissel/fpm). It makes it easy to package things. It might help avoid bash script hell.

Create an rpm from the files in /tmp/install:

  fpm -s dir -t rpm --name amon --version 0.2.0 --depends mongodb --maintainer "Martin Rusev" -C /tmp/install etc/init.d/amon etc/init.d/amond opt/amon
Create a dep of tornado from pypi:

  fpm -s python -t dep tornado
1 comments

Thanks for pointing out fpm. It looks really neat. Also with the Homebrew example, you made me realize that I don't need the bash installer at all ( It's extremely hard to maintain and extend, but that's the default convention - one line Unix installers have to be in bash script). Python and Ruby are perfect scripting languages, so the next installer will be in one of those languages with more options for the user.