Building a Foundation

I am putting some serious efforts behind learning to program.  I selected Python as the language to learn, simply because there is a tremendous amount of community support and free tutorials for the language and its associated libraries.  More importantly, there is an awesome how-to guide available [LINK] on how to use Python with a Raspberry Pi to build a temperature controller for my brew setup.  I am using this as my main motivation to continue my Code Academy courses.

Being that this is not my first attempt to learn to code, I trying to build a solid foundation of understanding for each step of the process towards building this controller, and even this blog itself.  I am quickly realizing that the better I understand the underpinnings of what my code is controlling, the more the terminology conventions of the code itself make sense.  I have spent more time reading, installing, and troubleshooting than I have actually learning Python.  The experience has been rewarding nevertheless.

My first goal is to broadcast my brewing temperatures in real time from the Raspberry Pi interface through my own web server.

I want to go through this in painstaking detail to recap my own thoughts, and on the off chance that someone else wants to figure this out on via this post. I should also mention that much of what is to follow has been put into terms that make sense to me.

Challenge #1:  Shared Hosting

Shared hosting is essentially rented space on a someone else’s server.  You can host a website from the server space, run a database with all of your information, even create multiple domains and sub-domains from the same rented space.  Sever resources, such as memory, processing power, and bandwidth are all shared.  One server is shared by multiple accounts.  So, if one of the other “renter’s” websites are using a bunch of said resources, the performance one your site could be compromised.  This is perfectly fine for normal websites–and really even my project.  The real problem was the limitation of not being able to have root access.

Root access is the ability to change the configuration of the server itself.  For example, on my shared hosting account I was unable to choose what type of operating system was running on the server.  This ability is blocked so as to allow access / cause problems with the other “renters” sites.

I went searching for my own server.  There are lots of options out there, including buying your own physical server.  I knew that I didn’t need a whole lot of power or resources, so I opted for a virtual private server (VPS).  There are several options for VPS as well, but essentially you get the benefit of root access with a virtual separation of the server itself. In other words the sever is still shared by more than one user, but the resources and root of the machine are digitally separated.

After reading through reviews and comments on HackerNews, I narrowed the possibilites down to Linode or DigitalOcean.  Both companies have many options, and outstanding reviews, but I opted for DigitalOcean because they offered a lower tier in price and performance that matched my current needs.  Furthermore it is remarkably simple to upgrade without major disruption.  So far so good.

Challenge #2:  Setting up the VPS

The first step to getting my site up and running, was to install and configure an operating system on my the VPS.  I opted for Ubuntu 12.04 LTS, again because of the abundance of community support documentation and its staying power (LTS = Long Term Support).  I also learned that the 32 bit option was my best bet due to the lower memory package option I selected from DigitalOcean [LINK].

To access the newly installed sever you need an IP address, a user name, and a password.  This is of course supplied by DigitalOcean once payment is completed.  To actually access the sever, I had to learn how to use a command line or terminal.  Being that I use a windows machine and a Mac depending on my location, I found my best bet was to use an online SSH client.  I always use Chrome as my web browser, to this [LINK] was a great solution.