Anúncio
Anúncio

Mais conteúdo relacionado

Similar a CI/CD(20)

Anúncio

Último(20)

CI/CD

  1. CI/CD Continuous integration and Continuous delivery/deployment Amit Dhodi
  2. Agenda  Explanation of CI/CD  Difference between continuous delivery and continuous deployment  Jenkins CI pipeline demo  Spinnaker Overview  Spinnaker CD pipeline demo  Benefits of using CI/CD  Putting it all together  Q&A
  3. Out of scope  Containerization  Docker  Kubernetes  Securing the CICD pipelines  Version control systems  CD deployment strategies (Blue/Green, Highlander etc)
  4. Continuous Integration  Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository quite frequently. Each check-in is then verified by an automated build, allowing teams to detect problems early  CI process tests and packages software builds and alerts developers if their changes caused any failure  The technical goal of CI is to establish a consistent and automated way to build, package, and test applications
  5. Continuous delivery vs deployment  In continuous delivery, every change pushed to the main repository is ready to be shipped, but the production release process still requires human approval.  In continuous deployment, the release to production is done automatically for every change that passes the test suite  Continuous deployment goes one step further than continuous delivery. With this practice, every change that passes all stages of your production pipeline is released to your customers. There's no human intervention, and only a failed test will prevent a new change to be deployed to production
  6. CI/CD Explained
  7. How to achieve CI?  Developers check out code into their private workspaces – git clone and checkout  When done, commit the changes to the repository – git commit and push  The CI server monitors the repository and checks out changes when they occur – pull request merged  The CI server builds the system and runs unit and integration tests – gradle/maven build  The CI server releases deployable artifacts – jar into S3 bucket or nexus repo  The CI server assigns a build label to the version of the code it just built – unique identifier  The CI server informs the team of the successful build – email notifications  If the build or tests fail, the CI server alerts the team – email notifications  The team fixes the issue at the earliest opportunity – fix and commit back  Continue to continually integrate and test throughout the project – repeat the process
  8. Jenkins CI pipeline
  9. Benefits of CI  Less bugs get shipped to production as regressions are captured early by the automated tests  Building the release is easy as all integration issues have been solved early  Less context switching as developers are alerted as soon as they break the build and can work on fixing it before they move to another task  Testing costs are reduced drastically – your CI server can run hundreds of tests in the matter of seconds
  10. Spinnaker  Spinnaker is an open-source, multi-cloud continuous delivery platform that helps you release software changes with high velocity and confidence  Spinnaker CD pipeline can consist of various stages. Some of the stages are explained below:  Bake: Bake an image from the specified packages. Baking here refers to the process of creating a machine image. Spinnaker’s bakery is backed by Hashicorp’s packer (Packer is an open source tool for creating identical machine images for multiple platforms from a single source configuration)  Deploy: Deploy the previously baked or found image using the specified deployment strategy  Destroy Server Group: Delete a Server Group and its resources from the specified Cluster  Manual Judgment: Wait for the user to click Continue before continuing. You can specify instructions for how to decide whether to continue, or add input options that users can choose from  Script: Execute an arbitrary script as part of your pipeline. Spinnaker uses Jenkins to sandbox your scripts, so you need to set up Jenkins in order to use it  Pipeline: Select any pipeline and run it as a sub-pipeline
  11. Spinnaker CD pipeline
  12. Benefits of CD  The complexity of deploying software has been taken away. Your team doesn't have to spend days preparing for a release anymore  You can release more often, thus accelerating the feedback loop with your customers  Releases become smaller and easier to understand  No one is required to drop their work to make a deployment because everything is automated  The feedback loop with your customers is faster: new features and improvements go straight to production when they're ready
  13. Putting it all together
  14. Q&A References:  https://www.spinnaker.io/  https://www.packer.io/intro/index.html  https://www.atlassian.com/continuous-delivery/ci-vs-ci-vs-cd  https://www.digitalocean.com/community/tutorials/an-introduction-to- continuous-integration-delivery-and-deployment
Anúncio