the matrix linode’d

Today’s review is about a pretty decent hosting company called Linode. Here’s the three-day timeline from idea to implementation:

  1. Thursday: decided to create a new info website about 3D printing, bought the domain name on GoDaddy and waited for the changes to take effect at midnight
  2. Thursday: created a Github repository to store the source for the website since I’m open-source like that
  3. Thursday: created an account on Linode, purchasing a “linode” for that
  4. Thursday: designed/created the initial local/development website layout/framework, collected images and content
  5. Friday: created (provisioned) the basic linode (virtual machine) for the website on production, provisioned a virtual drive, deployed Ubuntu 16.04LTS onto that, booted and remoted into that, ran updates, installed the framework, added the website, setup security and the firewall
  6. Friday: adjusted the DNS at GoDaddy to point to the new server, added more content
  7. Saturday: launched the website on Linode with the initial version
  8. Saturday: tweaked the settings to make the Node.js—based website start on bootup
  9. Saturday: added more content to the website

site

Not bad for an open-sourced 10-page (44 files) responsive website, if I do say so myself.

Please note that when I say “hosting company”, I really mean a “virtual server provider” so this is more like Amazon EC2 as a service offering. I didn’t just rent website space (like on Wix.com or WordPress.com), I rented an entire virtual server, if you will.

Comparison of virtual server versus website space

There are some advantages/disadvantages of renting a virtual server over just some website slot on a server somewhere:

Pros:

  • In theory, you could run several websites from a virtual server
  • You can run services in the background (like Node.js) and manage them
  • You can run multiple threads on the same server, like helper routines which do something other than serving up pages
  • You’re not limited to the set of templates that are available from Wix.com, for example
  • Your website runs separately from other websites
  • You get an IP address which is only used for your website

Cons:

  • You have to setup security yourself since you’re responsible for the entire server
  • The learning curve is steeper
  • You have to know I.T. things like setting up servers and installing software

Framework/software

Here’s a list of what I used for this website:

  • Node.js: Probably the most famous event-driven JavaScript runtime engine out there
  • Express: A minimalistic Node.js framework for separating code from content on a website
  • Bootstrap.css: A responsive stylesheet and component library for styling a website
  • PM2: A handy process manager for Node-based applications on a server.  After pulling new code, I might run the command pm2 restart AppName to restart the service

Documentation

Kudos to Linode for providing a detailed Getting Started guide along with several tutorial videos on the subject.

And further, a note of thanks to PM2 which seems to satisfy the requirements of bringing up and managing a Node.js application as a service within a production environment and their ample documentation.

Suitability

Is Linode well-suited for most website designers/developers? Probably not. On an I.T. complexity scale from 1 to 10 potatoes, I’d say they’re probably seven potatoes, perhaps. In this case, you’d have to be comfortable doing the following:

  • Using a web-based console to allocate and bring up/down a virtual server
  • Using ssh to remote into your virtual server
  • Navigating within a command line interface on a Linux computer or similar
  • Using ssh-keygen to generate a keypair
  • Using apt-get to update things
  • Editing files using nano
  • Managing services, reading log files
  • Remotely rebooting your virtual server
  • Setting up a firewall, testing and managing same
  • Applying code using git
  • Testing a website to verify that there are no 404 (file not found) type of errors, for example
  • And obviously, creating/designing a website in the first place and using a repository like Github for storing those files

That said, it was a perfect fit for me since I can do those things. In fact, the Linode-related part of this took no more than two hours since this is the first time I’ve used their interface. My next one should go much faster.

Observations

I will say that I’m impressed. Unlike Amazon AWS, Microsoft and Google, the people at Linode haven’t created an interface that’s overly complicated. It seems to work simply and to do the things you need to do and those are: 1) buy a virtual server, 2) deploy something onto it, 3) turn it on and 4) remote into it. I don’t think the “big three” have figured this out yet; their interfaces and the assumed workflow requires too much research, in my humble opinion.

Additionally, the PM2 software does a great job of working with the git-based code distribution model, allowing you to restart the Node.js app when it’s required and to start up automatically each reboot. There’s an easy-to-remember command interface like pm2 show AppName which tells you what you usually want to know.

At a cost of $5/month, it compares favorably to most of the well-known hosting providers out there. The basic linode will likely satisfy the requirements of the average Node.js application up to a reasonable level of simultaneous users, I’d suggest.

price

Advertisements

the white stuff, part 2

Looks like the Daily Stormer (neo-Nazi white supremacists and KKK website) was booted by their hosting provider GoDaddy on Sunday for violating its terms of service after an article regarding Heather Heyer was published on the site.  The former then transferred their content to Google Domains (Monday)… after which Google booted them as well for the same reason around midnight of that same day.

After a day or two of being offline, the site appears to have surfaced again in the “dark web” of the Tor anonymity network.  (In Harry Potter terms, they lost their lease on Diagon Alley and were forced to move to Nockturn Alley which seems to suit them better.)

The Dark Web

As if the Internet itself weren’t scary enough in the light of day sometimes, we now have an even darker, hidden version of it which is only accessible with specialized software.

Dark web: that portion of the web which cannot be easily reached from the public Internet, and usually requires specialized software to access. Examples of the dark web are the Tor network and hidden services, the I2P network and its eepsites, and the RetroShare network.

Almost sounds like a stroll in the woods when you say it like that.  Only this would be the Black Forest or the Forbidden Forest or the Suicide Forest maybe.

Onion Routing

