53
Joomla! Scalable Enterprise Deployments with AWS Jim Dolinski 9/23/2017

Joomla! Scalable Enterprise Deployments with AWS

Embed Size (px)

Citation preview

Page 1: Joomla! Scalable Enterprise Deployments with AWS

Joomla! Scalable Enterprise Deployments

with AWSJim Dolinski9/23/2017

Page 2: Joomla! Scalable Enterprise Deployments with AWS

$whoami• Team Lead and Application Architect

• AWS Enthusiast and Security Addict

• Open Source Aficionado

• Official Joomla Contributor!

github.com/jdolinski

@jimdolinski

linkedin.com/jimdolinski

Page 3: Joomla! Scalable Enterprise Deployments with AWS

Company background…IT support for City of Omaha and Douglas County, NE

Hosting & Supporting 100+ Joomla Websites

2016 & 2017 AWS City on Cloud Finalist

Page 4: Joomla! Scalable Enterprise Deployments with AWS

Agenda• “X”aaS

• Intro to Amazon Web Services

• Infrastructure & Configuration Management

• Monitoring & Performance

• Governance & Compliance

• Resource Optimization

Page 5: Joomla! Scalable Enterprise Deployments with AWS

“X”aaS

Page 6: Joomla! Scalable Enterprise Deployments with AWS

“as a Service”We are in a marketing acronym hell

• IaaS

• PaaS

• SaaS

• DBaaS

• DaaS

• SECaaS

• FaaS

• Plus many moreCost & Complexity

Mai

ntai

nabi

lity

IaaS

On Premise Data Center

PaaS

SaaS

Page 7: Joomla! Scalable Enterprise Deployments with AWS

Our Family Tradition

Pizza Chicago Style

Page 8: Joomla! Scalable Enterprise Deployments with AWS

Made at Home

Page 9: Joomla! Scalable Enterprise Deployments with AWS

Take and Bake

Page 10: Joomla! Scalable Enterprise Deployments with AWS

Pizza Delivered

Page 11: Joomla! Scalable Enterprise Deployments with AWS

Dining Out

Page 12: Joomla! Scalable Enterprise Deployments with AWS

Cloud Architecture “as a Service” 12 Factors

I. Codebase

One codebase tracked in revision control, many deploys

II. Dependencies

Explicitly declare and isolate dependencies

III. Config

Store config in the environment

IV. Backing services

Treat backing services as attached resources

V. Build, release, run

Strictly separate build and run stages

VI. Processes

Execute the app as one or more stateless processes

VII. Port binding

Export services via port binding

VIII. Concurrency

Scale out via the process model

IX. Disposability

Maximize robustness with fast startup and graceful shutdown

X. Dev/prod parity

Keep development, staging, and production as similar as possible

XI. Logs

Treat logs as event streams

XII. Admin processes

Run admin/management tasks as one-off processes

https://12factor.net/

Page 13: Joomla! Scalable Enterprise Deployments with AWS

Amazon Web Services

Page 14: Joomla! Scalable Enterprise Deployments with AWS

Let’s Get Started?

Page 15: Joomla! Scalable Enterprise Deployments with AWS
Page 16: Joomla! Scalable Enterprise Deployments with AWS

AWSim City• Amazon = Planet

• AWS Account = State

• Availability Zone = County

• VPC = City

• Routes = Roads

• VPC Peering = Freeways between Cities

• VPG = Your Corporate Data Center on Earth

• Route 53 DNS = Phone Numbers

• Regions = Countries

• Internet = Interstate

• Internet Gateway = Interstate off ramp

• NAT Gateway = Highway on Ramp

• Subnets = Postal Codes

• Private Subnet = No Highway Access

• Public Subnet = Highway Access

• Network ACLs = Gated Communities

• ELB = Overpass signs to route traffic

• Address = IPs

• Servers/Services = Buildings

• Security Groups = Police

