Tuesday, November 27, 2018

Continuous Integration / Continuous Delivery / Continuous Deployment

  • Continuous Integration solution for Windows and Linux. Build, test, deploy your apps faster, on any platform.
https://www.appveyor.com/
  • Travis CI
Easily sync your GitHub projects with Travis CI and you’ll be testing your code in minutes!
https://travis-ci.org 


  • What is Travis CI?

Usually simply called Travis, it’s a Continuous Integration service that is free for open-source projects

What does it do?
Travis sets up “hooks” with GitHub to automatically run tests at specified times. By default, these are set up to run after a pull request is created or when code is pushed up to GitHub.

the free version of Travis to set up tests that run every time you try to merge new changes into that repo.
https://www.raywenderlich.com/1618-travis-ci-tutorial-getting-started

  • Whether you need the simplicity of a cloud-hosted solution or the control of hosting on your own private infrastructure

Automate your development process quickly, safely, and at scale.
https://circleci.com/


  • Bringing back the joy of iOS & Android development through automating build, testing and support cycles

https://www.bitrise.io/

  • How to make CI, CT and CD work together and avoid the drama of a DevOps love triangle


Continuous Integration (CI) is the process of automating the build and testing of code every time someone commits changes to version control.
CI puts a great emphasis on testing automation to check that the application is not broken whenever new commits are integrated into the main branch.
Committing code triggers an automated build system to grab the latest code from the shared repository and to build, test and validate the full master branch.
Simply, it ensures bugs are caught earlier in the development cycle, which makes them less expensive to fix - and maintains a consistent quality.

Method #2: Continuous Delivery
Continuous Delivery (CD) is the practice is the practice of streamlining and automating all the processes leading up to deployment. There are a number of steps in CD, such as validating the quality of the build in the previous environment.
Teams should ensure they have a monitoring dashboard for your production environment in place in order to eliminate performance bottlenecks and respond fast to issues

Method #3: Continuous Testing
Continuous Testing (CT), which can also be referred to as Continuous Quality, is the practice of embedding and automating test activities into every “commit”.

The first, is perhaps the most obvious - communication.
It allows teams to be Agile by ensuring they are all on the same page, so if they leave a project or move on to a different step in the process, they can easily integrate once they return without having to start over from the beginning.

The second is trust – CD alleviates any unknowns by automating and streamlining all the processes leading up to deployment,
By eliminating the element of doubt, teams can trust both the process and the product - assured that continuous quality is being prioritised.

https://www.itproportal.com/features/how-to-make-ci-ct-and-cd-work-together-and-avoid-the-drama-of-a-devops-love-triangle/

  • What is Continuous Integration, Delivery, Deployment and CI-CD Pipeline ?


What is Continuous Integration?
Continuous Integration (CI) is a DevOps development practice which requires developers to push code into a central hub (also known as Source Code Management System) several times a day. Each commit is then verified and proceed with automated builds and run tests, helping teams to detect the problem early and easily.

What is Continuous Testing?
Continuous Testing (CT) ensures that every time an integration is done, pre-defined test cases are executed to make sure the code doesn’t break the existing system or environment.

What is Continuous Deployment?
Continuous Deployment (CD) is the deployment process where you deliver software in a continuous incremental fashion and deploy frequently. Here the deployment could be in any environment in an automated way (DTAP – Development, Testing, Acceptance or Production).

What is Continuous Delivery?
Continuous delivery is the practice of keeping your code deployable at any point. This process makes sure the build passes all the tests and be ready to push to the production at any moment of time

Continuous Workflow Overview
For any process to be continuous, there must be CI, CT, and CD incorporated in the Software Development Life Cycle (SDLC).
Continuous Deployment and Continuous Delivery have become the best-practice in the industry for keeping your application deployable at any moment of time and pushing the code into production whenever a new change is pushed to the Version Control

https://www.linuxnix.com/what-is-continuous-integration-delivery-deployment-and-ci-cd-pipeline/


  • Continuous everything in DevOpswhat is the difference between CI, CD, CD…? 

