SlideShare a Scribd company logo
Hello Cloud
GIREESH KUMAR
Topics
 The DHARMA Principles
DHARMA Principles
 Documented (just enough)
 Highly cohesive/loosely coupled (all the way down)
 Automated from commit to cloud
 Resource aware
 Monitored thoroughly
 Antifragile
12 Factor App
Guidelines for writing scalable SaaS apps
http://12factor.net/
12 Factor App
1. Codebase
2. Dependencies
3. Config
4. Backing Services
5. Build, Release Run
6. Process
7. Port Binding
8. Concurrency
9. Disposability
10.Dev/Prod Parity
11.Logs
12.Admin Process
12 Factor App
Codebase
one codebase, multiple deploys
12 Factor App – Codebase
One codebase, multiple deploys
 Use version control like ‘git’
 If there are multiple codebases, it’s not an app – it’s a
distributed system
 Multiple apps sharing the same code is a violation of
twelve-factor
 The codebase is the same across all deploys, although
different versions may be active in each deploy
12 Factor App
Dependencies
Explicitly Declare and isolate
12 Factor App – Dependencies
Explicitly Declare and isolate
 Declare dependencies in a manifest
 Use isolation tools
 Specific version are important
 Never rely on implicit existence of system wide packages
 Eg. nodejs ‘package.json’ / Ruby Gem file etc
12 Factor App
Config
Store in the environment
12 Factor App – Config
Store in the environment
 Information required to host a deployment of your codebase
 Mainly DB Credentials, path, resources etc
 Should be strictly separated from code
 Configuration belongs in the environment not in the application
 No config in git
 Use Environment vars (like ENV['DATABASE_URL'] )
12 Factor App
Backing Services
As Attached resources
12 Factor App – Backing Services
As attached resources
 Backing Services
 Data store
 SMTP
 Cache
 Amazon S3
 Twitter
 Make no distinction between local and third party services
12 Factor App
Build, Release, Run
Strictly separate build & run stage
12 Factor App – Build, Release, Run
Strictly separate build & run stage
BUILD = Codebase + dependencies + assets
RELEASE = Build + config
RUN = Run process against Release
 Strict separation between stages
 Cannot change code at runtime
 Rollback = use the last release instead
 Every release should always have a unique release ID
12 Factor App
Processes
Execute the app as one or more stateless process
12 Factor App – Processes
Execute the app as one or more stateless process
 Does the running of the release
 Is stateless
 Share nothing with other process
 Use single transaction only caches
 No sticky sessions - Use session state data with memcached/redis
 Asset pre-compilation instead of over runtime calculation
12 Factor App
Port Binding
Export services via port binding
12 Factor App – Port Binding
Export services via port binding
The contract with the execution environment is binding to a port to serve request .
App is completely self-contained
Booking
http://192.168.123.45:5555
Shop
http://23.123.34.54:5505
12 Factor App
Concurrency
Scale out via the process model
12 Factor App – Concurrency
Scale out via the process model
 Scale out via the process model (by running multiple process of different types)
 Process are the first class citizens
 Assign to work to a process type (web, db, worker etc)
 Can then handle own multiplexing
 Process don't demonize or write PID files
 Instead using system process manager
12 Factor App
Disposability
Maximize robustness with fast startup and graceful shutdown
12 Factor App – Disposability
Maximize robustness with fast startup and graceful shutdown
 Process are disposable (they can be started or stopped at a moment’s notice)
 Start quickly
 Shutdown gracefully
 Be robust against sudden death
12 Factor App
Dev Prod Parity
Keep development, staging and production as similar as possible
12 Factor App – Dev Prod Parity
Keep development, staging and production as similar as possible
 Gaps
 The time gap: A developer may work on code that takes days, weeks, or even months to go into production.
 The personnel gap: Developers write code, ops engineers deploy it.
 The tools gap: Developers may be using a stack like Nginx, SQLite, and OS X, while the production deploy uses
Apache, MySQL, and Linux.
 Make the time gap small: a developer may write code and have it deployed hours or even just minutes
later.
 Make the personnel gap small: developers who wrote code are closely involved in deploying it and
watching its behavior in production.
 Make the tools gap small: keep development and production as similar as possible.
12 Factor App
Logs
Treat logs as event streams
12 Factor App – Logs
Treat logs as event streams
 Dont route or store logs in files
 Stream to stout instead and be captured and handled by environment
12 Factor App
Admin processes
Run admin/management tasks as one-off processes
12 Factor App – Admin processes
Run admin/management tasks as one-off processes
 Database migration
 Console view
 Running one time scripts
 Run as seperate process
 Run against the same release
 Admin code ships with app code
Hello  cloud 6
Next

More Related Content

