Auto scaling applications in 10 minutes (CakeFest 2013)

Preview:

DESCRIPTION

Talk about using AWS OpsWorks to auto scale web applications on AWS infrastructure.

Citation preview

Auto ScalingApplications in10 Minutes

Juan Basso @jrbasso

System Architect - Zumba Fitness

IngredientsAWS AccountAWS OpsWorksChef CookbooksYour Awesome AppSome MoneyPatience

Some TermsAWS: Amazon Web ServicesEC2: Amazon Elastic Compute CloudELB: Elastic Load BalancingRDS: Amazon Relational Database Service

Architecture Evolution

Starting

Separate the Load

More Instances for the Load

Auto Scaling

Getting There With OpsWorks

What is OpsWorks?Free Tool with AWS AccountSimple Interface for Setup the DeploymentEasy Setup of Auto ScalingDevOps Application Management Service

What is Necessary?AWS AccountApplication in Some RepositoryCreate Chef CookbooksPut the Cookbooks on Some Repository

Chef Cookbooks???node[:deploy].each do |application, deploy|

include_recipe 'apache2::service'

execute 'Setup PHP default timezone' do

action :run

command "

sed -i 's/;date\.timezone.*/date.timezone = UTC/g'

php -r 'echo php_ini_loaded_file();'

"

user 'root'

notifies :reload, resources(:service => "apache2"), :delayed

end

end

ComponentsStackLayersInstancesApplication

OpsWorks Step-By-Step

Links and ConfigsApplication: git://github.com/croogo/croogo.git (tag v1.5.3)Cookbook: git://github.com/jrbasso/croogo-cookbook

Setup: cakephp::setupConfigure: php::timezone_cfgDeploy: croogo::install andphp::timezone_cfg

Create the RDS and ELB beforehandImport database dataPS: Sessions are going to be stored on DB

Create the Load Balancer

Create the Database

Welcome Page from OpsWorks

Creating the Stack (Part 1)

Creating the Stack (Part 2)

Creating PHP Layer

Configuring PHP Layer

Before Setup Instances

Creating the Instance

24/7 Instance Created

Created Load and Time BasedInstances

Setting Up Time BasedInstances

Setting Up Load BasedInstances

Creating Application

Application Created

Monitoring Servers

Auto Starting a Load Instance

Questions?

Recommended