BuildingaDevOpspipelineforServerlessbyusing
Mocha,GitHubandTravisSami Pippuri
CTOJames Nguyen
Software Developer
Maas Global
MaaS Global is building the future of mobility
System Goals
Goals
• Scalable, cloud-based• Mobile-first customerexperience• Utilizing readymade cloudAPIs• Infrastructure-as-code• Establish industrystandardAPIswhere they
don’texistyet• Openforecosystempartners• Createenthusiasm inthewiderecosystem–
enablee.g.Universities andsmallerdeveloperhousesaroundtheworld
Non-Goals
• Closedarchitecture orlock-ins (exceptAWS)
• Exclusive deals• Server infrastructure• Intermediate, all-
encompassingframeworks
• Something foreverybody
Loosely coupled Microservice API integrations –flexible inclusion into MaaS framework
Routing
TrafficOperatorTrafficOperatorTrafficOperatorTransportOperator
Weather
SubscriptionPayment
Identity
BusinessRules
CustomerSupport
Whimbackend
APIGW
WhimApps
Tech Stacks
MaaSCore
Lambda(Node.js4.x,ES6)
Serverless
AWSComponents*
RESTAPIs
Apps Backend Integrations
MaaSSchemas MaaS-API SBUS
*APIGW,S3,DynamoDB,RDS(psql),Route53,IoT,Cognito,CloudFront,CloudWatch,SNS,Kinesis,ML,SWF, IAM,ACM…
SWFbackgroundprocessing
SNS
REST
Infrastructure – Serverless, cloud-native
WhimApps
APIGatewayapi.maas.globalMaaSCore
MaaSTSP
TripMachine
Identity
Kinesisevents
DataStorage
RDSPostgres
What is Serverless?- Is:
- Opensource.
- Notreallyserver-less.
- AframeworkcentralizedinmanagingAWSLambda,APIGatewayandCloudFormation.
- Robust,auto-scaling,fastandreliable.
- Extensibleinitselfwithanicepluginsystemaswellashavingbigsupportsfromthecommunity
- Isnot:
- Aserver.
- Helpingyouwritingthecode.
- Yetpossibletoberunon-premise
Checkoutathttps://serverless.com/
Project Deployment
Serverless
autoinstall meta
mocha
Webpack
Basetoolstack
TravisCI
PROD(Alpha)
Unit&integrationtesting
Deploy tostages
(4ofthem)
PROD
DEVTEST
ContinuousDeployment(!)
Testharness
Depsripts
Localtestharness
Detailedworkflow
Featuredevelopment *
Codereview**
Openpullrequest**
Mergeonto master**
Releasealpha**
Releaseproduction**
Featuretesting *
Fieldtest***
Smoketests***
DevDeveloper’s fork
TestMasterbranch
AlphaAlphabranch
ProdProd branch
Taggingcandidates
Documentingreleases
Changelog
Bugfixes*
*Manualtesting **Automated test with Travis ***Application test
Autodeployment inaction!
SomeResources• MaaSTransport Service Provider API:http://www.maas-api.org• Serverless Mocha testplugin: https://github.com/SC5/serverless-mocha-plugin• MetaSync plugin: https://github.com/serverless/serverless-meta-sync (superceded insls 1.3)• Webpack plugin (fork) forfastercold starts:https://github.com/laurisvan/serverless-webpack-plugin• Request-promise-lite, smaller versionof request-promise tokeep Lambdasizedown: https://github.com/laurisvan/request-promise-lite
• Serverless v1.xboilerplate https://github.com/SC5/sc5-serverless-v1-boilerplate• Knex /Objection.js foraneasyORMonNodejs: http://vincit.github.io/objection.js/
SeeWhim Live
whimapp.comSAMI PIPPURI
CTO, MaaS Global [email protected]
+358 50 487 6829 / @pippuri
JAMES NGUYENDeveloper, MaaS Global [email protected]
Top Related