PPTX
The twelve factor app
PDF
The 12 Factors for Building Cloud-Native Software
PPTX
12 factor app
PDF
Twelve factor apps
PDF
12 factor app - Core Guidelines To Cloud Ready Solutions
PDF
12 FACTOR APP WITH DOCKER
PPTX
Micro services, reactive manifesto and 12-factors
PDF
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...
The twelve factor app
The 12 Factors for Building Cloud-Native Software
12 factor app
Twelve factor apps
12 factor app - Core Guidelines To Cloud Ready Solutions
12 FACTOR APP WITH DOCKER
Micro services, reactive manifesto and 12-factors
12 Factor, or Cloud Native Apps - What EXACTLY Does that Mean for Spring Deve...

What's hot (20)

PDF
The Twelve-Factor App
PPTX
Give Your Java Apps “The Boot” With Spring Boot And Cloud Foundry
PDF
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
PDF
Introduction To Jenkins - SpringPeople
PDF
BENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICS
PPTX
Building 12 factor apps with ASP.NET Core, Сергій Калинець
PPTX
Microservices
PPTX
ThatConference 2016 - Highly Available Node.js
PDF
Spring Boot Loves K8s
PDF
Ingress? That’s So 2020! Introducing the Kubernetes Gateway API
PPTX
Boston Bluemix Meetup 5/15/14
PDF
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
PPTX
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
PDF
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
PDF
DevOpsDays Openstack Toolchains
PDF
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
PDF
XebiaLabs - Optimizing App Deployment to IBM WebSphere
PPT
ZENworks Application Virtualization
PDF
Provisioning Toolchain Introduction for Velocity Online Conference (March 2010)
PPTX
Deploying Spring Boot apps on Kubernetes
The Twelve-Factor App
Give Your Java Apps “The Boot” With Spring Boot And Cloud Foundry
Transporting Data at Warp Speed: How to Connect Spring Boot Apps Quickly, Pow...
Introduction To Jenkins - SpringPeople
BENEFIT OF FLUTTER APP DEVELOPMENT - INFOGRAPHICS
Building 12 factor apps with ASP.NET Core, Сергій Калинець
Microservices
ThatConference 2016 - Highly Available Node.js
Spring Boot Loves K8s
Ingress? That’s So 2020! Introducing the Kubernetes Gateway API
Boston Bluemix Meetup 5/15/14
Cloud Native Testing, 2020 Edition: A Modern Blueprint for Pre-production Tes...
Aiming for automatic updates - Drupal Dev Days Lisbon 2018
“Sh*^%# on Fire, Yo!”: A True Story Inspired by Real Events
DevOpsDays Openstack Toolchains
Continuous Delivery: Fly the Friendly CI in Pivotal Cloud Foundry with Concourse
XebiaLabs - Optimizing App Deployment to IBM WebSphere
ZENworks Application Virtualization
Provisioning Toolchain Introduction for Velocity Online Conference (March 2010)
Deploying Spring Boot apps on Kubernetes
Ad

Similar to Hello cloud 6 (20)

PDF
PDF
PPTX
12 Factor App Methodology
PDF
The twelve factor app
PDF
15-factor-apps.pdf
PPTX
The Twelve-Factor App
PDF
The Twelve Factor Apps
PDF
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
PDF
12 factor app
PDF
The Twelve Factor App
PDF
Adopting a PaaS Solution (Part 2) - Red Hat DevOps & Microservices Conference...
PDF
Twelve-Factor App: Software Application Architecture
PPTX
12 Factor App
PDF
The 12 Factor App
PDF
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
PDF
12 Steps to DevOps Nirvana
PDF
Rappel 12 facteurs.pdf
PDF
Production-ready Software
PDF
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
PPTX
Docker12 factor
12 Factor App Methodology
The twelve factor app
15-factor-apps.pdf
The Twelve-Factor App
The Twelve Factor Apps
Cloud-Native Fundamentals: An Introduction to 12-Factor Applications
12 factor app
The Twelve Factor App
Adopting a PaaS Solution (Part 2) - Red Hat DevOps & Microservices Conference...
Twelve-Factor App: Software Application Architecture
12 Factor App
The 12 Factor App
Cloud Foundry Summit 2015: 12 Factor Apps For Operations
12 Steps to DevOps Nirvana
Rappel 12 facteurs.pdf
Production-ready Software
TDC2017 | São Paulo - Trilha Cloud Computing How we figured out we had a SRE ...
Docker12 factor
Ad

More from Gireesh Kumar (8)

PPTX
PPTX
Hello cloud
PPTX
Hello cloud 7
PPTX
Hello cloud 5
PPTX
Hello cloud 4
PPTX
Hello cloud 3
PPTX
Hello cloud 2
PPTX
Hello cloud 1
Hello cloud
Hello cloud 7
Hello cloud 5
Hello cloud 4
Hello cloud 3
Hello cloud 2
Hello cloud 1

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Encapsulation theory and applications.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
KodekX | Application Modernization Development
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Network Security Unit 5.pdf for BCA BBA.
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPTX
MYSQL Presentation for SQL database connectivity
Empathic Computing: Creating Shared Understanding
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Encapsulation theory and applications.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
KodekX | Application Modernization Development
Machine learning based COVID-19 study performance prediction
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Network Security Unit 5.pdf for BCA BBA.
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Understanding_Digital_Forensics_Presentation.pptx
MYSQL Presentation for SQL database connectivity

