I can never remember which switch does this for me without looking it up, so for safe keeping I’ll put it here. I frequently work on my side projects from work, and typically I need to access my @home resources from my work computer.

ssh -L <port.on.work.computer>:<my.home.computers.ip>:<port.the.application.at.home.is.running.on> root@<my.home.computers.ip>

I’ve recently been presented with several scenarios while developing under Grails that require application workflow decisions, and the most logical place to put these decisions has been inside the SecurityFilters class. The SecurityFilters class is extremely handy for doing things like redirecting based off of user role, and handling customer authentication, etc… But I’ve found a new use for it that makes the workflow dynamics of my web applications extremely streamlined. Continue reading »

Route all traffic through a SOCKS proxy…

ssh -D -C -q -f -N -l root

iptables -t nat -A OUTPUT ! -d -j REDIRECT --to 8080

I followed all of the rules… I did everything they told me to do… It even says that you can do this like normal GORM can…

A real simple structure:

package blah

class Author {
	String name
	static hasMany = [fiction:Book]
        static constraints = {

package blah

class Book {
	String title
	static belongsTo = [ author: Author ]

    static constraints = {

And from the example I tried…

import blah.*

def fictBook = new Book(title:"IT")
def nonFictBook = new Book(title:"On Writing: A Memoir of the Craft")
def a = new Author(name:"Stephen King").addToFiction(fictBook).save()

And I’m left with…

No signature of method: mongograilsquickstart.Author.addToFiction() is applicable for argument types: (mongograilsquickstart.Book)

This seems to just not work… Hit me up if you made this work, otherwise I’m gonna push a bug… dan@rhcedan.com

Even though we’re Red Hat people and would much prefer to use the Developer Studio for everything, sometimes we need to integrate into groups and teams who use Eclipse for development…

I jest (a little) about the Dev Studio, I am in fact a big time Eclipse fan — it is an amazing tool and is the de facto standard (would you take RC Cola over Coca Cola? didn’t think so…).

So, tonight I’ve fired up the new RELEASE verison of STS and plugged in the elite Groovy/Grails support… First impression: STS 2.6.0 is blazing fast… It’s really awesome. I like the new Groovy support a lot. In my 8-5, I use Eclipse 3.5 for development w/ nothing special on the Groovy end… The code completion and syntax highlighting in STS 2.6.0 is stellar and immediately worked great for a GRAILS 1.3.7 project. I’m happy :-)

EDIT: One huge fucking problem that I’ve found is that if I have compilation errors in my projects when firing up STS, it will crash… Not sure if this is due to some ghettoness in my configuration or if this is standard behavior, but not cool either way…

download the drizzle-jdbc package… here’s the maven repo

download the drizzle dialect (thanks to this guy)

create your tables based off of your grails domain classes…

setup your datasource, as such:

dataSource {
            pooled = true
            dbCreate = "update"
            url = "jdbc:drizzle://localhost:4427/database?autoReconnect=true"
            driverClassName = "org.drizzle.jdbc.DrizzleDriver"
            dialect = org.drizzle.hibernate.dialect.DrizzleDialect
            username = "root"
            password = ""

when you setup drizzle, it will let you connect as root with no password… i’ll post an update on how to add a user when i figure it out…

I manage a fairly large colocated file server for a small business who uses the site as a geographic dump location for video content that gets encoded and delivered to users on the fly through a web interface. The content is all hi-definition material and is unencoded in Transport Stream media format. They keep the content in this format so that they can dynamically serve an array of different encodings depending on the client’s preference. They have a desktop application that their clients can use to connect to the content delivery server and specify what encoding types, aspect ratios, and resolutions that they desire. Anybody who has ever worked with transport stream media knows how large some of these files can get when working with hi-definition content… Some of the files are 100GB in size. The content is typically advertising material for clients and needs to be able to be delivered fast to users across the globe. This is a pretty hefty requirement for a small business, so as a method of management, they decided to get a souped up colocated server located in Europe that will essentially mirror the production content server here in the US. This allows them to have near-real-time availability of content to their three or so clients located in Europe, and with a bonded dual gigabit connection, delivery also occurs in near real time. The idea is really a genius, homebrewed, poor man’s proprietary CDN, and I wish that I could take credit for having thought of the idea. Continue reading »

In a continuing effort to make my hosting cloud more dynamic, I have had to become relatively creative with my Apache configurations so that my farm can remain relatively flexible with little or no reconfiguration on newly introduced servers. This presents a big problem when working with a multi-site Apache configuration, and an even bigger problem when SSL certificates are involved. As many of you probably already know, you need to have one network interface (virtual or physical) dedicated to a particular domain SSL certificate. It’s easy enough to grab a wildcard SSL certificate from GoDaddy and bind a single network interface to all subdomains, but when you have a farm configuration where you’re hosting multiple domains from the same web servers, then you’ll need to have a dedicated NIC for each wildcard domain SSL certificate. That’s ok, we can handle this by creating virtual NICs (eth0:1) and giving them their own IP address, and Apache is none the wiser. But, this is where our Apache configuration starts to become a problem. With Apache, we know that we can listen by IP address, but not by interface, so in order for us to keep a common configuration between all of the servers in our farm, we’ll need to figure out a way for it to be able to dynamically handle binding when the IP address is not statically defined. Continue reading »

Recently, I have found that there is a great deal of need to have the ability to flexibly and non-service-interruptingly (yeah, it’s a fake word) migrate an existing PV that resides in a LVM2 volume group to a new PV that is presented to a server. In an effort that I recently undertook, I was tasked with migrating a 2.0TB SATA LUN to a 2.5TB FC LUN. This is an easy enough request to fulfill, so why the importance of this you might ask? Well, the 2.0TB SATA LUN was hosting the data files for a production Oracle database that requires 99.999% uptime (actually, this is a by-law requirement for financial institutions in some states — and for my luck, this was the requirement for me as well). So, to the drawing board I went… Continue reading »

As Linux Administrators, it is inevitable that we will get a request to grow an existing filesystem for one reason or another. The lazy administrator will take the easy way out and attach a secondary disk to the server, pvcreate it, and add the extra extents to the existing logical volume. This is actually a fairly safe way to do it, it can be done online, and the end result is the same for the user. That makes it a really appealing prospect to do things this way, but it is really dirty, and what do you do if that second (or third, or fourth, …) disk in volume group fails? Then you’re screwed. Continue reading »

© 2013 Dan's Blog Suffusion theme by Sayontan Sinha