buk.io serverless deployment

8
Serverless Deployment with AWS http://buk.io Knowledge Innovation Minsu Kang [email protected]

Upload: minsu-kang

Post on 04-Aug-2015

176 views

Category:

Software


0 download

TRANSCRIPT

Page 1: buk.io Serverless deployment

Serverless Deploymentwith AWS

http://buk.io Knowledge Innovation

Minsu Kang [email protected]

Page 2: buk.io Serverless deployment

buk.io

http://buk.io

• Preview version 0.1 • Wikipedia in pages (no scrolls) • HTML in Knowledge Viewer • Only static web hosting with AWS

Page 3: buk.io Serverless deployment

AWS S3

Static file hosting with your domainEndpoint: buk.io.s3-website-us-east-1.amazonaws.comIndex Document: index.htmlRedirection Rules:<RoutingRules> <RoutingRule> <Condition> <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> </Condition> <Redirect> <HostName>buk.io</HostName> <ReplaceKeyPrefixWith>view/index.html#!</ReplaceKeyPrefixWith> </Redirect> </RoutingRule> </RoutingRules>

Page 4: buk.io Serverless deployment

S3 Redirection

<RoutingRules> <RoutingRule> <Condition> <HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals> </Condition> <Redirect> <HostName>buk.io</HostName> <ReplaceKeyPrefixWith>view/index.html#!</ReplaceKeyPrefixWith> </Redirect> </RoutingRule> </RoutingRules>

Page 5: buk.io Serverless deployment

URL Redirection

1. from User Browser: buk.io/@en/Star_Wars

S3 Redirection on “404” Error

2. from User Browser: buk.io/view/index.html#!@en/Star_Wars

3. Load buk.io/view/index.html (#! part is not real server path)

4. JavaScript in index.html rewrite URL to buk.io/@en/Star_Wars

5. from User Browser: buk.io/@en/Star_Wars

Page 6: buk.io Serverless deployment

AWS CloudFront

Reduces loading time significantly from everywhere

* Use AWS Rout53 for the domain for easy maintenance

Page 7: buk.io Serverless deployment

www.buk.io buk.io

Create www.buk.io bucket and link it to www.buk.io CNAME record for buk.io DNS settings

from S3 static website hosting, redirect all requests to buk.io

Page 8: buk.io Serverless deployment

Technology Stack

Front End : AngularJS, CSS, HTML, JavaScript Server : Google App Engine (Python)

Content Processing : Python/NodeJS

[email protected]