the main practices are the same and the difference is mainly in where to apply automation. In Continuous Delivery, you aim to have the full software delivery life cycle automated up until the last environment before production, so that you are ready at any time to deploy automatically to production. In Continuous Deployment, you go one step further; you actually automatically deploy to production. The difference is really just whether there is an automatic trigger or a manual trigger
https://www.accenture.com/us-en/blogs/blogs-continuous-everything-devops

  • Adding the “Continuous” to Integration

Continuous Integration is essentially the repetition of the integration step with a high frequency to alleviate its pain. And the most obvious way to do it frequently is to integrate after EVERY feature merge (instead of waiting before an official release is announced).

When a team practices Continuous Integration…

    All features are merged directly into the main branch (mainline).
    Developers are not working in isolation. All features are developed from the mainline.
    A feature is considered done if the mainline is healthy and not if it works on an individual workstation on its own.
    Testing happens automatically both at the feature level and at the mainline level.


Adding the “Continuous” to Delivery
Continuous Delivery is the practice of packaging and preparing the software (as if it was sent to production) as frequently as possible. And the most extreme way to deliver is after EVERY feature merge

After the software was deemed to be tested, somebody was tasked with the packaging and deployment process.
Deployments were happening very infrequently (there are companies that deploy once every six months to this day). In extreme cases, deployments were happening ONCE (the waterfall design approach).


    The production environment is usually found to be different than the testing environment requiring extra configuration at the last minute.
    Features that worked OK in the test environment are found to be broken in production.
    Features that are not ready at the time of the release either are never given to customers at all or they push back the release date even further.
    Releases create tension between developers (who want to ship new features) and operations (who want stability and don’t want to deploy too many new features at once).

each new feature is a potential candidate for pushing to production
Not all candidates are actually sent to production. Depending on the organization, the decision to deploy to production requires human intervention
The human only decides if a release is going to production or not
The release is already packaged, tested and deployed in a test environment.

Continuous Delivery is a bit harder to adopt than Continuous Integration.

    Builds should be repeatable and deterministic.
    All release steps should be automated (this is harder than it sounds).
    All configuration and associated files should exist in source control (not just source code).
    Each feature/release should be tested in its own test environment (ideally created and destroyed in a dynamic way).
    All test suites should be automated and relatively fast (also harder than it sounds).

Once CD is in place, releases become trivial as they can be performed with a push of a button.
the release is fully tested and packaged, ready to be sent to production (if needed).
Any project stakeholder should be able to give the green light and move the release to production immediately.
Release candidates that don’t reach production are still stored as an artifact if they need to be recalled in the future

Bonus: Continuous Deployment
The “D” in CD can also mean Deployment. This development approach builds upon Continuous Delivery and essentially completely removes all human intervention.Any release candidate that is found to be ready (and passes all quality and testing gates) is immediately pushed to production.

https://thenewstack.io/understanding-the-difference-between-ci-and-cd/


  • deterministic

In mathematics, computer science and physics, a deterministic system is a system in which no randomness is involved in the development of future states of the system. A deterministic model will thus always produce the same output from a given starting condition or initial state
https://en.wikipedia.org › wiki › Deterministic_system


  • In general,  idempotence is “the property of certain operations in mathematics and computer science that can be applied multiple times without changing the result beyond the initial application”.  For Ansible it means after 1 run of a playbook to set things to a desired state, further runs of the same playbook should result in 0 changes.  In simplest terms, idempotency means you can be sure of a consistent state in your environment.

https://shadow-soft.com/ansible-idempotency-configuration-drift/
How to build an efficient CI/CD pipeline
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps 
Continuous Delivery vs Deployment vs Integration: What’s the Difference?
  • Continuous Delivery vs Deployment vs Integration: What’s the Difference?

The ideal process would look like the following:

    The developer submits the code to the development branch.
    The continuous integration servers picks up the change, and merges it with the mainline. The server performs unit tests on the code changes and merges them to the staging environment if they are successful.
    The developer deploys the code to the staging environment where QA tests the environment.
    The vote is moved to production and the continuous integration server picks it up again and tests it for merging to production.
    The change is deployed to the production environment.