• Traffic = Cars

• AMI = Photographer’s Image

• Cloud Formation = Civil Engineer/Constructor

Page 17: Joomla! Scalable Enterprise Deployments with AWS

AWSim City

Represents a single Availability Zone

Page 18: Joomla! Scalable Enterprise Deployments with AWS

Architectural Design Patterns

1. Lift & Shift (AMI)2. AMI Builder (Clustered AMI)3. NAS (Network Attached Storage)4. Multi Region and AZ Deployments

It depends on your requirements…

Page 19: Joomla! Scalable Enterprise Deployments with AWS

Lift & Shift PatternPros

• Quick & Easy

Cons

• Single Point of Failure

• Tight Coupling

• Not Cohesive

Page 20: Joomla! Scalable Enterprise Deployments with AWS

AMI/EBS Builder PatternPros

• Good Performance

• Can be clustered in multiple AZs and Regions

Cons

• Create AMI for every Joomla or extension upgrade

• AMI Maintenance increases with more websites sharing same server

• Storage is not elastic

Page 21: Joomla! Scalable Enterprise Deployments with AWS

EFS PatternPros

• Joomla & Extension upgrades simple

• Storage is elastic

• AZ’s share same storage

Cons

• Slower than attached block storage

• EFS can not be mounted across regions

Page 22: Joomla! Scalable Enterprise Deployments with AWS

Multi AZ PatternPros

• Redundancy within same region

• Joomla updates simple on EFS

Cons

• Joomla updates on EBS

Multi AZ is recommended at a minimum

Page 23: Joomla! Scalable Enterprise Deployments with AWS

Multi AZ & Region PatternPros

• Scalable and highly available architecture

• active/passive or active/active failover

• Latency based routing

• Privacy laws governing data

Cons

• Technically Complex

• More Costs

• Requires mid/advanced knowledge of more services

Page 24: Joomla! Scalable Enterprise Deployments with AWS

Design for failure and automate everything

It’s not “if” but “when”, and it will occur while you are on vacation!

}Maximize Flexibility Minimize Maintenance & Costs

Prefer “Managed Services”

over “Service Installs”

Page 25: Joomla! Scalable Enterprise Deployments with AWS

Global Infrastructure

Page 26: Joomla! Scalable Enterprise Deployments with AWS

https://aws.amazon.com/products/management/

+

Page 27: Joomla! Scalable Enterprise Deployments with AWS

Resource Provisioning• Infrastructure as Code

• AWS CloudFormation

https://aws.amazon.com/marketplace/pp/B06XSVFFK9

https://cloud.intuz.com/applications/joomlacf/aws/joomla

• Terraform

Page 28: Joomla! Scalable Enterprise Deployments with AWS

DevOps Configuration Management

• Infrastructure as Code

• OS Hardening

• Software installs

• Practice Immutability

• AWS OpsWorks

• Chef

https://martinfowler.com/bliki/ImmutableServer.html

“By frequently destroying and rebuilding servers from the base image, 100% of the server's elements are reset to a known state, without spending a ridiculous amount of time specifying and maintaining detailed configuration specifications.” - Martin Fowler

Page 29: Joomla! Scalable Enterprise Deployments with AWS

Enterprise Joomla! Architecture

Service Installs

Page 30: Joomla! Scalable Enterprise Deployments with AWS

Enterprise Joomla! Architecture

Managed Services

Page 31: Joomla! Scalable Enterprise Deployments with AWS

DevOps Configuration Management

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

https://www.thoughtworks.com/continuous-integration

Page 32: Joomla! Scalable Enterprise Deployments with AWS

Monitoring & Performance• AWS CloudWatch

• PagerDuty

• StatusCast

• Failover

• Active/Active

• Active/Passive

Page 33: Joomla! Scalable Enterprise Deployments with AWS

Monitoring & Performance• Benchmark First

