building a dynamic website - 31st jan 2015

44
Building A Dynamic Website AWS Meetup Team Speaker’s Note Architecture Diagram RDS EC2 Deploy Your App ELB Route 53 Clean up Building A Dynamic Website AWS Meetup Team Ahmedabad Amazon AWS Cloud Meetup Ahmedabad 31 Jan 2015 1 / 25

Upload: jhalak-modi

Post on 06-Aug-2015

119 views

Category:

Technology


1 download

TRANSCRIPT

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Building A Dynamic Website

AWS Meetup Team

Ahmedabad Amazon AWS Cloud MeetupAhmedabad

31 Jan 2015

1 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Overview

1 Speaker’s Note

2 Architecture Diagram

3 RDS

4 EC2

5 Deploy Your App

6 ELB

7 Route 53

8 Clean up

2 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Speaker’s Note

Janak Thakkar

• 6+ years of exp. with Linux, Virtulization and Cloud

• mailid: [email protected]

• Ph. No: 9067077200

Dhawal Bhatt

• 7+ years of exp with Linux, Virtulization and Cloud

• mailid: [email protected]

• Ph. No: 9016805331

3 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Architecture Diagram

4 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Relational Database Service (RDS)

Relational Database Service (RDS)

5 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Relational Database Service (RDS)

Overview

• In case of failure, ensure a safe and quick recovery

• Set up, operate, and scale a relational database

• Easy to manage

• Easily achieve high availability and redundancy

6 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Relational Database Service (RDS)

Overview

• In case of failure, ensure a safe and quick recovery

• Set up, operate, and scale a relational database

• Easy to manage

• Easily achieve high availability and redundancy

6 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Relational Database Service (RDS)

Overview

• In case of failure, ensure a safe and quick recovery

• Set up, operate, and scale a relational database

• Easy to manage

• Easily achieve high availability and redundancy

6 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Relational Database Service (RDS)

Overview

• In case of failure, ensure a safe and quick recovery

• Set up, operate, and scale a relational database

• Easy to manage

• Easily achieve high availability and redundancy

6 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using RDS

• create a database instance

• Specify engine (MySQL, Postgres, SQL Server, Oracle)

• Specify instance size

• Connect once created

• Monitor with Cloudwatch

• No SSH Access

• No root access

• Amazon manages patches, backup, failover, etc.

7 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Tasks to be Performed

• Create a Security Group for Your DB Instance

• Launch a DB Instance

8 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Simple to Deploy

• Managed and Compatible

• Scalable and Reliable

• Design for use with other Amazon Web Services

• Secure

• Inexpensive: On Demand DB Instances, Reserved DBInstances

9 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud

Elastic Compute Cloud

10 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud (EC2) is...

• Hardware As A Service

• A Web service that provides resizable compute capacity inthe cloud.

• Designed to make Web-scale computing easier fordevelopers.

• A simple Web service interface that provides completecontrol of your computing resources

• create/destroy from the command line

11 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud (EC2) is...

• Hardware As A Service

• A Web service that provides resizable compute capacity inthe cloud.

• Designed to make Web-scale computing easier fordevelopers.

• A simple Web service interface that provides completecontrol of your computing resources

• create/destroy from the command line

11 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud (EC2) is...

• Hardware As A Service

• A Web service that provides resizable compute capacity inthe cloud.

• Designed to make Web-scale computing easier fordevelopers.

• A simple Web service interface that provides completecontrol of your computing resources

• create/destroy from the command line

11 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud (EC2) is...

• Hardware As A Service

• A Web service that provides resizable compute capacity inthe cloud.

• Designed to make Web-scale computing easier fordevelopers.

• A simple Web service interface that provides completecontrol of your computing resources

• create/destroy from the command line

11 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Compute Cloud (EC2) is...

• Hardware As A Service

• A Web service that provides resizable compute capacity inthe cloud.

• Designed to make Web-scale computing easier fordevelopers.

• A simple Web service interface that provides completecontrol of your computing resources

• create/destroy from the command line

11 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concepts

• Amazon Machine Image (AMI):• Bootable root disk• Pre-defined or user-built• Catalog of user-built AMIs• OS: Fedora, Centos, Gentoo, Debian, Ubuntu, Windows

Server

• Instance:• Running copy of an AMI• Launch in less than 2 minutes• Start or stop programmatically

• Network Security Model:• Explicit access control• Security groups

• Inter-service bandwidth is free

12 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Using EC2

• Create an Amazon Machine Image (AMI).

• Configure security and network access.

• Choose the type(s) of instance you want to run.

• Start, terminate, and monitor as many instances of yourAMI as needed, using the web service APIs.

• Pay for the instance-hours and bandwidth that youactually consume.

13 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Tasks to be Performed

• create and configure your security group

• Launch Your EC2 Instance

• Select EBS

• Choose Key Pair

• Create AMI

14 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Concusion

• Reduces the time required to obtain and boot new serverinstances to minutes

• Quickly scales capacity, both up and down, as yourcomputing requirements change

• Changes the economics of computing:• Pay only for capacity that you actually use• a + bc becomes just bc

15 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Deploy Your App

• Connect to Your Linux Instance• ssh -i my-key-pair.pem

[email protected]

• Configure the EC2 Instance• Start the Web Server• Install the App• Test the Website• Update Permissions

• Create a Custom AMI

16 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Elastic Load Balancing

Elastic Load Balancing(ELB)

17 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Overview

Elastic Load Balancing automatically distributes incomingapplication traffic across multiple Amazon EC2 instances in thecloud. It enables you to achieve greater levels of fault tolerancein your applications, seamlessly providing the required amountof load balancing capacity needed to distribute applicationtraffic.

18 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Benefits and Use Cases

Benefits

• Available: Achieve higher levels of fault tolerance for yourapplications

• Elastic: automatically scales its request handling capacityto meet the demands of application traffic

• Secure: provide robust networking and security features

19 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Benefits and Use Cases

Use Cases

• Achieving Even Better Fault Tolerance for YourApplications

• DNS Failover for Elastic Load Balancing

• Auto Scaling with Elastic Load Balancing

• Easy to create an internet-facing entry point into yourVPC or to balance load between tiers of your applicationwithin your VPC

20 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Tasks to be Performed

• Configure Load Balancing

• Assign Security Groups

• Test Your Load Balancer

21 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Tasks to be Performed

• Register a Domain Name

• Allocate Name Servers to Route Traffic for Your Domain

• Create Record Sets for Your Domain and Subdomain

• Set Up a DNS Provider

22 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Clean up

• Delete the Amazon Route 53 Hosted Zone

• Delete the Amazon Route 53 Hosted Zone

• Delete the Auto Scaling Group

• Delete the Load Balance

• Delete Your Custom AMI

• Terminate the DB Instance

23 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Queries...?

24 / 25

Building ADynamicWebsite

AWS MeetupTeam

Speaker’sNote

ArchitectureDiagram

RDS

EC2

Deploy YourApp

ELB

Route 53

Clean up

Thank You...

25 / 25