cloud hosting practicesdocs.duraspace.org/documents/or13-cloud-practices-final.pdf · cloud hosting...

17
Licensed under Creative Commons Attribution-Share Alike 3.0 Unported License Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013

Upload: others

Post on 07-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Licensed under Creative Commons Attribution-Share Alike 3.0 Unported License

Cloud Hosting Practices Lessons DuraSpace has learned

Bill Branan

Open Repositories 2013

Page 2: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Purpose

• Share what we've learned about applications development and hosting in a cloud environment

• Start a conversation about cloud best practices

• Enable more and better use of the cloud

Page 3: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Cloud History

Established 2009 Established 2010

Infrastructure

Demo Site

Established 2009 Demo Site

Established 2010

Established 2012

Page 4: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

The Task

• Your goal: Hosted app

• Constraints:

– No local IT support

– Up and running quickly

– Scale with demand

Page 5: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Questions

• Which cloud providers to use?

• Which cloud services to use?

• How to put the pieces together?

• How to handle maintenance?

• How to ensure availability?

• How to scale?

• …

Page 6: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Commercial Cloud

• Available

– No datacenter required

• Flexible

– No up front costs, no contracts

• Lots of options

– AWS, Rackspace, Windows Azure, GoGrid, HP, …

Capabilities of clouds vary greatly

Page 7: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Amazon Web Services

• Clear market leader

– 6x the market share in IaaS as its next closest competitor

• Global

– 9 regions in 6 countries

• Scale

• History of price reductions

• Pace of Growth

Page 8: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

EC2

• Elastic Compute Cloud

– Manage server instances

– Amazon Machine Image (AMI)

– Use EBS-based instances

– Use reserved instances

– Use spot instances when possible

– Use elastic IPs

Page 9: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

EBS

• Elastic Block Store

– Block-level storage volumes

• Think “hard drive”

• 1 GB - 1 TB

– Best file system storage option for EC2

• Fast and easy to use

• Can be moved between instances

– Not as durable as S3

• Make regular snapshots to S3

Page 10: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Storage

• S3 - Simple Storage Service

– Highly reliable file storage

– Files available for immediate download

– RRS option

• Glacier

– Cheaper than S3

– Same durability as S3

– Takes longer, costs more to get data out

Page 11: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Design

• Stateless

– Applications

– AMIs

• Expect failures

– Unexpected restarts

• Plan to scale

– Horizontal scale: More instances

– Vertical scale: Bigger instances

Page 12: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Pulling it all together

• Building AMIs

• CM Automation

– Consistency

– Repeatability

– Control

• Puppet

– Define + deploy

– Enforce

Page 13: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Testing and Upgrades

• Start from latest EBS snapshot

• Change local /etc/hosts file

• To deploy: Assign elastic IP

Page 14: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Monitoring

• Lots of options

– monitor.us

• Up or Down

– AWS CloudWatch

• Instance monitoring

– New Relic

• Server and application

– Newvem

• Costs, activity, utilization

Page 15: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Accounts

• Use accounts to separate environments:

– Development, Test, Production

– Applications

– Users

• Consolidated billing

– Can complicate reservations

Page 16: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

We are learning

• Multiple availability zones

• Elastic load balancer

• Autoscaling

– Scale up and down

– Based on metrics (CloudWatch)

– Even for 1 instance

• Use IAM (ID and Access Mgmt)

Page 17: Cloud Hosting Practicesdocs.duraspace.org/documents/OR13-cloud-practices-final.pdf · Cloud Hosting Practices Lessons DuraSpace has learned Bill Branan Open Repositories 2013 . Purpose

Thanks!

Questions?

[email protected]