Pricing SaaS Apps

Nicholas Firth-McCoy makes a really great point regarding the pricing conventions used today for SaaS applications. The question is Should customers be charged more for security?

Nicholas nails the answer right on the head with this remark:

However, I think we should draw the line at inventing "security features".

Imagine a service that offered you 'hashed passwords', 'encrypted credit card storage', 'backed up data' or 'up to date libraries' if you pay for their advanced plan. Not cool, right?

So why are we charging extra for SSL?

Go read it for yourself.

Links for 2011-07-19

Dependency error when trying to install Dropbox on Debian 6 (Squeeze)

I use Dropbox on all of my systems and while not very secure, Dropbox is a quick and easy way to backup and share files. I recently rebuilt a machine with Debian 6 to use it as a test server for some of the work I am doing on some web apps and when I tried to install the .deb package you can download from the Dropbox web site, I was getting this annoying error message that said Error: Dependency is not satisfiable: libnautilus-extension1 (>= 1:2.22.2).

On the site, Dropbox offers installable packages for the Fedora and Ubuntu distributions of Linux. Well, I am using Debian and Ubuntu, being a Debian-based distro, should be compatible, right? You would think so... Turns out that the issue is in a dependency in the manifest of the Ubuntu package, as the error message has already alluded to.

Technically, you could download the Dropbox source tar ball and compile it yourself, but what's the fun in that... I like to get to the bottom of things. I downloaded the nautilus-dropbox_0.6.7_amd64.deb package and when you try to install it using dpkg -i you'll get broken packages. That tells me that the problem was not with the dependencies themselves, but with the .deb manifest inside the package not specifying dependencies correctly. In order to fix this you will need to unpack the .deb file, change the dependency specification and then repackage it. Here's how you can do that:

  1. Go to the place where you download the Dropbox .deb file to. This is usually the Downloads folder inside your home directory.
  2. Create a new directory to extract the package to

    mkdir -p extract/DEBIAN
    
  3. Extract the files from the .deb package

    dpkg -x nautilus-dropbox_0.6.7_amd64.deb extract/
    
  4. Extract the control information (manifest) from the package

    dpkg -e nautilus-dropbox_0.6.7_amd64.deb extract/DEBIAN
    
  5. Open the extract/DEBIAN/control file with your favorite editor

  6. Find the dependencies line, which starts with the text Depends:
  7. On that line, look for the offending dependency spec: libnautilus-extension1 (>= 1:2.22.2)
  8. Notice the version number of this dependency. On my Debian 6 machine, the version of that library is 2.30.1. Notice that the Ubuntu package has a 1: prepended to the package version number in the dependency spec. To make it work in Debian 6 you will need to edit that to remove the 1: from the spec so that it looks like this: libnautilus-extension1 (>= 2.22.2)
  9. Save the file and exit your editor
  10. Create a new directory called build

    mkdir build
    
  11. Rebuild the .deb package by using the following command:

    dpkg-deb -b extract/ build/
    
  12. You will notice that a brand new .deb package is now available in the build directory you just created.

  13. Now you can install this new package by issuing the command

    dpkg -i nautilus-dropbox_0.6.7_amd64.deb
    

    while in the build directory.

You should now be able to use your Dropbox without any installation problems. While this problem solving exercise was fun, there is also an easier way to accomplish the same end result and that is to download the Dropbox source tarball and run the usual configure, make, make install trifecta.

Changing the hostname of a Debian server

I am doing web development using Python on a Linux environment and the plan for the final product is to be hosted at Linode.

