Novandi Barus Senior Developer Advocate, AWS Indonesia Deploying Laravel Microservice App using Serverless Container AWS User Group Surabaya @petrabarus
to meet you all! My name is Petra Novandi Barus 8 years happy customer of AWS ❤ Startups, DevOps, App Dev, Distributed Systems 2011 CTO & Co-founder, UrbanIndo.com 2016 Largest real-estate portal in Indonesia 2018 Acquired by 99.co (SG) 2018 Country CTO, 99.co Indonesia 2019 Developer Relations, AWS twitter.com/petrabarus t.me/petrabarus Contact
Problem • Different application stacks • Different hardware deployment environments • How to run all applications across different environments? • How to easily migrate from one environment to another? Static website Web fronted Background workers User DB Analytics DB Queue Dev VM QA Server Single Prod Server Onsite Cluster Public Cloud Team laptop Customer Servers
Solution • Unit of software delivery • Lightweight, portable, consistent • Deploy and run everywhere • Deploy and run anything • Bridge between dev and ops Static website Web fronted Background workers User DB Analytics DB Queue Dev VM QA Server Single Prod Server Onsite Cluster Public Cloud Contributor’s laptop Customer Servers
architectures Mobile client Client IoT API Gateway Account DB Shipping DB Inventory DB Store Front Web App Account Lookup Shipment Query Inventory Query
Managing Multiple Containers Mobile client Client IoT API Gateway Account DB Shipping DB Inventory DB Store Front Web App Account Lookup Shipment Query Inventory Query
rights reserved. Amazon Confidential Your containerized applications Managed by AWS No EC2 Instances to provision, scale or manage Elastic Scale up & down seamlessly. Pay only for what you use Integrated with the AWS ecosystem: VPC Networking, Elastic Load Balancing, IAM Permissions, CloudWatch and more AWS Fargate
/ Share Nothing Process Local filesystem / memory only for short cache Store sessions/asset/data in centralized • File/Asset → S3 • Sessions → DynamoDB • PHP store session in local by default → Linux: /tmp/sess_xxxxxx • Use AWS PHP SDK session store • Database → RDS/DynamoDB • Cache → Elasticache
Store External Configuration Inside Container - Container should be able to run in multiple environment - Store configurations in - Environment Variables - Parameter Store - Secrets Manager