SlideShare uma empresa Scribd logo
1 de 22
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved
Amazon Lightsail Workshop
Deploying and scaling a Node.js app on Lightsail
Mike Coleman, Developer Advocate
@mikegcoleman
mikegcol@amazon.com
Who am I
•Developer Advocate for Amazon Lightsail
•But, I’m not a developer
•Based out of Portland, Oregon
•Previous: Docker, Puppet (Labs), VMware, Microsoft,
Intel, HP(E)
•@mikegcoleman (but I tweet about soccer, a lot)
What you will learn
After today you will be understand how to:
• What is Amazon Lightsail
• When do you choose Lightsail
• Launch a monolithic application on Lightsail
• Break out app components
• Scale an application using snapshots and
a load balancer
Amazon Lightsail: Cloud made easy
• Bundled compute, storage, networking
• Fully configured server
• Low, predictable price
• Intuitive, global Lightsail console
• Easy growth path
• Access to AWS services
• Tailored API & CLI
What you need to set up an instance in AWS:
Launch
VM
Attach
SSD storage
Manage
IAM
Create
Security Groups
Manage
SSH Keys
Go!
Under the hood
Jumpstart or Build Your Own with Blueprints
Preconfigured Applications
and Dev Stacks
Operating System Only
When to choose Lightsail?
• Small-scale multi-tier apps
• Websites
• Web apps
• Testing environment
• Line-of-business software
• Large, multi-tier applications
(several dozens of instances)
• Anything requiring instances that
are workload optimized, highly
configurable, or resource
intensive
• E.g., Big data analytics, High performance
computing, Scientific computing
• Advanced networking
Common Application Architectures
Single-Tier /
Monolithic
Multi-Tier Traditional Multi-Tier Cloud-native
Image Credit: Bitnami (https://bitnami.com/aws)
Common Application Architectures
Single-Tier /
Monolithic
Multi-Tier Traditional Multi-Tier Cloud-native
Image Credit: Bitnami (https://bitnami.com/aws)
Today’s Focus
Node / Express Web Front End
MongoDB back end
Phase 1:
• Deploy monolithic app into Lightsail
MEAN blueprint
Phase 2:
• Separate front end from Database
• Scale front end
• Deploy a Lightsail load balancer
The Application: Simple Todo List
Lightsail MEAN blueprint
• MEAN – Mongo, Express, Angular, Node
• Preconfigured Bitnami image includes
• MongoDB
• Node.JS
• Express
• AngularJS
• Apache
• Git
• PHP
• RockMongo
Getting our Application Running
• Create Lightsail instance
• Disable Apache
• Create user account in Mongo
• Clone Github repo
• Configure application environment variables
• Run the app
Application Architecture – Version 1
Node / Express Application
MongoDB
(mongodb://localhost:27017)
Single Lightsail Instance
http traffic
Customer
Demo
Monolithic Node App
Refining our application
Potential issues:
• Single point of failure
• Responding to increasing demand
• Database / web front end tied closely together
Solution:
• Separate database / web front end
• Created multiple front end instances
• Add a Lightsail load balancer
Application Architecture – Version 1
Node App
MongoDB
Single Lightsail Instance
http
Customer
What you will do
•Deploy two instances
•Installed and configure Mongo in one
instance
•Installed and configure application code in
the other
Application Architecture – Version 2a
Node App
http
MongoDB
Customer
Scaling the front end with snapshots
•Front end is stateless
•Create Lightsail snapshot
•Deploy multiple instances from snapshot
•Create Lightsail load balancer
•And front-end instances to Load balancer
Lightsail load balancers
•Simplified Amazon load
balancer implementation
•Set up in a few clicks
•Handles http / https traffic
•Balances across ports 80
and 443
Application Architecture – Version 2b
Node
App
http
Customer MongoDBLoadBalancer
Node
App
Node
App
Demo
Scaling the front end

Mais conteúdo relacionado

Mais procurados

Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
Alan Hecht
 
IAM EclipseCon 2009
IAM EclipseCon 2009IAM EclipseCon 2009
IAM EclipseCon 2009
mpoindexter
 

Mais procurados (20)

Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"Oleksandr Skachkov "How to run WebAssembly in your React web application"
Oleksandr Skachkov "How to run WebAssembly in your React web application"
 
Meteor + React
Meteor + ReactMeteor + React
Meteor + React
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
Meteor intro-2015
Meteor intro-2015Meteor intro-2015
Meteor intro-2015
 
Building rest services using aspnetwebapi
Building rest services using aspnetwebapiBuilding rest services using aspnetwebapi
Building rest services using aspnetwebapi
 
Building a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet coreBuilding a Google Cloud Firestore API with dotnet core
Building a Google Cloud Firestore API with dotnet core
 
Service Configuration Management for Rapid Growth
Service Configuration Management for Rapid GrowthService Configuration Management for Rapid Growth
Service Configuration Management for Rapid Growth
 
Automation Awesomeness: Scaling JIRA Service Desk
Automation Awesomeness: Scaling JIRA Service DeskAutomation Awesomeness: Scaling JIRA Service Desk
Automation Awesomeness: Scaling JIRA Service Desk
 
Getting Started with Spring Boot
Getting Started with Spring BootGetting Started with Spring Boot
Getting Started with Spring Boot
 
React & Redux, how to scale?
React & Redux, how to scale?React & Redux, how to scale?
React & Redux, how to scale?
 
Getting Started with ASP.NET 5
Getting Started with ASP.NET 5Getting Started with ASP.NET 5
Getting Started with ASP.NET 5
 
10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster10 tips to make your ASP.NET Apps Faster
10 tips to make your ASP.NET Apps Faster
 
Intro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NETIntro to SPA using JavaScript & ASP.NET
Intro to SPA using JavaScript & ASP.NET
 
IAM EclipseCon 2009
IAM EclipseCon 2009IAM EclipseCon 2009
IAM EclipseCon 2009
 
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
Puppet Camp Melbourne Nov 2014 - A Build Engineering Team’s Journey of Infras...
 
Write Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js MunichWrite Once, Run Everywhere - Ember.js Munich
Write Once, Run Everywhere - Ember.js Munich
 
The future of web development write once, run everywhere with angular js an...
The future of web development   write once, run everywhere with angular js an...The future of web development   write once, run everywhere with angular js an...
The future of web development write once, run everywhere with angular js an...
 
Real World Rails Deployment
Real World Rails DeploymentReal World Rails Deployment
Real World Rails Deployment
 
SymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSkySymfonyCon Cluj 2017 - Symfony at OpenSky
SymfonyCon Cluj 2017 - Symfony at OpenSky
 
Ajax presentation
Ajax presentationAjax presentation
Ajax presentation
 

Semelhante a Deploying and Scaling Your First Cloud Application with Amazon Lightsail

Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
Tianwei_liu
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Aaron Saunders
 

Semelhante a Deploying and Scaling Your First Cloud Application with Amazon Lightsail (20)

Simple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike ColemanSimple Cloud with Amazon Lightsail - Mike Coleman
Simple Cloud with Amazon Lightsail - Mike Coleman
 
Simple Cloud with Amazon Lightsail
Simple Cloud with Amazon LightsailSimple Cloud with Amazon Lightsail
Simple Cloud with Amazon Lightsail
 
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and AngularEscaping the yellow bubble - rewriting Domino using MongoDb and Angular
Escaping the yellow bubble - rewriting Domino using MongoDb and Angular
 
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar SeriesGetting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
Getting Started With Continuous Delivery on AWS - AWS April 2016 Webinar Series
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Application Lifecycle Management
Application Lifecycle ManagementApplication Lifecycle Management
Application Lifecycle Management
 
Test+video+upload
Test+video+uploadTest+video+upload
Test+video+upload
 
How to build a SaaS solution in 60 days
How to build a SaaS solution in 60 daysHow to build a SaaS solution in 60 days
How to build a SaaS solution in 60 days
 
Customer Sharing: iCook - Continuous Deployment with AWS
Customer Sharing: iCook - Continuous Deployment with AWSCustomer Sharing: iCook - Continuous Deployment with AWS
Customer Sharing: iCook - Continuous Deployment with AWS
 
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer ToolsDevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
DevOps on AWS: Deep Dive on Continuous Delivery and the AWS Developer Tools
 
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
Integrate Applications into IBM Connections Cloud and On Premises (AD 1632)
 
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
Amsterdam Titanium User Group - Cloud Services for Apps Nov 2013
 
Deploy, manage, and scale your apps
Deploy, manage, and scale your appsDeploy, manage, and scale your apps
Deploy, manage, and scale your apps
 
DevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San FranciscoDevOps on AWS: DevOps Day San Francisco
DevOps on AWS: DevOps Day San Francisco
 
Dev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - TorontoDev ops on aws deep dive on continuous delivery - Toronto
Dev ops on aws deep dive on continuous delivery - Toronto
 
DevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous DeliveryDevOps On AWS - Deep Dive on Continuous Delivery
DevOps On AWS - Deep Dive on Continuous Delivery
 
Developer Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdfDeveloper Tools at AWS 2018.pdf
Developer Tools at AWS 2018.pdf
 
Mete Atamel "An app modernization story with Cloud Run"
Mete Atamel "An app modernization story with Cloud Run"Mete Atamel "An app modernization story with Cloud Run"
Mete Atamel "An app modernization story with Cloud Run"
 
Appcelerator’s Cocoafish Acquisition and the Future of the Mobile Cloud
Appcelerator’s Cocoafish Acquisition and the  Future of the Mobile Cloud Appcelerator’s Cocoafish Acquisition and the  Future of the Mobile Cloud
Appcelerator’s Cocoafish Acquisition and the Future of the Mobile Cloud
 

Mais de AWS Germany

Mais de AWS Germany (20)

Analytics Web Day | From Theory to Practice: Big Data Stories from the Field
Analytics Web Day | From Theory to Practice: Big Data Stories from the FieldAnalytics Web Day | From Theory to Practice: Big Data Stories from the Field
Analytics Web Day | From Theory to Practice: Big Data Stories from the Field
 
Analytics Web Day | Query your Data in S3 with SQL and optimize for Cost and ...
Analytics Web Day | Query your Data in S3 with SQL and optimize for Cost and ...Analytics Web Day | Query your Data in S3 with SQL and optimize for Cost and ...
Analytics Web Day | Query your Data in S3 with SQL and optimize for Cost and ...
 
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...Modern Applications Web Day | Impress Your Friends with Your First Serverless...
Modern Applications Web Day | Impress Your Friends with Your First Serverless...
 
Modern Applications Web Day | Manage Your Infrastructure and Configuration on...
Modern Applications Web Day | Manage Your Infrastructure and Configuration on...Modern Applications Web Day | Manage Your Infrastructure and Configuration on...
Modern Applications Web Day | Manage Your Infrastructure and Configuration on...
 
Modern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWSModern Applications Web Day | Container Workloads on AWS
Modern Applications Web Day | Container Workloads on AWS
 
Modern Applications Web Day | Continuous Delivery to Amazon EKS with Spinnaker
Modern Applications Web Day | Continuous Delivery to Amazon EKS with SpinnakerModern Applications Web Day | Continuous Delivery to Amazon EKS with Spinnaker
Modern Applications Web Day | Continuous Delivery to Amazon EKS with Spinnaker
 
Building Smart Home skills for Alexa
Building Smart Home skills for AlexaBuilding Smart Home skills for Alexa
Building Smart Home skills for Alexa
 
Hotel or Taxi? "Sorting hat" for travel expenses with AWS ML infrastructure
Hotel or Taxi? "Sorting hat" for travel expenses with AWS ML infrastructureHotel or Taxi? "Sorting hat" for travel expenses with AWS ML infrastructure
Hotel or Taxi? "Sorting hat" for travel expenses with AWS ML infrastructure
 
Wild Rydes with Big Data/Kinesis focus: AWS Serverless Workshop
Wild Rydes with Big Data/Kinesis focus: AWS Serverless WorkshopWild Rydes with Big Data/Kinesis focus: AWS Serverless Workshop
Wild Rydes with Big Data/Kinesis focus: AWS Serverless Workshop
 
Log Analytics with AWS
Log Analytics with AWSLog Analytics with AWS
Log Analytics with AWS
 
Deep Dive into Concepts and Tools for Analyzing Streaming Data on AWS
Deep Dive into Concepts and Tools for Analyzing Streaming Data on AWS Deep Dive into Concepts and Tools for Analyzing Streaming Data on AWS
Deep Dive into Concepts and Tools for Analyzing Streaming Data on AWS
 
AWS Programme für Nonprofits
AWS Programme für NonprofitsAWS Programme für Nonprofits
AWS Programme für Nonprofits
 
Microservices and Data Design
Microservices and Data DesignMicroservices and Data Design
Microservices and Data Design
 
Serverless vs. Developers – the real crash
Serverless vs. Developers – the real crashServerless vs. Developers – the real crash
Serverless vs. Developers – the real crash
 
Query your data in S3 with SQL and optimize for cost and performance
Query your data in S3 with SQL and optimize for cost and performanceQuery your data in S3 with SQL and optimize for cost and performance
Query your data in S3 with SQL and optimize for cost and performance
 
Secret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s VaultSecret Management with Hashicorp’s Vault
Secret Management with Hashicorp’s Vault
 
EKS Workshop
 EKS Workshop EKS Workshop
EKS Workshop
 
Scale to Infinity with ECS
Scale to Infinity with ECSScale to Infinity with ECS
Scale to Infinity with ECS
 
Containers on AWS - State of the Union
Containers on AWS - State of the UnionContainers on AWS - State of the Union
Containers on AWS - State of the Union
 
Building Personalized Data Products - From Idea to Product
Building Personalized Data Products - From Idea to ProductBuilding Personalized Data Products - From Idea to Product
Building Personalized Data Products - From Idea to Product
 

Último

Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 

Deploying and Scaling Your First Cloud Application with Amazon Lightsail

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved Amazon Lightsail Workshop Deploying and scaling a Node.js app on Lightsail Mike Coleman, Developer Advocate @mikegcoleman mikegcol@amazon.com
  • 2. Who am I •Developer Advocate for Amazon Lightsail •But, I’m not a developer •Based out of Portland, Oregon •Previous: Docker, Puppet (Labs), VMware, Microsoft, Intel, HP(E) •@mikegcoleman (but I tweet about soccer, a lot)
  • 3. What you will learn After today you will be understand how to: • What is Amazon Lightsail • When do you choose Lightsail • Launch a monolithic application on Lightsail • Break out app components • Scale an application using snapshots and a load balancer
  • 4. Amazon Lightsail: Cloud made easy • Bundled compute, storage, networking • Fully configured server • Low, predictable price • Intuitive, global Lightsail console • Easy growth path • Access to AWS services • Tailored API & CLI
  • 5. What you need to set up an instance in AWS: Launch VM Attach SSD storage Manage IAM Create Security Groups Manage SSH Keys Go! Under the hood
  • 6. Jumpstart or Build Your Own with Blueprints Preconfigured Applications and Dev Stacks Operating System Only
  • 7. When to choose Lightsail? • Small-scale multi-tier apps • Websites • Web apps • Testing environment • Line-of-business software • Large, multi-tier applications (several dozens of instances) • Anything requiring instances that are workload optimized, highly configurable, or resource intensive • E.g., Big data analytics, High performance computing, Scientific computing • Advanced networking
  • 8. Common Application Architectures Single-Tier / Monolithic Multi-Tier Traditional Multi-Tier Cloud-native Image Credit: Bitnami (https://bitnami.com/aws)
  • 9. Common Application Architectures Single-Tier / Monolithic Multi-Tier Traditional Multi-Tier Cloud-native Image Credit: Bitnami (https://bitnami.com/aws) Today’s Focus
  • 10. Node / Express Web Front End MongoDB back end Phase 1: • Deploy monolithic app into Lightsail MEAN blueprint Phase 2: • Separate front end from Database • Scale front end • Deploy a Lightsail load balancer The Application: Simple Todo List
  • 11. Lightsail MEAN blueprint • MEAN – Mongo, Express, Angular, Node • Preconfigured Bitnami image includes • MongoDB • Node.JS • Express • AngularJS • Apache • Git • PHP • RockMongo
  • 12. Getting our Application Running • Create Lightsail instance • Disable Apache • Create user account in Mongo • Clone Github repo • Configure application environment variables • Run the app
  • 13. Application Architecture – Version 1 Node / Express Application MongoDB (mongodb://localhost:27017) Single Lightsail Instance http traffic Customer
  • 15. Refining our application Potential issues: • Single point of failure • Responding to increasing demand • Database / web front end tied closely together Solution: • Separate database / web front end • Created multiple front end instances • Add a Lightsail load balancer
  • 16. Application Architecture – Version 1 Node App MongoDB Single Lightsail Instance http Customer
  • 17. What you will do •Deploy two instances •Installed and configure Mongo in one instance •Installed and configure application code in the other
  • 18. Application Architecture – Version 2a Node App http MongoDB Customer
  • 19. Scaling the front end with snapshots •Front end is stateless •Create Lightsail snapshot •Deploy multiple instances from snapshot •Create Lightsail load balancer •And front-end instances to Load balancer
  • 20. Lightsail load balancers •Simplified Amazon load balancer implementation •Set up in a few clicks •Handles http / https traffic •Balances across ports 80 and 443
  • 21. Application Architecture – Version 2b Node App http Customer MongoDBLoadBalancer Node App Node App