RSS Feed

OSS Ramblings

http://www.ossramblings.com/taxonomy/term/16

 

linux

Why Do Companies Do That?

The Linux Foundation has announced a new job posting website dedicated for Linux. That's right - people get paid to work with Linux.

But, why do companies do this to themselves? The listings include things such as one for a "Director of Technology" that states "you should be comfortable with OO Perl, databases (especially MySQL), ORMs such as DBIx, etc." or one requiring "Strong Scripting skills, Perl or Korn Shell."

Others state you must be conversant in "ASP.NET", "MS SQL 2005 / 2008" and "Active Directory" though I'm unsure why anyone wanting to hire a Linux person, where the best ones traditionally will be very anti-Microsoft, would need those skills. Perhaps the poster missed the fact that the domain name ended with "linux.com"

The biggest thing that jumps out at me is how many of the job postings required expertise in obscure or outdated technologies. I'm sorry, but I lump Perl in with that bunch. There has to become a point at which it's easier to build from scratch a version 2.0 of whatever it is that you do, than to try to continue to maintain 150,000 lines of Perl code even when integrated with DBIx. Languages like PHP and even Python allow developers to write cleaner, easier to read code in half the time.



Tripwire and Emailing Reports

I've used tripwire for years, but since I rarely configure it I always have to read back up on some of the tutorials I have on how to properly set it up.

One thing that almost every tutorial misses is how to actually make Tripwire email reports when run. They all cover where to put the email addresses and settings, but most skip how to actually trigger that to happen. You must use a specific command line argument to cause Tripwire to send the actual report.

So, here it is for future reference:

tripwire --check --email-report


My New Photo Manager

I finally found the photo manager for me to use in Linux. I'd tried all the major apps, but none of them worked properly with the Olympus .orf raw format. Even the leader, FSpot, wouldn't display the images. It relies on an embedded JPG thumbnail inside the raw image, but my Oly camera doesn't put that image there.

I had originally started working on writing my own in Python, but I haven't really had the time to dedicate to it. I had heard about an application called GQview, but it turned out that it wouldn't display my raw images either.

Then I heard about Geeqie Viewer which is a branch off of the GQview program. GQview hasn't been actively developed in some time, so in the true open source tradition someone took the original source and revamped it while adding new features.

If you're like me and want to access a library of photos on multiple computers possibly from thumbdrives, DVD or external hard drives, going with a program that keeps it's own internal database just won't work. Geeqie allows you to just use folders for organizing your photos, while giving you the ability to still add keywords and comments.



This is the Way to Admin

Our receptionist PC motherboard was dying, so I threw together a new $400 PC from a barebones MSI box, an enterprise-grade HD, a Celeron 64 bit CPU and 4 GB of RAM. Simple and easy.

Restoring the PC to operational status was very easy because of the PXE boot setup, our Puppet installation, and the use of Duplicity for backups.

I simply booted the new hardware (note the lack of DVD, CD or floppy drive) from the network, picked to install Ubuntu 64 bit and gave it the same hostname as her old PC. Then I walked away. Literally only 10 minutes from unpacking until the PC was installing it's OS unattended.

I came back about 20 minutes later to a newly installed OS with all updates and patches already applied. Then I just ran a single duplicity command line to restore the home directory from the backups and voila!

Yeah, Linux network administration is awesome.



Linux Network in a Box

After having finished implementing Puppet on our network to simplify management and deployment, I started wondering...

Puppet allows you to set up a series of recipes designed for application deployment on your network. Once you have a batch of recipes, you simply assign those to specific hosts and puppet will do the hard work of making sure everything is installed and configured per your scripts. It takes a bit more work on the frontend but it adds the comfort that you have better documentation, you can easily use version management to archive how all of your machines have been configured, and it makes deploying similar setups or disaster recovery a breeze.

So I started wondering - how long until some vendor sells a Linux "network in a box" for small businesses? I'm thinking a small "cube" computer with Linux preinstalled that has PXE boot, preconfigured LDAP, a nice interface for adding machine accounts and a series of prefab puppet scripts.

Throw a little gem like that online, tell it the names you're going to use for various computers on the network, specify what services each of those computers will run (i.e. LAMP, LDAP Replication, Postfix, Desktop, etc.) and then PXE boot + install workstations and servers automatically.



Making OpenVPN Route Both Ways With TUN

You may recall this article from last February where I described how to set up an OpenVPN server in Ubuntu.

