migrate from parse to aws

33
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Tara E. Walker, Technical Evangelist Amazon Web Services 06.21.2016 Migrate from Parse to AWS Bob Wall CTO/Founder Washio

Upload: amazon-web-services

Post on 11-Feb-2017

1.854 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Migrate from Parse to AWS

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Tara E. Walker,

Technical Evangelist

Amazon Web Services

06.21.2016

Migrate from Parse to AWS

Bob Wall

CTO/Founder

Washio

Page 2: Migrate from Parse to AWS
Page 3: Migrate from Parse to AWS

Parse AWS Migration

Migrate any App or Game from Parse using best practices

and common standards to Amazon Web Services

Several options available for migration:

• Parse Server and MongoDB to AWS

1. Using Elastic Beanstalk

2. Using CloudFormation

• Parse Push to Amazon SNS

• Parse Analytics to Mobile Analytics

• Parse IoT to AWS IoT

Page 4: Migrate from Parse to AWS

Amazon Cognito Amazon Mobile Analytics Amazon SNS Mobile Push

Kinesis Recorder DynamoDB Mapper S3 Transfer Mgr SQS Client SES Client

AWS Global Infrastructure (Regions, Availability Zones, Edge Locations)

Core Building Block

Services

Mobile Optimized

Connectors

Mobile Optimized

Services

Your Mobile App, Game or Device App

AWS Mobile SDK, API Endpoints, Management Console

Compute Storage Networking Analytics Databases

Integrated SDK

AWS Mobile Services

AWS Lambda

Lambda

Functions

λ λλλ

Page 5: Migrate from Parse to AWS

AWS Mobile Services: Intro to Mobile HubFastest Way To Get Started Building Mobile Apps On AWS

AWS

Mobile Hub

AWS Mobile Hub walks through feature

selection & configuration. Automatically

provisions the AWS services desired.

Generates working Quickstart apps for iOS

& Android using provisioned services

Easily add and configure features needed:

Easy access to testing on real devices, as

well as analytics dashboards to track

usage of your app from integrated console.

• User

authentication

• Data storage

• Backend logic

• Push

Notifications

• Content delivery

• Analytics

Page 6: Migrate from Parse to AWS

Parse Migration Overview

Page 7: Migrate from Parse to AWS

Parse Migration OverviewMigration Step 1 – Parse DB to Self-Hosted MongoDB

Page 8: Migrate from Parse to AWS

Parse Migration OverviewMigration Step 2 – Step up Local Parse Server & Test w/Dev Client

Page 9: Migrate from Parse to AWS

Parse Migration OverviewMigration Step 3 – Step up Local Parse Server & Test w/Dev Client

AWS

Page 10: Migrate from Parse to AWS

Parse Migration OverviewMigration Step 4 – Publish New App Pointing to Production Parse Server

AWS

Page 11: Migrate from Parse to AWS

Parse Migration to AWS1. Elastic Beanstalk

2. CloudFormation Template

AWS Elastic

Beanstalk

AWS

CloudFormation

Page 12: Migrate from Parse to AWS

Parse Migration: Using AWS Elastic BeanstalkWhat is Elastic Beanstalk?

• AWS Elastic Beanstalk is a service for deploying and scaling

web applications and services on servers by simply

uploading code

• Automatically handles deployment, capacity provisioning,

load balancing, auto-scaling to application health monitoring.

• Apps and Services can be developed with Java, .NET, PHP,

Node.js, Python, Ruby, Go, and Docker

• Server deployment available for servers such as; Apache,

Nginx, Passenger, and IIS

Page 13: Migrate from Parse to AWS

Parse Migration: Using AWS Elastic BeanstalkStep 1: Run a Parse Server using AWS Elastic Beanstalk

Launch the AWS Elastic Beanstalk

deployment flow by launching Parse

Server on Elastic Beanstalk using

AWS provided template on AWS

Mobile Blog

Name your application

1st time Beanstalk users will

see request to setup the

Identity and Access

Management (IAM) roles

Parse Server EC2 instances

configured & deployed for use

Page 14: Migrate from Parse to AWS

Parse Migration: Using AWS Elastic BeanstalkStep 2: Set up a MongoDB Instance for Data Migration

Choose where & how to run your

MongoDB database instance Manually host your own MongoDB

instance on AWS

Use mLab Database-As-A Service for

MongoDB for AWS Setup

Using mLab Option:

• Setup Account

• Create database subscription

• Connect to New Database

• Migrate Data to new Database (Tip: Easy to use migration with Parse

Dashboard Migrate option)

Page 15: Migrate from Parse to AWS

Parse Migration: Using AWS Elastic BeanstalkStep 3 – Configure AWS and MongoLab in Beanstalk

• Select Software Configuration card

in the Configuration tab of Elastic

Beanstalk.

• Go to the Environment Variables

section

From the Parse dashboard

Get App ID, add value to APP_ID

Property

Get Master Key, add value

MASTER_KEY Property

Get MongoLab Database

connection URI, add value to

DATABASE_URI Property

Page 16: Migrate from Parse to AWS

Parse Migration: Using AWS CloudFormationWhat is CloudFormation?