As such, I want to setup a integration test environment that looks a little like the stuff at Linode and namely, the cheap VM specs that they offer. So I created a default VM in VirtualBox on my development workstation that looks like the Linode 512 VM. This default VM is a template whose purpose is to be cloned into other VMs and moved into the test server for execution. I will go into the software specs (what's installed in it) some other time.

Suffice it to say that moving the VM to the test server has 2 caveats that I haven't quite addressed in a graceful manner yet. One of the issues happens when I boot the new VM in the test server using the cloned VDI file and it loses the eth0 network interface. The other issue is related to the hostname of the VM and I will discuss this here today.

When I created the default VM on the workstation I chose the hostname change-hostname for it in an effort to thwart any inclinations of not changing such setting. I use debian-based operating systems exclusively and in the case of the VM, it is a Ubuntu server 10.04. In order to change the hostname in such machines, you need to follow these steps:

  1. Open the /etc/hostname file with your favorite editor. On Debian-based systems this file constains the hostname of the current machine.
  2. Delete the current name and change it to whatever you like
  3. Save the file and exit your editor
  4. Reset the hostname by running the following command:
    sudo /etc/init.d/hostname start
    

This is it... Pretty easy, but I want to automate it a little more; Too many steps to do manually.

Links for 2011-05-29

How to resize a VirtualBox VDI file

I am running Ubuntu Lucid on my workstation at home, but sometimes I still need to go back to Windows to get something done that I haven't quite figured out how to do in Linux yet. For that I am running VirtualBox on the workstation from which I spin up a Windows 7 VM.

I initially created the VM with 32 GB of hard drive space. That turned out to be too little and after the base Win7 OS and a few applications I was using over 15 GB. So I figured that I needed more hard disk space and I thought that I could just enlarge the pesky VDI file for the Win7 VM (it stands for Virtual Desktop Image and that's the default VM image file format used by VBox).

Win7 VBox VM Before Resize

Before

Well, it turns out that in nature you can't really pick up a hard disk, open it up, and throw in a new platter. In a virtual world, however, you get to play God and manipulate it any way you choose. All you have to do is clone and modify your original VDI file. Here's what you need:

  1. VirtualBox. Read this to install it on a Debian-based Linux distro.
  2. Windows 7... But any other OS ISO image or disk will do.
  3. GParted, the Gnome partition editor.

Assuming that you already downloaded the GParted ISO, installed VirtualBox and created some VM of which you want to resize the VDI file, here's how you do it:

  1. Open a terminal (we'll be using the command line for this).
  2. Find the VDI file you want to resize. This is usually under ~/VirtualBox VMs
  3. Now clone the VDI by issuing the following command:

    VBoxManage clonevdi Win7_64bit.vdi Win7_64bit_Larger.vdi
    

    Where the first file name is the input file and the second file name the output.

  4. Then resize the VDI (I grew mine from 32 to 64 GB):

    VBoxManage modifyvdi Win7_64bit_Larger.vdi --resize 65536
    

    Where the first parameter is the input file name and the resize parameter takes the new size in megabytes.

  5. In the graphical VirtualBox manager, create a new VM using the cloned and expanded VDI file. I would pay special attention to use the same setting as the original VM that you cloned from.

  6. Now boot the new VM using the GParted ISO image that you downloaded earlier. We will use it to resize the partition inside the VDI.
  7. On the boot screen you will want to choose to boot using the Live GParted instance. We will use it to resize the partition in the VDI.
  8. Once the live CD has booted up and the GParted application is running, select the partition you want to resize by clicking on it and then click the resize button.

    GParted Step 1

  9. Then select the handle at the end of the partition and slide it to fill up the entire unused space area. Click the resize button.

    GParted Step 2

  10. Next click the apply button on the GParted toolbar and watch the magic happen. Once done, click close and reboot the VM.

    GParted Step 3

  11. The first time you boot after performing the steps above, Windows will likely want to check the disk for consistency. Let it happen and Windows will reboot itself.

Win7 VBox VM After Resize

After

After this process, my Windows 7 VM was able to see a much larger drive. Let me know in the comments if you have questions or suggestions about how to improve this process.

VirtualBox on Debian-based distros

There is a really great write up on how to install and maintain the latest Oracle VirtualBox package on a Debian-based Linux distribution.

Here are the steps in a nutshell:

  1. Add a line to the /etc/apt/sources.list file:

    deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free
    
  2. Download and add the Oracle public key:

    wget -q http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -
    
  3. Install VirtualBox:

    sudo apt-get update
    sudo apt-get install virtualbox-4.0
    

That's basically it... Do refer to the link above for extra details and some caveats.