• Google PageSpeed, YSlow, Pingdom, JMeter, etc

• Don’t forget geo testing

• Apply 1 Change

• AWS CloudFront, AWS Elasticache

• Minification, Browser Caching, Image Optimization, etc

• Repeat

Page 34: Joomla! Scalable Enterprise Deployments with AWS

Key Plugins

Page 35: Joomla! Scalable Enterprise Deployments with AWS

Regular Labs Cache Cleaner

+

https://www.regularlabs.com/extensions/cachecleaner

Page 36: Joomla! Scalable Enterprise Deployments with AWS

JCH Optimize Pro

+https://www.jch-optimize.net/

Major Features • Combine and gzip CSS and javascript files respectively • Minify combined files and HTML • Combine select background images into a sprite • CDN Support Pro version only • Lazy-load images Pro version only • Optimize CSS Delivery Pro version only • Optimize Images Pro version only

Page 37: Joomla! Scalable Enterprise Deployments with AWS

Are we down?Know before your customers!

“Communication will build trust and confidence”

+https://www.pagerduty.com/docs/guides/aws-cloudwatch-integration-guide/

Page 38: Joomla! Scalable Enterprise Deployments with AWS

Governance & Compliance• Security

• AWS ElasticSearch

• AWS CloudTrail

• Defense in Depth

Page 39: Joomla! Scalable Enterprise Deployments with AWS

Practice Defense in Depth

• Firewalls are core

• https everything

• Google Webmaster Tools

• Implement Intrusion Detection

• Routinely Audit & Patch your Joomla Sites

• Logs and retention are crucial

Page 40: Joomla! Scalable Enterprise Deployments with AWS

Defense in Depth

Page 41: Joomla! Scalable Enterprise Deployments with AWS

Key Tools

Page 42: Joomla! Scalable Enterprise Deployments with AWS

RSFirewall

https://www.rsjoomla.com/video-tutorials/rsfirewall.html

Page 43: Joomla! Scalable Enterprise Deployments with AWS

MyJoomla Audit

Page 44: Joomla! Scalable Enterprise Deployments with AWS

Gain Control of your Logs!

Page 45: Joomla! Scalable Enterprise Deployments with AWS

Who updated this site?

+

Page 46: Joomla! Scalable Enterprise Deployments with AWS

Can we reduce patch time?

AWS Systems Manager

+

Page 47: Joomla! Scalable Enterprise Deployments with AWS

Resource Optimization• Performance Optimizations

• CDN, Cache, Geo Load Balancing, and more

• Cost Optimizations

• Autoscaling

• AWS Tagging

• AWS Trusted Advisor

• AWS Organizations + Multiple Accounts

What percentage of your servers today are idle?

Page 48: Joomla! Scalable Enterprise Deployments with AWS

Can we reduce costs?

+

Page 49: Joomla! Scalable Enterprise Deployments with AWS

https://aws.amazon.com/products/management/

+

Page 50: Joomla! Scalable Enterprise Deployments with AWS

Remember “ability” Factors• Repeatability, Availability, Scalability, Auditability, Flexibility, Usability

• Monitor, Monitor, & Monitor

• ADA and user’s with disabilities

• Use a Version Control System

• Dashboards work great, but you have to look at them!

• Try to Automate Everything

• Scale traffic to demands

• Automate Patching

• Blue/Green Deployments Can Reduce your Risk

Page 51: Joomla! Scalable Enterprise Deployments with AWS

What are we working on?• Joomla GIT Plugin to push to a remote repo

• Docker & Joomla

Page 52: Joomla! Scalable Enterprise Deployments with AWS

How Can I Get Started?• AWS CloudFormation

• AWS Beanstalk

• Sign Up and Get a Free Account

• Tons of resources on AWS

• Cost Calculator

• https://calculator.s3.amazonaws.com/index.html

Page 53: Joomla! Scalable Enterprise Deployments with AWS

Thanks