4 ms·
As it happens my company has hired a marketing company who wants to use Wordpress for our new website. This design really isn't so far out from what I planned
by gtsteve 6y ago
As it happens my company has hired a marketing company who wants to use Wordpress for our new website.
This design really isn't so far out from what I planned but the NAT gateways aren't necessary and I was going to use Fargate instead of EC2 to host it. Also, I was going to host it in a single availability zone as the impact of downtime is minimal.
EFS seems like a natural choice also for upload directories, etc, and you can attach EFS volumes to Fargate containers now.
I'd be interested to hear if anyone else has done this and what their experiences are.
- dadarepublic 6y agoWhy not just use AWS Lightsail to start? https://aws.amazon.com/lightsail/features/ https://aws.amazon.com/lightsail/features/ It's super easy...
- gtsteve 6y agoAs it happens I just answered that question - https://news.ycombinator.com/item?id=22898903 https://news.ycombinator.com/item?id=22898903 I've racked up around 10 years of AWS experience now so it's not so hard for me to throw something like that together. If I had to use Azure then I'd certainly do something simpler.
- dadarepublic 6y agoMy orig comment in this thread misunderstood the intent of the OP. * shrugs
- yllus 6y agoInstead of EFS, use a WordPress plug-in like WP Offload Media Lite ( https://en-ca.wordpress.org/plugins/amazon-s3-and-cloudfront/ https://en-ca.wordpress.org/plugins/amazon-s3-and-cloudfront... ) that immediately moves those uploaded files to S3. Cheaper and more resilient (if you want to to be).
- gtsteve 6y agoThat's pretty nice actually. I can just keep my config files in EFS or perhaps even just store them in S3 and download them on container startup. Thanks.
- batuhanicoz 6y agoI host a few WordPress sites on Kubernetes and we use S3 (well, Minio) and it works great. All the configuration is passed via environment variables so you don't even have to keep the config files in EFS.
- peteretep 6y agoI started going this route and then decided I couldn’t bring myself to install Wordpress in an AWS account I used for other things. In the end I created a new Digital Ocean account, picked one of their Wordpress droplets or whatever it’s called, stuck Cloudflare in front of it, and called it a day. It’s possible I’m sure to lock down Wordpress and also to segment your AWS network but ... why? Unless it needs access to other assets in your AWS account then quarantining it on a dedicated account on a different service provider is easy.
- brodouevencode 6y agoBeware of NATGW and serve as much media as you can from CloudFront+S3. NATGW data transfer costs are obscene to say the least. As for the EC2 v. Fargate: sorta depends more on what elasticity you need and if the application is sufficiently stateless, among other things.
- bdsa 6y agoEven with the price drop (last year some time?) isn't Fargate still incredibly expensive? If Fargate is scaling down between visits, I feel like your load times would be unacceptable, and if you are running Fargate continuously you're better off using EC2 (or, whisper it, ECS.)
- tilolebo 6y agoYou can aim to run a truly stateless wordpress container using https://github.com/roots/bedrock https://github.com/roots/bedrock for the wordpress install together with Composer and https://wpackagist.org/ https://wpackagist.org/ to manage your plugins and dependencies. Then there's https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfront https://github.com/deliciousbrains/wp-amazon-s3-and-cloudfro... to offload all media files to S3 (consider putting a Cloudfront distribution in front to get a custom domain + HTTPS). I've been there and I can't honestly recommend it. You'll be on your own. Also, it really really feels like Wordpress wasn't made to be deployed this way. If I were you I'd rather use a good hosting provider like WPEngine and spend my time on more valuable things.
- folkhack 6y agoYep - I run my own composer-driven WP setup based on the roots design and can honestly say that it's an anti-pattern with how WP wants to handle plugins/themes/core updates/etc. I say it's an anti-pattern because we're talking about WP - a platform that allows you to arbitrarily update PHP files from a web admin/install plugins/etc... It's this sort of flexibility that our clients/end users want and when we start designing that BS out due to security reasons it typically ends up in a user yelling at me for "WHY CAN'T I JUST INSTALL A PLUGIN LIKE THE WORDPRESS TUTORIAL SAYS?!" When you come back with "security", and "I have to review that code" it almost always falls on deaf ears. When you start designing the flaws out of WP infra you start to realize those same flaws are why marketing is hellbent on keeping it as a CMS - they hate working with/waiting on devs to get things done.