a. Understand how to design, develop, deploy and manage a IBM Bluemix PaaS application
following the Twelve-Factor App methodology (http://12factor.net/)
Factor 1: One codebase tracked in revision control, with multiple deployments
Use one code base track and revision control with many deploys. Utilize IBM Bluemix DevOps Services or Cloud Foundry deployment tools in combination with tools like IBM UrbanCode Deploy, Jenkins, Gradle, or equivalent.
Factor 2: Explicitly declare and isolate dependencies
IBM Bluemix PaaS deployable units e.g. Java Liberty and Node.js buildpacks manage runtime dependencies. For example, the package.json file for a Node.js application lists all external dependencies:
Factor 3: Store configuration in the environment
Provide any additional configuration information through the VCAP_SERVICES environment variable. Services that are bound to an application also populate VCAP_SERVICES with their configuration attributes.
Factor 4: Treat backing services as attached resources
Bind services to applications using the Bluemix PaaS dashboard or use the cf create-service and cf bind-service commands to attach services to an application.
Factor 5: Strictly separate build and run stages
The IBM Bluemix PaaS implementation separates the build process performed during cf push from the immutable container image used when creating an application instance.
Factor 6: Execute the app as one or more stateless processes
When designing applications avoid monoliths and use multiple processes or services as needed. IBM Bluemix PaaS application instances are stateless and do not have persistent file storage. Avoid dependency on sticky sessions and keep session data in a persistent store to ensure traffic can be routed to other processes without service disruption.
Factor 7: Export services via port binding
IBM Bluemix PaaS provides a process or service with a port for binding and then handles routing traffic to the process over this port automatically. Application code reads the port from the environment and binds to this port accordingly.
Factor 8: Scale out via the process model
Horizontal scaling of application instances in IBM Bluemix PaaS may be explicitly performed using the cf scale command or automatically scaled using the Auto-Scaling service.
Factor 9: Maximize robustness with fast startup and graceful shutdown
Use a disposable approach to the design of a process in the application. There should be minimal startup actions required. When a process is terminated, it should be able to go away with minimal housekeeping. This improves robustness and responsiveness to horizontal scaling events.
Factor 10: Keep development, staging, and production as similar as possible
Spaces in IBM Bluemix PaaS provide an effective method to separate different levels of an application. This approach enables agile software delivery and continuous integration.
Factor 11: Treat logs as event streams
In IBM Bluemix PaaS, processes should write log data as an unbuffered event stream to standard out. The IBM Bluemix PaaS Loggregator accumulates log data across various components of the application and Cloud Foundry environment and provides it for viewing using cf logs or exporting to a third-party logging service.
Factor 12: Run admin/management tasks as one-off processes
Design tasks that need to run once or occasionally into separate components that can be run when needed instead of adding the code directly into another component. For example, if an application needs to migrate data into a database, place this into a separate component instead of adding it to the main application code at startup.
following the Twelve-Factor App methodology (http://12factor.net/)
Factor 1: One codebase tracked in revision control, with multiple deployments
Use one code base track and revision control with many deploys. Utilize IBM Bluemix DevOps Services or Cloud Foundry deployment tools in combination with tools like IBM UrbanCode Deploy, Jenkins, Gradle, or equivalent.
Factor 2: Explicitly declare and isolate dependencies
IBM Bluemix PaaS deployable units e.g. Java Liberty and Node.js buildpacks manage runtime dependencies. For example, the package.json file for a Node.js application lists all external dependencies:
Factor 3: Store configuration in the environment
Provide any additional configuration information through the VCAP_SERVICES environment variable. Services that are bound to an application also populate VCAP_SERVICES with their configuration attributes.
Factor 4: Treat backing services as attached resources
Bind services to applications using the Bluemix PaaS dashboard or use the cf create-service and cf bind-service commands to attach services to an application.
Factor 5: Strictly separate build and run stages
The IBM Bluemix PaaS implementation separates the build process performed during cf push from the immutable container image used when creating an application instance.
Factor 6: Execute the app as one or more stateless processes
When designing applications avoid monoliths and use multiple processes or services as needed. IBM Bluemix PaaS application instances are stateless and do not have persistent file storage. Avoid dependency on sticky sessions and keep session data in a persistent store to ensure traffic can be routed to other processes without service disruption.
Factor 7: Export services via port binding
IBM Bluemix PaaS provides a process or service with a port for binding and then handles routing traffic to the process over this port automatically. Application code reads the port from the environment and binds to this port accordingly.
Factor 8: Scale out via the process model
Horizontal scaling of application instances in IBM Bluemix PaaS may be explicitly performed using the cf scale command or automatically scaled using the Auto-Scaling service.
Factor 9: Maximize robustness with fast startup and graceful shutdown
Use a disposable approach to the design of a process in the application. There should be minimal startup actions required. When a process is terminated, it should be able to go away with minimal housekeeping. This improves robustness and responsiveness to horizontal scaling events.
Factor 10: Keep development, staging, and production as similar as possible
Spaces in IBM Bluemix PaaS provide an effective method to separate different levels of an application. This approach enables agile software delivery and continuous integration.
Factor 11: Treat logs as event streams
In IBM Bluemix PaaS, processes should write log data as an unbuffered event stream to standard out. The IBM Bluemix PaaS Loggregator accumulates log data across various components of the application and Cloud Foundry environment and provides it for viewing using cf logs or exporting to a third-party logging service.
Factor 12: Run admin/management tasks as one-off processes
Design tasks that need to run once or occasionally into separate components that can be run when needed instead of adding the code directly into another component. For example, if an application needs to migrate data into a database, place this into a separate component instead of adding it to the main application code at startup.
Very impressive article! The blog is highly informative and has answered all my questions.
ReplyDeleteTo introduce about our company andthe activities, B2B contact list is a database provider
that helps you to boost your sales& grow your business through well-build
IBM Bluemix Users Email list.