Monday, December 12, 2016

Continuous Integration, Deployment and Delivery

Continuous Integration

Continuous Integration, in its simplest form, involves a tool that monitors your version control system for changes. Whenever a change is detected, this tool automatically compiles and tests your application. If something goes wrong, the tool immediately notifies the developers so that they can fix the issue immediately.

Continuous Deployment

This idea of automated deployment is important. Indeed, if you take automating the deployment process to its logical conclusion, you could push every build that passes the necessary automated tests into production. The practice of automatically deploying every successful build directly into production is generally known as Continuous Deployment.


Continuous Delivery

The notion of Continuous Delivery is a slight variation on the idea of Continuous Deployment that takes into account these considerations. With Continuous Delivery, any and every successful build that has passed all the relevant automated tests and quality gates can potentially be deployed into production via a fully automated one-click process, and be in the hands of the end-user within minutes. However, the process is not automatic: it is the business, rather than IT, that decides the best time to deliver the latest changes.

The ability to get changes - features, configuration changes, bug fixes, experiments into production or into hands of users safely and quickly in a sustainable way


So Continuous Integration techniques, and in particular Continuous Deployment and Continuous Delivery, are very much about providing value to the end user faster. How long does it take your team to get a small code change out to production? How much of this process involves problems that could have been fixed earlier, had you known about the code changes that Joe down the corridor was making? How much is taken up by labor-intensive manual testing by QA teams? How much involves manual deployment steps, the secrets of which are known only to a select few? CI is not a silver bullet by any means, but it can certainly help streamline many of these problems.

Why its important:

- Make releases pains, low risk events
- Reduce time to market
- Increase software quality and stability
- Reduce cost of ongoing software development
- Increase customer and employee satisfaction
- Creates fast feedback loops


Key Principals

- Build Quality in
- Work in small batches
- Computers do repetitive tasks, people solve problems
- Relentlessly purse continuous improvements
- Everyone is responsible


Ingredients

- Configuration Mangement
- Continuous Integration
- Automated Testing


Deployment PipeLine





Deployment Pipeline Practices

- Only build you packages once
- Deploy the same way to every environment
- Smoke test your deployments
- Keep your environments Similar
- If anything fails, stop the line



Automated Acceptance Testing

- UI
- Service
- Unit


Preventing decay in test code

- Treat test code as production code
- Refactor relentlessly
- Don’t repeat yourself