Lennart Koopmann

{ :blog => true }

Tag Results

2 posts tagged ruby

Release build script for Graylog2

I wrote a shell script that lets me easily create new Graylog2 releases. It bundles Rails with all required gems, configures the release, works on some files and creates a nice .tar.gz package I can test and upload as release.

lennart@sundaysister:~/workspace/graylog2-web-interface/build$ time sudo ./build_release.sh 0.8.2
BUILDING graylog2-web-interface-0.8.2
Copying files ...
Configuring release ...
Freezing Rails and gems ...
Building Tarball ...
DONE! Created Graylog2 release graylog2-web-interface-0.8.2 on Thu Jul 29 21:05:17 CEST 2010

real    0m7.105s
user    0m5.800s
sys 0m1.200s

The script source is available in the graylog2-web-interface GitHub repository: http://github.com/lennartkoopmann/graylog2-web-interface/blob/master/build/build_release.sh

MongoMapper/Rails: Connect to a MongoDB database with username and password

MongoMapper is a great project but missing a lot of documentation in some core parts. I wanted to find out how to connect to a MongoDB instance that requires authentication and this is how I did it:

First step: Adding a new section to your database configuration

# config/database.yml
mongodb:
  hostname: localhost
  database: graylog2
  port: 27017
  authenticate: true
  username: graylog2user
  password: graylog2pw

Read More