https://www.bmc.com/blogs/continuous-delivery-continuous-deployment-continuous-integration-whats-difference/
  • Continuous… Integration. Delivery. Deployment.

Continuous Delivery
Continuous Delivery (CD) is a software development practice in which continuous integration, automated testing, and automated deployment capabilities allow high-quality software to be developed and deployed rapidly, reliably and repeatedly with minimal manual overhead.

Continuous Deployment
Continuous Deployment is a software development practice in which every code change goes through the entire pipeline and is put into production, automatically, resulting in many production deployments every day.

With Continuous Delivery your software is always release-ready, yet the timing of when to push it into production is a business decision, and so the final deployment is a manual step. With Continuous Deployment, any updated working version of the application is automatically pushed to production. 

Continuous Deployment mandates Continuous Delivery, but the opposite is not required.
https://www.cloudbees.com/resources/continuous-delivery-101/continuous-deployment
What’s the Difference Between Continuous Integration, Continuous Deployment and Continuous Delivery?
Continuous Integration, Delivery, and Deployment Differentiated

  • What is Continuous Delivery (CD)?

With CDE, the code is compiled, tested and dropped into the staging environment. Though not required for a continuous delivery model, some teams will also automate and execute system tests once the code is in the staging environment.
Always Production Ready
With this methodology, the product version that sits in the staging or simulated production environment is always in a fully production-ready deployable state. This allows it to double checked, or to be held until other features are added and enabled. The advantage is that it is always ready and can be released into production at the push of a button. This methodology gives your leadership total control over product delivery.
Release Control
With a product that’s always production ready, the deployment to production becomes a business decision, providing total control over the user experience
Additional Testing
This model allows the production-ready product to undergo additional, more comprehensive testing in various test environments, including integration testing, system integration testing (SIT), User Acceptance Tests (UAT), load testing, performance testing, and any others that your organization may require

What is Continuous Deployment (CD)?
continuous deployment (CD) enables a development team to integrate code segments to the production environment several times per day. This methodology is ideal for development teams that work on large websites or online tools.
Application of CD can be found at a number of large online organizations such as Amazon, Google, WordPress, and many others. It allows them to assign developers a specific set of functions to which they will continually work on and improve upon based on user feedback. Because of the small iterative changes that are constantly being added and updated to the production product, the users don’t experience any big changes that can sometimes cause consumer anxiety. Rather, a series of small simple changes add up over time, becoming big changes. This feeling of continual evolution has, in many cases, become expected by consumers for many of these high-traffic websites.
Some perceive it as taking control of when to move code to production from the leadership and giving it to the developers.
Enhanced Delivery Velocity
With continuous deployment, the developer can check code and get a pass/fail notification within minutes. If an issue is detected, they can resolve it and have the new version submitted and into production within a few minutes. If no issues are detected, the new code is moved automatically into production.
Shift Left
When a developer checks in code, the automated processes take the code and move it through the entire lifecycle and if it passes each gate, it gets deployed directly to production. This provides the developer with nearly immediate feedback regarding if a code segment has a defect or not. If an issue is detected in the automated tests, the developer is notified and can resolve the issue immediately.
Real World Experimentation
This model also allows for real-world experimentation, such as A/B testing, and allows for immediate consumer feedback. For example, if you need to change the location of a certain feature on a website, but you’re not sure of the best new location, you could make the change, monitor real-time customer usage, and make adjustments accordingly.
https://www.plutora.com/blog/continuous-integration-continuous-delivery-continuous-deployment
  • Continuous deployment vs. continuous delivery


Continuous deployment can be part of a continuous delivery pipeline. Specifically, continuous delivery is the automated movement of code through the development lifecycle (sometimes called the delivery lifecycle); continuous deployment is the automated movement of that code into production, once it passes the required automated tests.

Whether you make continuous deployment part of your delivery pipeline depends on your business needs. If the business needs the delivery team to release new or updated software out to production repeatedly, reliably, or as quickly as possible, or if the solution has multiple dependencies, then it is likely you will benefit from continuous deployment.
https://www.ibm.com/cloud/learn/continuous-delivery