FreeBSD and FreeNAS in Business by Randy Westlund

My father owns Charlotte Tent & Awning, a small business with about 30 employees, selling canvas and metal awnings to a wide variety of customers, from homeowners to massive shopping centers and sports stadiums. I’m going to tell you how FreeBSD and FreeNAS came to play a critical role in his business.

Background

In the awning business, every awning must be custom-made to the dimensions of the building where it will be installed. There are also fabric and logo choices by customers that must be exactly right.

When contacted by a customer, the first step is for a salesman to visit their home, show fabric samples, and take measurements. If the customer decides to make the purchase, the work order is submitted by the salesman to the fabrication department, which welds together a frame, sews the fabric, and staples them together.

Once fabrication is complete, the installation department schedules a time to bring the awning to the customer’s home and install it.

The whole process takes about four weeks, which means there are many active orders at any time. To complicate matters, there are sometimes modifications to an order partway through fabrication, times when they must wait for another company to ship them special fabric or parts, and special paperwork to handle for commercial or out-of-state jobs.

Keeping track of all ongoing jobs and making sure everyone has the most up to date information can quickly become a logistical nightmare. Any mistakes or miscommunications are very costly.

The Old Way

They used to manage most of this on paper. Photocopies of hand-written orders were distributed to everyone’s physical mailbox, and any questions had to be run through the salesman responsible for the job. Outdated copies of orders were a problem, and the salesmen spent a lot of time coordinating.

Quickbooks handled billing. For photos of completed jobs, spreadsheets of all current jobs, and general status management, they used Dropbox and Microsoft Excel. This came with a number of problems:

  • There were frequent conflicts when someone forgot to save their changes.
  • Whenever someone added a photo to the company Dropbox account, it was uploaded to Dropbox, then downloaded 15 times in parallel to the other computers in the office, which caused bandwidth problems.
  • It was difficult to keep the information in Dropbox and on the printed work orders consistent.
  • Customer and job information had to be entered in multiple locations.

Complicating the internet situation was the fact that their consumer-grade router would reboot several times a day for no discernible reason.

Looking for Solutions

This is when my dad asked me for suggestions. He said that as they’d been growing, this had become less manageable. They needed something new.

At first, I looked at off-the-shelf solutions. I found a number of cloud services that were like Dropbox, but with some generic management stuff layered on top. Not only did these all feel like a poor solution, they were very expensive. If the provider were to go out of business, what would happen to my dad’s company?

Being an engineer, I got frustrated with trying to put a square peg in a round hole and decided to write a system myself.

The Right Solution

I went through several iterations and had frequent meetings with the management staff, but we finally nailed down exactly what was needed.

I defined data models for customers, awnings, and jobs, and wrote a RESTful API with Nodejs, Express, and MongoDB (I now regret not using PostgreSQL, but that’s a story for a different time).

I wrote the client-side app in Angularjs, with Bootstrap CSS and a mobile-first design. I plugged in Google OAuth so I didn’t have to manage passwords, and gave each employee an account with varying permissions (e.g. an installer can’t see any financial data).

The End Result

So what does it look like now?

  • All employees can view the status of all jobs, right from their phone, even when they’re on the road; no more calling the salesman with every little question.
  • Every department can update a job with their status; no more situations where two people were both waiting on each other.
  • Job records are always up to date, because they’re all stored in the same database.
  • Every job has a version number, so it’s easy to follow the most recent information.
  • Customer information only has to be input once; no more handwriting.
  • Salesman can auto-generate PDF forms; no more misreading sloppy handwriting and no more time wasted photocopying handwritten notes.
  • The server does price and tax calculations automatically.
  • There’s no dependence on some other company to stay in business.
  • Viewing the data on a phone integrates with Google Maps; no more printing out directions.

The Infrastructure

Fortunately, sourcing the hardware and setting up the OS was the easiest part; I talked to iXsystems. I ordered a FreeNAS Mini and a nice workstation tower, which were less than $4k, including hard drives and OS setup.

I had to fly to Charlotte to install the servers, so I scheduled a few days to make sure I could install everything and train the employees on the system I’d created.

The servers were waiting for me when I arrived, and I got to work. Unboxing stuff from iX is very nice. Everything was super padded, the hard drives were already screwed into the trays, and the trays were labelled. I literally just had to slide the drives in and power the servers up. The OS was already installed and the drives were ready with the ZFS configuration I requested.

I installed my database/web software on the tower server (r2d2, because it does the number crunching) and added shares for office personnel on the FreeNAS Mini (c3po, because of Samba shares and human interaction). And yes, I realize I named the tall skinny one r2d2 😛

I have r2d2 replicating ZFS snapshots to c3po, and the data is backed up off-site regularly. This data is absolutely mission-critical, so I can’t take any risks. I’m glad I have ZFS on my side.

I replaced Dropbox with Samba on c3po, and the Windows machines in the office now store important data on the NAS, rather than their local drives.

I also replaced their router with an APU board running pfSense and replaced their PPTP VPN with OpenVPN and certificate authorization. Then upgraded the ancient 100 Mbit switch with a 1 Gbit model.

Because the server setup was already done for me, I finished with an entire day to spare.

Shortly thereafter, I recreated their company website with a mobile-friendly design, hosted in another jail on r2d2.

Looking Back

This setup has been in place for several months, and everyone is delighted with it. There are no more networking problems, fewer miscommunications, and much less time spent coordinating work. Efficiency is way up.

FreeBSD (in three different incarnations) helped me focus on improving the company’s workflow without spending much time on the OS. And now there’s an awning company that is, in a very real sense, powered by FreeBSD.


publicpreview-1.phpBio: I’m an engineer and open source advocate living near Cambridge, MA. I do a lot
of freelance work and work from home most days.

My areas of focus include electronics, PCB design, microcontrollers, robotics,
Linux, BSD, system administration, web design, and RF communications.

I’ve been to Antarctica twice, doing satellite communication work for NASA.

I’m a licensed amateur radio operator, callsign KK4DOP.

In my spare time, I enjoy hiking, photography, and running BSD servers on
computers other people throw away.

Source TextPlain

Twitter @randy_westlund

LinkedIn Randy Westlund


Let us know, what do you think about the article in the comments down below!

2 responses on "FreeBSD and FreeNAS in Business by Randy Westlund"

© HAKIN9 MEDIA SP. Z O.O. SP. K. 2013