I started this blog to record some of the things I'm working on, primarily related to technology (car restoration may also feature). I decided to use the Ghost blogging platform because, although other platforms (Wordpress) have a larger feature set, I appreciate the streamlined simplicity Ghost prioritizes. Initially, I though I would host with Heroku (I already use Heroku to host my Node JS personal website nathanmorin.com. However, I found Heroku a less than ideal tool for ghost given the inability to use the standard ghost install/update mechanism. I had been wanting to experiment with Amazon hosting for a while & this seem like a great opportunity to get my feet wet on a simple project. I won't go into a full installation tutorial of Ghost here. Ghost has a helpful docs page (https://docs.ghost.org/v1/docs/install). Instead, I'll walk through some of the challenges I found as a first time Amazon EC2/EFS user.
The basic architecture consists of an Amazon EC2 instance (behind Cloudflare) with data stored on Amazon EFS (to provide flexible storage of assets images,files,etc. which my be stored on on blog).
Although the Amazon AWS Console can be daunting at first, it was fairly simple to stand up an EC2 Ubuntu 16.04 instance and log in. Creating the EFS storage endpoint was also simple. However, connecting to the the EFS endpoint via NFS4 was a little tricky. After creating and adding the correct security groups to the EFS endpoint, the NFS mount operation on the Ubuntu EC2 VM would hang. After looking through the troubleshooting documentation and not finding a solution, a quick Google showed I needed to add Inbound NFS for access from sources in my security group to my security group policy. After this, setup was a breeze.
Overall, the process was relatively straightforward for someone with previous experience administering systems. There is a definite learning curve for understanding the nuances of AWS and Amazon's documentation/startup tutorials could definitely improve. However, even just scratching the surface of Amazon's vast array of services with this project, I can appreciate the organization and flexibility of configuration and architecture AWS provides. I will end with something which impressed me. Setting up EFS, I decided to look at the capacity of my mounted EFS drive...
ubuntu@ip-111-11-11-11:/data/ghost$ df -h Filesystem Size Used Avail Use% Mounted on udev 488M 0 488M 0% /dev tmpfs 100M 4.4M 95M 5% /run /dev/xvda1 7.7G 1.9G 5.9G 24% / tmpfs 496M 0 496M 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock tmpfs 496M 0 496M 0% /sys/fs/cgroup tmpfs 100M 0 100M 0% /run/user/1000 fs-111111.efs.us-east-1.amazonaws.com:/ 8.0E 0 8.0E 0% /data
8 Exabytes available. This is freedom.