Hello cloud 6

  • 3. DHARMA Principles  Documented (just enough)  Highly cohesive/loosely coupled (all the way down)  Automated from commit to cloud  Resource aware  Monitored thoroughly  Antifragile
  • 4. 12 Factor App Guidelines for writing scalable SaaS apps http://12factor.net/
  • 5. 12 Factor App 1. Codebase 2. Dependencies 3. Config 4. Backing Services 5. Build, Release Run 6. Process 7. Port Binding 8. Concurrency 9. Disposability 10.Dev/Prod Parity 11.Logs 12.Admin Process
  • 6. 12 Factor App Codebase one codebase, multiple deploys
  • 7. 12 Factor App – Codebase One codebase, multiple deploys  Use version control like ‘git’  If there are multiple codebases, it’s not an app – it’s a distributed system  Multiple apps sharing the same code is a violation of twelve-factor  The codebase is the same across all deploys, although different versions may be active in each deploy
  • 9. 12 Factor App – Dependencies Explicitly Declare and isolate  Declare dependencies in a manifest  Use isolation tools  Specific version are important  Never rely on implicit existence of system wide packages  Eg. nodejs ‘package.json’ / Ruby Gem file etc
  • 10. 12 Factor App Config Store in the environment
  • 11. 12 Factor App – Config Store in the environment  Information required to host a deployment of your codebase  Mainly DB Credentials, path, resources etc  Should be strictly separated from code  Configuration belongs in the environment not in the application  No config in git  Use Environment vars (like ENV['DATABASE_URL'] )
  • 12. 12 Factor App Backing Services As Attached resources
  • 13. 12 Factor App – Backing Services As attached resources  Backing Services  Data store  SMTP  Cache  Amazon S3  Twitter  Make no distinction between local and third party services
  • 14. 12 Factor App Build, Release, Run Strictly separate build & run stage
  • 15. 12 Factor App – Build, Release, Run Strictly separate build & run stage BUILD = Codebase + dependencies + assets RELEASE = Build + config RUN = Run process against Release  Strict separation between stages  Cannot change code at runtime  Rollback = use the last release instead  Every release should always have a unique release ID
  • 16. 12 Factor App Processes Execute the app as one or more stateless process
  • 17. 12 Factor App – Processes Execute the app as one or more stateless process  Does the running of the release  Is stateless  Share nothing with other process  Use single transaction only caches  No sticky sessions - Use session state data with memcached/redis  Asset pre-compilation instead of over runtime calculation
  • 18. 12 Factor App Port Binding Export services via port binding
  • 19. 12 Factor App – Port Binding Export services via port binding The contract with the execution environment is binding to a port to serve request . App is completely self-contained Booking http://192.168.123.45:5555 Shop http://23.123.34.54:5505
  • 20. 12 Factor App Concurrency Scale out via the process model
  • 21. 12 Factor App – Concurrency Scale out via the process model  Scale out via the process model (by running multiple process of different types)  Process are the first class citizens  Assign to work to a process type (web, db, worker etc)  Can then handle own multiplexing  Process don't demonize or write PID files  Instead using system process manager
  • 22. 12 Factor App Disposability Maximize robustness with fast startup and graceful shutdown
  • 23. 12 Factor App – Disposability Maximize robustness with fast startup and graceful shutdown  Process are disposable (they can be started or stopped at a moment’s notice)  Start quickly  Shutdown gracefully  Be robust against sudden death
  • 24. 12 Factor App Dev Prod Parity Keep development, staging and production as similar as possible
  • 25. 12 Factor App – Dev Prod Parity Keep development, staging and production as similar as possible  Gaps  The time gap: A developer may work on code that takes days, weeks, or even months to go into production.  The personnel gap: Developers write code, ops engineers deploy it.  The tools gap: Developers may be using a stack like Nginx, SQLite, and OS X, while the production deploy uses Apache, MySQL, and Linux.  Make the time gap small: a developer may write code and have it deployed hours or even just minutes later.  Make the personnel gap small: developers who wrote code are closely involved in deploying it and watching its behavior in production.  Make the tools gap small: keep development and production as similar as possible.
  • 26. 12 Factor App Logs Treat logs as event streams
  • 27. 12 Factor App – Logs Treat logs as event streams  Dont route or store logs in files  Stream to stout instead and be captured and handled by environment
  • 28. 12 Factor App Admin processes Run admin/management tasks as one-off processes
  • 29. 12 Factor App – Admin processes Run admin/management tasks as one-off processes  Database migration  Console view  Running one time scripts  Run as seperate process  Run against the same release  Admin code ships with app code
  • 31. Next