But how does one attempt to navigate in such a place?  It looks like communications are wrapped in layers and layers of encryption much in the same way that onions have layers.  Each network node in this communication either adds another layer or peels one away, depending upon its direction.

Oddly enough, this method was developed by the Navy to protect U.S. intelligence communications online back in the ’90s.  I suppose it’s sad when your own tax dollars eventually provided the means by which child pornography, for example, enjoys its anonymity on the dark web at this time.

unseen complications

Don’t you hate the unseen complications that rear their ugly heads somewhere down the line?  Today’s drama involved the inclusion of a very cool fullscreen api by Vincent Guillou.  Of course, it worked great in development and then failed silently on production.  Here is an overview of what makes my production site a little different.

Production Site Overview

GoDaddy domain name hosting with option “forwarding with masking” —> Firebase.com—based hosting site

GoDaddy does this technically by serving up a single HTML page which simply frames the remote content.  By its nature, it uses the HTTP protocol and cannot use HTTPS. In its configuration it allows you to set either HTTP/HTTPS for the framed content, however.  You’d think that you would have plenty of room to make something work. And it did work just fine up until the latest add to the project:  a button which allows the browser to go full screen and back again.

Unfortunately, the first push to production then failed silently. The button was there but didn’t seem to work. Entering the development area of the browser I saw that the browser had to block the content because the framing page was HTTP and the framed content was HTTPS and this isn’t allowed.

Okay, so I thought I could then adjust GoDaddy’s settings so that I could frame the content as HTTP to match the parent document. Unfortunately I see that Firebase always uses HTTPS and does not support HTTP. Since I can’t mis-match the content and combined with the fact that I can’t easily promote GoDaddy to HTTPS on the framing page or demote Firebase on the framed page, I was screwed.

To make a long story short, I either had to pay for hosting at Firebase (which allows you to bind your domain name to their hosting server) or I could abandon the cool  feature. Since I’m trying to highlight the cool new features of the latest browsers I decided that’s it’s better to just pay Firebase in this case.

It was still a bit technical in getting all this to work since Firebase only bound a single entity (www) to the website using my domain. This means that if someone just puts in my domain name only then they’re stuck at a GoDaddy-parked page. To work around this problem, I set up a redirect to deal with this situation. This time it looked like:  myJS.io -> http://www.myJS.io. Problem solved.

So now, the cool new feature is working on production and the implementation is slightly simpler, not that anyone else would necessarily know.

use your domain name not theirs

There are times when you want to use a service provider like Gmail, WordPress, Firebase, Heroku or OpenShift but you don’t necessarily want to keep advertising their domain name with your business, blog or website.

Converting me@gmail.com to me@MyDomain.com

This one is easy enough, assuming that you know your way around your domain registrar’s configuration.  I usually park things at GoDaddy these days so I’ll use them as an example. Likewise, I’ll assume that you have a free mailbox at Google’s Gmail.

Assumptions:

  • Mailbox: me@gmail.com
  • Domain: MyDomain.com
  • Registrar: GoDaddy

Instructions:

  1. Write down the collection of email entities that you would like to forward to your mailbox
  2. Log into GoDaddy, visit the Manage My Domains page
  3. Choose the Manage Email link associated with your domain
  4. If you haven’t already, setup email forward for your domain
  5. Choose the Create Forward link
  6. Type in the first email entity from step one above, for example, support
  7. When you type the @ symbol you next get to select MyDomain.com
  8. In the next field, enter your mailbox name of me@gmail.com
  9. In the next field, choose the Free email forwarding with domain: MyDomain.com
  10. Click the Create button
  11. Repeat for each of the entities you’d like to be:  support@MyDomain.com, info@MyDomain.com, MyName@MyDomain.com, etc

It’s best at this point to wait a couple of minutes and then send a test email out to one of these entities to see if it arrives into your mailbox.  Once you’ve verified that it works you may begin to use it confidently.

I routinely create multiple mailboxes for notification apps so that they can have their own email queue.  Again, email forwarding hides the Gmail mailbox name.

Converting wordpress.com/Me to blog.MyDomain.com

Again, this is easy enough using a feature called forwarding with masking.

Assumptions:

  • Blog: wordpress.com/me
  • Domain: MyDomain.com
  • Registrar: GoDaddy

Instructions:

  1. Log into GoDaddy, visit the Manage My Domains page
  2. Choose the gear icon associated with your domain and then choose thee Manage DNS link
  3. Choose the Settings tab
  4. Under Forward -> Subdomain choose the Manage link
  5. Click the Add Subdomain Forwarding button
  6. Enter blog as the subdomain
  7. Select http as the protocol
  8. Enter wordpress.com/me in the next field
  9. Select 301 as the Redirect Type
  10. Under forward settings choose Forward with Masking
  11. Click the Add button

Give it a couple of minutes before giving this a try to see if it works.

The same technique works for your website.  For example, I’m hosting a website at Firebase.com, another at Heroku, yet another at OpenShift.com, etc.  Each of these hosting providers would probably love it if I allowed the world to see their domain name in the URL.  But I’d rather not since that’s free advertising to them.  Don’t these examples look better?

happy-pretty-8464.firebase.com -> MyDomain.com

myphpapp-mydomain.rhcloud.com -> MyCoolApp.MyDomain.com

myappmydomain.herokuapp.com -> MyApp.MyDomain.com

Honestly, domain names cost you year after year.  You might as well take advantage of the many free services which are included with your domain registration.