Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CI/CD: A Mean to Deliver Software

142db55abf0e6eec31639e9abf7dd7e3?s=47 GDP Labs
February 05, 2017

CI/CD: A Mean to Deliver Software


GDP Labs

February 05, 2017


  1. CI/CD: A Mean to Deliver Software Roy Inganta Ginting Sr.

    Principal System Engineer of GDP Labs
  2. About Me • Roy Inganta Ginting • Senior Principal System

    Engineer • 4 years experiences working with CI/CD • Cloud Computing • Infrastructure as Code • DevOps • Automation 2


  5. What is this talk about? • Challenge in delivering software

    • Continuous Delivery (CD) in Academics • CD Concept • CD in GDP Labs 5
  6. What is the main challenge of creating a software for

    customers? 6
  7. Building the right software Building the software right 7 What

    is the main challenge of creating a software for customers?
  8. How do we know if we are building the right

    software and the software right? 8
  9. Fast feedback loop is everything 9 How do we know

    if we are building the right software and the software right?
  10. Some References re CI/CD Bremer and Eriksson (2015), The industry

    is positive towards Continuous Delivery and do believe that they will benefit from implementing it. But, they don’t think their customers are ready to adapt Continuous Deployment at this point. 10
  11. Continuous Integration vs Delivery vs Deployment • Continuous Integration aims

    to integrate each commit to the master branch of the project. In a Continuous Integration process, the aim is not to have release ready code, the aim is to integrate often to avoid integration problems. • Continuous Delivery aims to deliver working software continuously. It doesn’t need to include the deployment of software, but it should be ready for a deployment at any given time. • Continuous Deployment works as an extension of Continuous Integration, instead of leaving the integrated code as the latest build, Continuous Deployment aims to deploy the build to a target. 11
  12. Some References re CI/CD (Con’t) Chen (2015), highlight 6 benefits

    his company get from CI/CD • Accelerated time to market • Building the right product • Improved productivity and efficiency • Reliable release • Improved product quality • Improved customer satisfaction 12
  13. Some References re CI/CD (Con’t) Everything you need to know

    is in the book 13
  14. 14 What is Continuous Delivery?

  15. 15

  16. CD Principles • Build quality in • Work in small

    batches • Computers perform repetitive tasks, people solve problems • Relentlessly pursue continuous improvement • Everyone is responsible 16
  17. CD Foundations 17 Continuous Testing Configuration Management Continuous Integration

  18. Configuration Management Two main goals: • Reproducibility: Able to provision

    any environment in a fully automated fashion and in reproducible manner • Traceability: Able to determine quickly and precisely the versions of every dependency used to create an environment and know differences between envs 18
  19. Continuous Integration (CI) • In CI if something is painful,

    do it more often, and bring the pain forward. • Developers integrate all their work into trunk on a regular basis (at least daily). • Have a set of automated tests is validate changes • If these automated tests fail, the team stops what they are doing and someone fixes the problem immediately. 19
  20. 20 Continuous Testing

  21. Deployment Pipeline 21

  22. Integration Pipeline in GDP Labs 22 Github Build Dashboard Notification

    MASTER Build Dashboard Notification PR Check-in Master Webhook PR Webhook Integration Feedback
  23. Deployment Pipeline in GDP Labs 23 Artifact Repository Target Server

    Get Artifact Configure Artifact Send Artifact Setup Artifact SSH SSH CI Pipeline
  24. Delivery Pipeline in GDP Labs 24 Github Push Changes Build

    Feedback Build Dashboard Notification Build Job Pull Code Target Deployment Binary Repository Get Artifact Configure Artifact Send Artifact Setup Artifact Deploy Job Deploy Feedback http http ssh Trigger Deploy Trigger Build Artifact Repository
  25. References • Humble, Farley. 2011. Continuous Delivery: Reliable Software Releases

    through Build, Test, and Deployment Automation (Addison-Wesley Signature Series (Fowler)). Pearson Education: Boston. • Bremer, Rickard and Eriksson, Johan. 2015. Understandings and Implementations of Continuous Delivery. Tesis pada University of Gothenburg Gotenborg, Swedia. • Chen, Lianping. 2015. Continuous Delivery: Huge Benefits, but Challenges Too. IEEE Software 32(2). • https://continuousdelivery.com/ 25
  26. Thank you for your time Questions? Roy Inganta Ginting www.linkedin.com/in/royinganta

  27. We Are Hiring jobs@gdplabs.id 27

  28. Backup Slides 28

  29. GDP Labs Workflow • Project kickoff, request github repository to

    Infra ◦ Provide repository name and provide your github username (you can also provide all github usernames) • Infra create repository on github and assign the requester as group admin ◦ Group admin can add and remove user from specific group ◦ Send repository url to requester • Project lead initiate a git repository locally and push to github • Other team members clone from this repository
  30. GDP Labs Workflow (Con’t) • Infra setup jenkins to do

    continuous integration against this repository • Dev works on a branch, push to Github when ready, and create a Pull Request • Github notifies Jenkins, Jenkins builds the PR, and report status to Github • Other dev response to a PR, provides feedback, and merge the PR • Delivery team deploy artifact to target env • Repeat step #6 until project is over
  31. Request Github Repository

  32. Empty Github Repository

  33. Implement a Feature $ git checkout -b f/dummy C1 Master

  34. Implement a Feature (con’t) $ git commit -m “Add feature”

    # C2 $ git commit -m “Add test” # C3 $ git push origin f/dummy C1 Master f/dummy C2 C3
  35. Implement a Feature (con’t) $ git fetch origin/master $ git

    merge origin/master $ git push origin f/dummy C1 Master f/dummy C2 C3 C4 C5
  36. Create a PR

  37. Jenkins Report on PR

  38. Jenkins Build Results

  39. Jenkins Static Analysis Report

  40. Jenkins Test Coverage Report

  41. Jenkins 1-click Deploy 41

  42. Jenkins Pipeline 42