One thing that's bothered me ever since that day is that the client could contact everything on the server's network but not vice-versa. I searched for answers for quite some time and finally gave up.

I just stumbled on the answer, and it's a really easy solution to the problem. I'm already using custom client configs, and there's only one client that I wanted dual routing with - our accounting office in Virginia.

Here's a few assumptions. Let's say the primary network with the OpenVPN server uses 192.168.1.0/24. The OpenVPN client network that's going to keep a constant link is using 192.168.2.0/24.

In the server's "server.conf" file you need the following two lines:



Preseed Answers for apt-get install

Today we are continuing to polish off how to do unattended installs of Linux.

Yesterday I covered how to run a bash script after a kickstarted installation to do any additional setup that isn't handled by the Kickstart file.

Installation of some packages require user input, which breaks the entire concept of "unattended" installs. Here's a quick fix to get around that.

First, on a setup computer, install the following:

sudo apt-get install debconf-utils

Now, install whatever packages you wish to later install in an unattended mode. Answer the questions for installation appropriately when prompted. Next we will export those answers into a "seed" file that we can use when installing the package on a new machine. For instance, I've installed several ldap authentication packages, so I might want to grab all of the settings those packages ask for.

sudo debconf-get-selections | grep ldap > ldap.seed

If you remember from yesterday, we created an archive that included a setup script and several config files. Place the ldap.seed file inside that archive along with the other scripts, and just before doing the apt-get install add the following line to the add2network.sh file:

debconf-set-selections ./ldap.seed


Automatic Configuration of Linux Desktops

In yesterday's post I described how to install Linux over the network. Now I'm going to polish that off with a bit of post-install scriptery that does a bit more customization.

This part of the tutorial makes use of several different concepts to provide a customized install experience. First is the use of LDAP authentication on the domain. Your network may or may not use this. If you aren't already authenticating with LDAP you'll want to adapt this tutorial to your needs. Next is the use of the new user "Skeleton" configuration where you can place items that are automatically copied into a user's home directory the first time they log in. Last is using the rc.local file to run a script in such a way that it only runs the first time the computer is booted. This could be adapted to ask for the name of the computer during that step or other things to allow even more customization during install. A common practice instead of using a bash script like I did is to use a Python script at this point to allow for a more pleasing and customizable setup.



Deploying Linux Desktops Over the Network

If you are trying to run an enterprise in Linux, one of the key components needed is a way to automatically deploy and configure Linux on the desktop. With this you can also make a memory test utility available over the network.

Enter LinuxPXE.

With LinuxPXE and Ubuntu you can easily push desktop installs out over the network to computers without CD drives, and have it preconfigure most of your common settings.

You'll need the following components on a server:

tftpd-hpa  (TFTP Server)
A DHCP Server
An Ubuntu Jaunty Alternate CD ISO Image file

Notice I said "tftpd-hpa" - the openbsd-tftpd server will not work for this.

You'll also need an Ubuntu Jaunty desktop with:

system-config-kickstart

I'm going to assume a rather high level of network design knowledge in this and not tell you silly things like "you can only have one DHCP server on the network at a time" - wait, I just told you that. Anyway, if you aren't already familiar with configuring an Enterprise grade network then this may go a bit fast for you.

TFTP

First, configure your TFTP server. You must edit /etc/default/tftpd-hpa to enable it:

#Defaults for tftpd-hpa
RUN_DAEMON="yes"
OPTIONS="-l -s /var/lib/tftpboot"

Now start it with:



Running IE7 in Linux

As a web developer, you need to be able to test multiple browsers. As a Linux web developer, it can be hard to do that without having a Windows machine around.

With the latest edition of Wine (Windows emulator for Linux) it's not that hard to do. There are a couple of downsides, like transparent images sometimes don't render properly, and there's a bit of a problem with the background around the control buttons, but it works and it renders pages using IE7, which is the entire point, anyway. The biggest downside is the lack of HTTPS or SSL support.

I'm going to make the assumption you are using Ubuntu Jaunty, so you might need to adapt a few things if you aren't.

First, I'd recommend using the latest edition of Wine, instead of the one packaged with your system. This is especially important if you plan on running any recent games in Wine. You can compile your own copy from the sources, or just use the provided repositories from winehq. The package provided with Ubuntu is very old in Internet days, so I don't recommend using it.



 
 
 




Image 01 Image 02 Image 03