Idea Farm Casting ideas to the wind to see what takes root

3May/120

SSH key forwarding

I recently built a new dev environment at work, based on DevCamps.  I made significant changes and customizations for our needs at Skullcandy.  As we've rolled camps out here and developers have adopted it, we've seen some common problems which are simple enough to fix but can be vexing to figure out.

The most common problem developers have run into is caused by they ssh keys not forwarding.  It seems that this is not set by default pretty much everywhere, which I find confusing.  So here are the first steps to ensure your ssh key is forwarding correctly:

  1. Make sure you are using an ssh agent to store and forward your keys.  This seems obvious if you understand ssh forwarding, but it is surprising that this doesn't happen automatically on some systems (like Mac OS X).  So you need to check to see if your ssh agent has your ssh key loaded.  Do this with this command:
    ssh-add -l
  2. You should see your ssh key(s) listed.  If not, then run:
    ssh-add
  3. Create or edit the file $HOME/.ssh/config on your workstation and make sure this line is present:
    ForwardAgent yes

This should get you forwarding your ssh key.  If you want to just forward your key on one connection only and not for all, then you can use the command line option to ssh to temporarily turn on forwarding, -A.  Like this:

ssh -A user@somehost.com

 

Tagged as: , No Comments
15Nov/110

Fast and easy way to send Apache logs to syslog

I keep forgetting how to do this and have to look it up every time, so I'm writing it down.  :-)

If you want to send Apache logs to syslog, it really is simple.  I'm talking about RHEL/CentOS/Fedora servers with standard packages installed.  Follow these simple steps:

In your Apache config where you set CustomLog, make that line look something like this:


CustomLog "|/bin/logger -p local1.info -t apache" combined
ErrorLog syslog:local1

Let's break this down and explain it....

19Jun/110

Yet Another Ubuntu Upgrade

So Ubuntu 11.04 was release a few weeks ago and I decided to upgrade this weekend.  In prep for the upgrade, I backed up my laptop onto my external portable hard drive that I may need (my home dir, and a few other things in /etc, some cronjobs, etc.).  I then did a clean re-install from CD.  In the past the ugrade-in-place has taken a long time, and was not completely problem free.  Whereas the last time I did a clean re-install it was pretty much problem free- except getting all my personal files/configuration/settings the way I like them all back took some time.  So that is the same approach I decided to take with this upgrade.

Its only been 2 days since I upgraded on Friday and I just remembered that the little LED on my laptop for wireless networking blinks  now as the default behavior.  Ugh!!!  So stupid.  I remember going bonkers about this last time.  However, the solution I used last time isn't going to work now since things have changed in the new version of Ubuntu.
So... this is how I fixed it this time.  I created a file in /etc/modprob.d/ called wlan.conf and added this one line to the file:
root@spencer-laptop:~# cat /etc/modprobe.d/wlan.conf 
options iwlcore led_mode=1
And then I rebooted, and BINGO!  No more flashing light for wireless!  Yay!  And the was much rejoicing.
10Aug/100

Recent Ubuntu kernel upgrade made my wi-fi led blink; drives me crazy

Recently, I got a normal update popup from my Ubuntu Update manager.  The update included a new kernel as well as other items.  I usually wait a few days on kernel updates because they can make some things break (like virtual box) and I'll need to do some manual fix-up work afterwards.
hp-compaq-8510w-wifi-led.JPG
So I did the upgrade and after I noticed something new and very annoying.  I use an HP laptop- Compaq 8510w, which has two led indicators for wi-fi.  They have always simply been on when my wireless is on, or off when it is off.  Never more than that.  Well, after the upgrade those leds started blinking according to my wireless usage.  At first I was like, "what the heck?  What did I do to make that happen?"  What ever it was, I was not pleased.  It was so distracting that I was thinking of covering up those leds with black tape.

I then searched on google for any one else with a similar problem and I found one.  Unfortunately I can't find it again right now, but the post I found mentioned the same latop and a similar problem but on Fedora.

11Jan/090

How to: Set up a few virtual servers on your desktop

This is an attempt at a how-to for getting a few servers up and running that can talk to each other as well as with your host desktop machine all with vitrtualization.  This has been a personal desire for some time and I have read documentation about how to do this and have tried multiple times, and every time it seems that the job is complex and error prone.  So this how-to will describe how I finally was able to get it working with almost no effort!  Yeah!

First of all, let's set the scene and give ourselves a goal:  We want to have a VM web server and a VM database server running on our desktop that runs a simple web application.  The two machines need to talk to each other.  And we want to be able to open our desktop web browser and access the web application running on these VMs.  And do all that without any complex configuration or breaking your desktop's network settings.