• AWS CloudFormation provides an easy way to create and

manage a collection of AWS resources

• Easy to organize & deploy a collection of AWS Resources;

Describe dependencies or special parameters to pass at

runtime.

• Deploy and update a template and associated collection of

resources (called a stack) by using the AWS Management

Console, AWS Command Line Interface, or APIs.

Page 17: Migrate from Parse to AWS

Parse Migration: Using AWS CloudFormationStep 1: Launch the CloudFormation stack for a Dev environment

Page 18: Migrate from Parse to AWS

Parse Migration: Using AWS CloudFormationStep 2: Configure your MongoDB instance

• Connect to your MongoDB instance by using SSH, create

a database, and add a new user.

• Provide the database name and user credentials in the

MongoDB Database_URI application parameter. This

parameter is passed to your Parse Server application,

which is running on Elastic Beanstalk.

Page 19: Migrate from Parse to AWS

Parse Migration: Using AWS CloudFormationStep 3: Validate

• Validate Parse Server

web application and API

are working properly.

• When the Parse Server

is running, you should

be able to type the

application endpoint

into a browser and see

the following expected

results..

Page 20: Migrate from Parse to AWS

Customer Migration Story:Washio Parse Migration

Page 21: Migrate from Parse to AWS

© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Bob Wall CTO/Founder Washio

Washio Parse MigrationHow Washio migrated off of Parse

Page 22: Migrate from Parse to AWS

Washio: Migration Procedures

1. Migrate DB

2. Create Self-Hosted Parse Server Cluster

3. Update Clients to Use Self-Hosted Parse Server

Page 23: Migrate from Parse to AWS

Washio: Database Migration

• Self-hosted MongoDB Cluster

Washio migrated using mLab managed MongoDB service

• Migrate Data

Leveraged the Parse Database migration tool

Migrated to Sandbox initially and then after testing moved to dedicated mLab

plan using AWS as Cloud Provider

• Verify Data Transfer

We did byte level checks for Verification using bson

Performed record count verification

• Permanent Parse DB Shut down

Permanently cut over to managed AWS mLab MongoDB instance

• Database read/writes from Parse Server

Monitored mLab performance to determine size of system needed

Page 24: Migrate from Parse to AWS

Migrate Parse Server

• Create a server cluster (we chose AWS Elastic Beanstalk) Fell in line with our current web architecture

Enables redundancy for many hits on the server

• Create new project using the example Parse Server code

Able to do extensive testing to ensure proper connection to an

mLab instance

Enables redundancy for many hits on the server

• Upload and verify Parse API working

Now able to do continuous integration for our cloud code

Page 25: Migrate from Parse to AWS

Migrate Client Applications

• One by one update client applications to use your

hosted Parse Server cluster by setting the appropriate

config setting for each environment (Parse has

documentation for each environment) We decided to rework our parse register and login to use our own

homegrown version at this time

Moved all our apps 100% off of Parse, so that only our API is now using

it to talk directly to Parse

• Be sure to update all client applications before January

28, 2017

Page 26: Migrate from Parse to AWS

Gotchas

• Parse Server requires emailAdapter to be set for password reset emails to work

• Parse Cloud Code running on the Parse Server will need to be adapted as many methods were removed from it

• Parse Cloud Code needs to be configured to use your hosted Parse Server even when running on the same cluster

• The open-source version of Parse Server is constantly changing, and may undergo some breaking changes soon. Developer discretion is advised when deciding up update to latest and greatest from the GitHub repo.

Page 27: Migrate from Parse to AWS

System Architecture - Before

Clients Washio API

Parse API

Postgres

MongoDB

Washio

Parse

Page 28: Migrate from Parse to AWS

System Architecture - After

Clients

Washio API

Parse API

Postgres

MongoDB

Washio

Page 29: Migrate from Parse to AWS

System Architecture - Actual

Page 30: Migrate from Parse to AWS

Washio Demo

Page 31: Migrate from Parse to AWS

Next Steps

Page 32: Migrate from Parse to AWS

Get Started: Parse Migration to AWSNext Steps

1. Review and choose an option for Parse Migration to AWS: https://aws.amazon.com/mobile/getting-started/

2. Read the Migration and Developer Guides for Parse Migration to AWS

• https://mobile.awsblog.com/post/Tx3LNEWJS45OYA9/Setting-up-Parse-Server-

and-MongoDB-on-AWS-using-CloudFormation

• https://mobile.awsblog.com/post/Tx3NE69QDHI7LJK/Migrating-from-Parse-Push-to-Amazon-SNS

• http://mobile.awsblog.com/post/Tx34JL4KCS9RBNH/Transition-Guide-Parse-Analytics-to-Amazon-Mobile-Analytics

• https://mobile.awsblog.com/post/Tx9EQ3MIJ85M4V/Welcome-Parse-IoT-Customers

3. Check out Webinar for Parse Migration to AWS

• https://www.youtube.com/watch?v=0Q0RBYoFIWU&feature=youtu.be

4. Leverage Parse resources & Migration Guide: https://parse.com/migration

Page 33: Migrate from Parse to AWS

Thank You!