Monday, April 18, 2011

Open source POS terminal

For those of you who are unfamiliar with retail terminology, a POS is a point of sale. A term belonging to what is essentially a computerized cash register. A problem with running a small business is the lack of affordable POS software packages, the cheapest ones running in the $500-$1000 just for the software. For people like my client in this case, this is simply to much money.


In this case, the client runs a mobile vending service. He is a sort of convenience store on wheels, and currently....has no way to keep track of his inventory or for that matter ring up purchases for customers. Since he doesn't have a large variety of products, the need for a bar code scanner isn't really necessary....however since he already has one I will attempt to get it working with our POS. The only real requirements are an inventory management suite and a POS terminal, which for this application we will use squeeze and lemon respectively.


Since we aren't quite sure how this will work (it surely is something I have never done before) I will be installing Ubuntu 10.10 on a virtual machine and attempt to install lemonpos on that so we can see how it works.

The Installation
As with all open source projects, you can obtain the source code directly from the projects website (http://lemonpos.org) but in this instance to make it easier for someone who isn't so linux savvy, and also to make updating easier, I will use the snaptic GUI in order to install both Mysql which is required for running the database, and lemon (which squeeze is packaged with.)



As you can see, synaptic automatically marks the prerequisite packages.


At this point, I am going to go ahead and mark mysql-admin for installation as well. It isn't quite as powerful as commandline for doing msql operations, but it takes off the edge for less experienced users.

All thats left to do now is hit apply, and depending on how fast your internet is, grab a drink.



During the install, mysql installer will prompt you for your mysql root password, make sure you remember it. This will allow you to log into mysql and manage all of your databases. I already have mysql installed however, so I don't have a screenshot of it.

Once the install process finishes, don't start lemon or squeeze up yet. Neither of them will function properly without a database specifically designed to work with lemon. Thankfully, the lemon devs included a handy script in order to create said database. This script is locate
in /usr/share/kde4/apps/lemon/ . cSimply run the following commands

'cd /usr/share/kde4/apps/lemon'
'cat lemon_mysql.sql | mysql -u root -p'

This script will then prompt you for your Mysql password (the one you entered earlier) and create a databased populated with the basic lemonpos necessities (such as a default user account).



After this step is done, start up mysql admin and login to your server using the username root and the password you set earlier, the default address will work unless your database is on another computer.

From Open Source Thinking: A project log
When you login, you will be greeted by the mysqladmin main screen. The script we ran earlier automatically created a database and user account with proper permissions to access it. All we need to do here is change the password to something you will remember (via the users screen, edit the user "lemonclient"), and then close mysql-admin.



At this point our database is ready to go, and we can fire up squeeze (the lemonpos managment interface).


When you first start up squeeze, a prompt will prompt you (ironically) for your database info. If you ran the script included with lemonpos the username will be 'lemonclient' the password will be the one you set in mysql-admin and the default database option of 'lemondb'. After entering this information, just hit accept and login to squeeze with the username; admin and password; linux.


Once you login you will see the squeeze main screen, if the buttons along the top aren't grayed out then you installed lemon properly and should be able to use the main program (lemon) once you enter in some inventory.


Overall I am quite impressed with the whole package, It is simple and rather easy to use. I did run into a few problems that were mainly due to the nature of running things on a virtual machine (It didn't want to connect to a remote database through my NAT) but aside from that I can tell that it is a powerful tool. You can run as many POS computers off of the same database up to the number of connections to the database allowed. Just for fun, I cloned by virtual machine twice and had 2 concurrent transactions happen at the same time with the same item, and the database turned out just fine thanks to the way lemon works.

It probably isn't necesarry to go over the functions of adding/removing inventory and actually checking someone out because frankly.....its very self-explanatory.






Friday, April 15, 2011

Project #1. Computer imaging system


Currently, the only computer manager on the payroll is the IT administrator (my mentor). She is responsible for managing all computers, all but 1 server, and other technological systems. In addition to this she also teaches classes. On a lot of days, she doesn't even have the time to fix computers in classrooms. Needless to say, she doesn't have time to reinstall one windows computer....none the less 5 or 6. Currently there are anywhere between 5 or 6 desktop computers in classrooms that are currently inoperable, and many many more with viruses. Currently antivirus software is installed on most computers, but since there is no time for our IT person to dedicate a specific amount of time to each computer...


We have about 86 laptops and desktops total, 26 Dell Dimension E521, 50 ish (I dont have the list with me at the moment) Opteron 740s, 8-10 HP 5420s and 5410s and a few HP 620s (all of the laptops run the same OS and for the most part, the same hardware.


So, there are about 3 million industry solutions to manage problems like this......but there is this one thing...


Budget= $0

So, deep freeze, norton ghost, and all of the other industry standard solutions immediately get thrown out the window and we are back to square one.


There is good news, we have an IBM Eserver laying around. It has 2x 72.8gb 15k SCSI 320 drives, 3.6ghz hyperthreading Xeon processor, and around 8gb of ram. As far as a server can get, it isn't that shabby, so at least we have something REAL to work with.

So, what about that solution you were talking about?


Well, we have several problems:
  • Computers haven't be re-imaged in quite a while
  • Computers are currently loaded with factory bloatware
  • Antivirus software has been disabled by students/is out of date
  • Computers are very slow result of both viruses and bloatware
  • NO volume licensing for windows (Although we will try and remedy this at a later step)
But, we also have:
  • Our internal network is rather fast (for the most part, our internet is another story)
  • We only have 5 different variations of computers and operating systems

So, the solution.......
In this case, we chose to go with a PXE/TFTP server....specifically FOG (Free Opensource Ghost). If you are not familiar with PXE, it stands for Pre eXecution Environment. PXE allows you to boot a kernal via a TFTP (Trivial File Transfer Protocol) server, which then allows you do other things, such as in our case, deploy a pre-cloned image to our server via a NFS server. FOG can also do much more than that. Once FOG is loaded up and functioning, It can perform virus scans on the clients local hard drives, quick and low-level formats, even hardware inventory.....all without discs or flash drives or anything of that sort.

There is some client side setup however, all of the clients on the network need to have their BIOS configured so they boot from PXE first on every boot. On our Dell 740 and E521s, this is as simple as enabling PXE in the devices menu, and then moving the integrated NIC to the top of the boot device priority list. When you turn on the computer at this point, it will boot from the PXE server first....check if it has an active task (which is determined by MAC address) and then, if there is no task, it will boot to windows.

Here is how it works:
For a great guide on installing FOG, see their wiki....It is stuffed full of knowledge and was a very large help while deploying this project.

After your FOG setup is done, you need to create your images. This is a much more complex task, and I wont cover it in this article. But as always, Google is your friend, and there are many more sysprep tutorials out there than the average topic.

Thursday, April 14, 2011

Welcome

To introduce myself, I am 18. Currently attending ACC and persuing a certificat in information security. I have an A+ comptia certification, and a love for technology and a fascination with the way computers talk to each other.


I have done work on several websites in the past, the one I am the most proud of is my high school robotics team www.chaprobotics.com (I did not work on their current website) which was a Joomla! based (joomla is an amazing CMS by the way).



Currently I work at staples easytech as a level 2 tech and intern at the St. Francis IT department as what I would define as the "Co-administrator".


Just to give you a little background, I attended St. Francis in the 6th and 7th grade. I spent most of this time annoying the hell out of my computer teacher (who happens to be my mentor at this time) and the father of my girlfriend (who was my english teacher). Needless to say, I feel right at home for the most part.


While I plan on having this as a resource for people who want to know more about going into IT with a background in open source software, I plan on posting about my personal solutions as well.


My post may be short and sweet, but I hope that many of you find them informative.