The first thing we will use in this setup is VirtualBox (http://www.virtualbox.org/)

4May/080

Software design patterns and excess

So this will probably be a first in a series of posts related to software design patterns and all my inner strugglings regarding what is hype and what is real.  There are probably lot of other people out there that may have similar strugglings, and more than likely there are some out there that are blissfully unaware of the concerns.  So what am I talking about?  Well let's start where I started a while ago, with ORMs.

ORMs (Object Relational Mappers) are a basically a way to have a OO layer between your application code and your RMDBS.  There are some basic "features" of an ORM, but not all ORMs support all of these.  In any case here is a list of common features:

  1. OO interface to tables, rows, functions, etc, in your database.  So you can use native application code and OOP to interact with your data.
  2. A more elegant/simpler API to interact with your database.  Many ORMs use some other database API under the hood, but add routines and interfaces (or simplifies calls) that the normal API lacks.
  3. Object (data object) persistence.  So that you can create an instance of some data you are modeling and then be able to store that object and revive it later with state preserved.
  4. Abstract the interaction between your application code and your database such that in the future if/when you need to move to a different database you application code will require as little change as possible.  Ultimately, changing databases should be a matter of configuration files, or perhaps even less work.  And your app code wouldn't even know the difference between Postgres, MySQL, SQLite, or something else.

3Mar/080

Microsoft Exchange problems

So a while ago at my work, "they" decided to move away from Zimbra and go with Microsoft Exchange.  The main points that made them want to switch were: 1) the calendaring/booking conference rooms/scheduling/sharing calendars didn't work very well in Zimbra and is "known to work in Exchange", and 2) email and calendaring for a large organization just needs to work.  Now- I must admit that this is my take on what has been going on, and I may be wrong here.  But, with that- my experience with Exchange has really sucked.  The points for moving to exchange are one-sided.

Exchange doesn't work well with free software.  Exchange is designed to work with Outlook, and no other client is even considered important.  They do claim to have IMAP support for other email clients, but Microsoft's IMAP seems to be unstable.  It continually has problems freezing up.  About 3-5 times per day the IMAP service on the Exchange server hangs and needs to be restarted!  Lame!  And so all Thunderbird users are stuck playing this "is my email working now?" game all the time.

The other thing is calendaring only works with Outlook clients.  Exchange doesn't support iCal/WebDAV or any other open standard.  So for calendaring we pretty much are forced to use the web interface for Exchange.  And the web interface for Exchange has two versions- a full featured one that only works on IE, and then a crippled one that is served to all other browsers.  LAME again!  So all the "features" of switching to Exchange are really only features for Windows users who use Outlook and IE.  If you use anything else, then your email and calendaring just got a whole lot worse!!

Zimbra did have some known bugs in their calendaring, especially in booking conference rooms for meetings.  However, I believe the folks at Zimbra have been working on that for their next release.  Email never was a problem with Zimbra for any user that I could tell- Outlook or Thunderbird or whatever.

But I'm not bitter.... yet.

3Jan/080

Hot Dang.

Well, I finally got Movable Type installed here and working.  I'm using Postgres as my backend.  I just wish my hosting service used a recent version (they are still on 7.4.x!).  But Postrges is still the best open source RMDB so there you go.  I would have probably chosen SQLite if I could just get the perl module installed (yet another issue with my hosting service).  I think for any small - mid size database work SQLite is a better choice than MySQL, and for anything larger than that chose Postgres.

I like Movable Type a lot.  It seems to be more intuitive than a lot of the other ones I have looked at and tried.  I will be moving my posts from my other blog to this one over the next little bit.

Filed under: Systems No Comments
2Sep/070

Linux Server Hacks by Rob Flickenger (O’Reilly)

book cover imageThis
book is awesome.  I learned so much from it that I have placed it
second on my list of books every software engineer should read.  There
are so many great topics covered in such a easy to read and understand
way that you can't help but want to try them out.  And after trying a
few out, you start to wonder how on earth did you live without some of
these things.  

There are a few books I have read that I really
got a lot out of, and this was one of them.  I was familiar with a lot
of the things discussed in here, but not at any great detail (at least
with some of them).  I even learned a thing or two with perl (imagine
that!).

2Sep/070

new site

So I finally was able to get the domain spencerchristensen.com.  It
was taken for a while by someone else, but when I check just a couple
of weeks ago, it was available.  So I am setting up my personal site.

I have had a personal site for years at  http://www.mecworks.com/~spencer
, but this has fallen dormant for a long time.  I hope to get back into
maintaining a personal site with this one.  I still don't have a lot of
free time to give to this, but hopefully I can at least give more that
what I have been doing.

Filed under: News, Systems Continue reading