How about Amazon Lightsail for hosting LEMRS stacks?

In the world of web servers, a stack describes the critical software used on the server. The most well-known stack is LAMP – Linux (operating system), Apache (web server), MySQL (database), and PHP (programming language). For example, WordPress and other content-management systems typically rely on a LAMP stack.

In the Open-Meta context, we want to replace the PHP programming language with R and Shiny, thus the RS in LEMRS. The E stands for the Nginx web server (pronounced engine-x), which is slowly replacing the older, heavier, Apache.

Way back in my And how… post from six months ago I was wondering about the technology to use for Open-Meta. While you can easily and cheaply rent a shared server that comes with a LAMP stack for hosting something like WordPress, none of the ones I looked at would let you install R or Shiny.

I’ve been playing with shinyapps.io as an alternative. It doesn’t currently support local MySQL, although it does have SQLite. The real deal-breaker for me, however, was that it doesn’t support sending email, which Open-Meta needs at a minimum to verify user email addresses.

So I began looking at setting up a technology stack in the cloud. I was excited and inspired by Dean Attali’s excellent May 2015 blog post, How to get your very own RStudio Server and Shiny Server with DigitalOcean. Like Amazon Web Services, DigitalOcean provides virtual, cloud-based computers, but was designed to be much easier to use.

As I was taking a look at DigitalOcean, I logged into my Amazon Web Services account to see if AWS was really as complicated as I remembered it (it is). But AWS had something new I hadn’t heard of before, Amazon Lightsail, which appears to be a product AWS introduced about a year ago to compete with DigitalOcean and other providers who had cracked the AWS-is-too-complicated nut.

So that’s what I’m working on now – setting up a LEMRS stack in Amazon Lightsail. I’ll have more about how to do this when I’m satisfied I have it down. But I’ve already figured out that what’s great about virtual computers is that it costs nothing to throw them away and get a new one. As you try to get all the software installed and get the system set up securely, it’s easy to make mistakes; especially if you don’t know any more about Linux than I do.

When you set up a new instance, Amazon Lightsail lets you enter a launch script that runs as root (the superuser). I’ve been keeping track of what works in the launch script by trying out the new instance, figuring out how it could be improved, using Google to discover how to do that, then deleting that instance and starting over with an improved launch script. This is so much better and faster than doing the same thing on a physical computer!

Next I’ll provide the details of how to write a launch script for a LEMRS stack on Amazon Lightsail.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.