A few years ago I spent a weekend converting my static blog into a Drupal 8 site which I chose to host on Amazon Web Services. Last weekend, I spent a few hours migrating my site to Platform.sh.
It was a great learning experience setting up my small AWS EC2 and database back then, but there were a few issues with the setup:
- Maintenance - upgrading the server OS, PHP, Apache, MySQL and Memcached directly on the server is tedious, error prone and difficult to do with no downtime.
- Cost - average monthly cost was running around $28 on Amazon. That is a bit high when overall maintenance is difficult as mentioned.
I considered a couple of options first. One, I could provision a new EC2, install the newest versions of all that software, test it and make sure it works and this site would work and eventually make the switch over. In the interim, I would incur more cost on AWS because I would essentially have a duplicate server and database running while I got everything ready and updated.
Two, I could run the way I wanted to run things - on Docker / Kubernetes. This would mean learning AWS Elastic Container Service, spending a lot of time and probably spending way more money.
I decided the better option was to move to Platform.sh. I don't need to be spending my time like that as I have several other things requiring my attention. Furthermore, I get everything I want: hands off maintenance, flexibility in adding software and services, and rock solid infrastructure. It is a little bit more per month at $50 but my time is worth more than the $22 difference - a great deal to me.
After spending a few hours in their documentation, I had the site migrated and ready to launch. I was able to quickly do the following things:
- Update to PHP 8.1 (previously stuck on 7.2 on AWS)
- Update to Drupal 9.4.1
- Add ImageMagick image processing to the server
- Add Redis 7 and ditch Memcache
- Add HSTS headers
- Update to Drush 11 (now that I am on PHP 8.1)
With exception to updating Drupal core and Drush, most of these changes happened in a YAML file specific to Platform.sh. I didn't have to ssh in to a Linux server and fiddle about with conf files or Apache or any of that. Simple, fast, effective.
I also have it integrated with my GitLab account. Any time I push branches, I can create a private development site of that branch. Since Platform.sh can run Composer in the provisioning stage when building your environment with every change, this also simplified part of my deployment process. GitLab is not responsible for the deployment part anymore, packaging up and pushing a fully built git artifact containing Drupal core and contributed modules. My CI script was cut in half, now I can just have it focus on build validation and the minimal automated testing I have for this site.
I changed DNS early this morning and was so confident in this move that I terminated/deleted all AWS services I was using immediately. No turning back :)
To contrast both efforts in terms of time, getting up and going with AWS probably took me a full week of using their docs and getting the right services wired together in order to launch a website. With Platform.sh the process was very fast and in a matter of hours I was ready to launch and switch DNS. It's that good.
This takes a few more things off my plate that have been lingering out there because I did not want to deal with the server headache and hopefully encourages me to produce more content. I have posted several articles in the last 6 weeks on the Velir blog, and have several more planned through the year on various topics.