SlideShare ist ein Scribd-Unternehmen logo
1 von 31
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
Next

Weitere ähnliche Inhalte

Was ist angesagt?

Was ist angesagt? (20)

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

Ähnlich wie Hello cloud 6

Ähnlich wie Hello cloud 6 (20)

12 factor apps
12 factor apps12 factor apps
12 factor apps
 
The Twelve Factor App
The Twelve Factor AppThe Twelve Factor App
The Twelve Factor App
 
Twelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureTwelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application Architecture
 
Cloud Native Development
Cloud Native DevelopmentCloud Native Development
Cloud Native Development
 
The Twelve Factor Apps
The Twelve Factor AppsThe Twelve Factor Apps
The Twelve Factor Apps
 
12 Steps to DevOps Nirvana
12 Steps to DevOps Nirvana12 Steps to DevOps Nirvana
12 Steps to DevOps Nirvana
 
Breaking the Monolith
Breaking the MonolithBreaking the Monolith
Breaking the Monolith
 
12-Factor Apps
12-Factor Apps12-Factor Apps
12-Factor Apps
 
Building Microservices with the 12 Factor App Pattern on AWS - AWS Online Tec...
Building Microservices with the 12 Factor App Pattern on AWS - AWS Online Tec...Building Microservices with the 12 Factor App Pattern on AWS - AWS Online Tec...
Building Microservices with the 12 Factor App Pattern on AWS - AWS Online Tec...
 
Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)
 
Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"Aleksandr Kutsan "Managing Dependencies in C++"
Aleksandr Kutsan "Managing Dependencies in C++"
 
Twelve Factor - Designing for Change
Twelve Factor - Designing for ChangeTwelve Factor - Designing for Change
Twelve Factor - Designing for Change
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
 
Twelve Factor App With Lagom
Twelve Factor App With LagomTwelve Factor App With Lagom
Twelve Factor App With Lagom
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWS
 
Building Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWSBuilding Microservices with the 12 Factor App Pattern on AWS
Building Microservices with the 12 Factor App Pattern on AWS
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
 
12 factor app an introduction
12 factor app an introduction12 factor app an introduction
12 factor app an introduction
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption XFORMATION Open Platform in Enterprise wide SOA Adoption
XFORMATION Open Platform in Enterprise wide SOA Adoption
 

Mehr von Gireesh Kumar (8)

SOLID
SOLIDSOLID
SOLID
 
Hello cloud
Hello  cloudHello  cloud
Hello cloud
 
Hello cloud 7
Hello  cloud 7Hello  cloud 7
Hello cloud 7
 
Hello cloud 5
Hello  cloud 5Hello  cloud 5
Hello cloud 5
 
Hello cloud 4
Hello  cloud 4Hello  cloud 4
Hello cloud 4
 
Hello cloud 3
Hello  cloud 3Hello  cloud 3
Hello cloud 3
 
Hello cloud 2
Hello  cloud 2Hello  cloud 2
Hello cloud 2
 
Hello cloud 1
Hello  cloud 1Hello  cloud 1
Hello cloud 1
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Kürzlich hochgeladen (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

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
  • 30.
  • 31. Next