whim and serverless devops with mocha, github and travis
TRANSCRIPT
![Page 1: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/1.jpg)
BuildingaDevOpspipelineforServerlessbyusing
Mocha,GitHubandTravisSami Pippuri
CTOJames Nguyen
Software Developer
Maas Global
![Page 2: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/2.jpg)
MaaS Global is building the future of mobility
![Page 3: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/3.jpg)
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
![Page 4: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/4.jpg)
Loosely coupled Microservice API integrations –flexible inclusion into MaaS framework
Routing
TrafficOperatorTrafficOperatorTrafficOperatorTransportOperator
Weather
SubscriptionPayment
Identity
BusinessRules
CustomerSupport
Whimbackend
APIGW
WhimApps
![Page 5: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/5.jpg)
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
![Page 6: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/6.jpg)
Infrastructure – Serverless, cloud-native
WhimApps
APIGatewayapi.maas.globalMaaSCore
MaaSTSP
TripMachine
Identity
Kinesisevents
DataStorage
RDSPostgres
![Page 7: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/7.jpg)
What is Serverless?- Is:
- Opensource.
- Notreallyserver-less.
- AframeworkcentralizedinmanagingAWSLambda,APIGatewayandCloudFormation.
- Robust,auto-scaling,fastandreliable.
- Extensibleinitselfwithanicepluginsystemaswellashavingbigsupportsfromthecommunity
- Isnot:
- Aserver.
- Helpingyouwritingthecode.
- Yetpossibletoberunon-premise
Checkoutathttps://serverless.com/
![Page 8: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/8.jpg)
Project Deployment
Serverless
autoinstall meta
mocha
Webpack
Basetoolstack
TravisCI
PROD(Alpha)
Unit&integrationtesting
Deploy tostages
(4ofthem)
PROD
DEVTEST
ContinuousDeployment(!)
Testharness
Depsripts
Localtestharness
![Page 9: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/9.jpg)
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
![Page 10: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/10.jpg)
Autodeployment inaction!
![Page 11: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/11.jpg)
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/
![Page 12: Whim and Serverless DevOps with Mocha, Github and Travis](https://reader033.vdocuments.net/reader033/viewer/2022052706/587fb9701a28ab107e8b71bf/html5/thumbnails/12.jpg)
SeeWhim Live
whimapp.comSAMI PIPPURI
CTO, MaaS Global [email protected]
+358 50 487 6829 / @pippuri
JAMES NGUYENDeveloper, MaaS Global [email protected]