Upload
others
View
1
Download
0
Embed Size (px)
Citation preview
© 2015, 2016 IBM Corporation
Twelve-factor applications
© 2015, 2016 IBM Corporation
• How to design, develop, deploy, and manage an IBM Bluemix PaaS application by following the Twelve-Factor App methodology: (http://12factor.net/)
– Codebase
– Dependencies
– Config
– Backing Services
– Build, release, run
– Processes
– Port binding
– Concurrency
– Disposability
– Dev/prod parity
– Logs
– Admin processes
After you complete this section, you should understand:
2
© 2015, 2016 IBM Corporation
Twelve-factor methodology
• In the modern era, software is commonly delivered as a service:
called web apps, or software-as-a-service.
• By using twelve-factor methodology, you can write apps in any
programming language and use any combination of backing
services (database, queue, memory cache, etc.)
Source: http://www.12factor.net
3
© 2015, 2016 IBM Corporation
The twelve factors
1. Codebase - One codebase tracked in revision control, many deploys
2. Dependencies - Explicitly declare and isolate dependencies
3. Config - Store configuration in the environment
4. Backing Services - Treat backing services as attached resources
5. Build, release, run - Strictly separate build and run stages
6. Processes - Execute the app as one or more stateless processes
7. Port binding - Export services via port binding
8. Concurrency - Scale out via the process model
9. Disposability - Maximize robustness with fast startup and graceful shutdown
10.Dev/prod parity - Keep development, staging, and production as similar as
possible
11.Logs - Treat logs as event streams
12.Admin processes - Run administration and management tasks as one-off
processes
4
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 1.Codebase
5
© 2015, 2016 IBM Corporation
Codebase: Bluemix DevOps Services
6
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 2. Dependencies
7
© 2015, 2016 IBM Corporation
Dependencies
8
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 3.Config
9
© 2015, 2016 IBM Corporation
Config
10
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 4.Backing Services
11
© 2015, 2016 IBM Corporation
Backing Services
12
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 5.Build, Release, Run
13
© 2015, 2016 IBM Corporation
Build, Release, Run
CF Buildpacks + immutable Warden Containers
14
© 2015, 2016 IBM Corporation
Twelve actor and Bluemix: 6.Processes
© 2015, 2016 IBM Corporation
Processes
Stateless:
CF Warden Containers: no clustered memory, no shared FS
Desired State
ActualState
16
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 7.Port Binding
17
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 8.Concurrency
18
© 2015, 2016 IBM Corporation
Concurrency
19
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 9.Disposability
20
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 10.Dev/Prod parity
21
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 11.Logs
22
© 2015, 2016 IBM Corporation
Logs
Messaging
ThirdParty
(Logstash,Splunk)
Bluemix Elastic Runtime
23
Health Manager
Cloud Controller
Messaging
Syslog
Aggregator
© 2015, 2016 IBM Corporation
Twelve factor and Bluemix: 12.Admin Processes
24