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

CI/CD: A Mean to Deliver Software

GDP Labs
February 05, 2017

CI/CD: A Mean to Deliver Software

GDP Labs

February 05, 2017
Tweet

More Decks by GDP Labs

Other Decks in Technology

Transcript

  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
  3. What is this talk about? • Challenge in delivering software

    • Continuous Delivery (CD) in Academics • CD Concept • CD in GDP Labs 5
  4. Building the right software Building the software right 7 What

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

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

    if we are building the right software and the software right?
  7. 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
  8. 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
  9. 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
  10. 15

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

    batches • Computers perform repetitive tasks, people solve problems • Relentlessly pursue continuous improvement • Everyone is responsible 16
  12. 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
  13. 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
  14. Integration Pipeline in GDP Labs 22 Github Build Dashboard Notification

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

    Get Artifact Configure Artifact Send Artifact Setup Artifact SSH SSH CI Pipeline
  16. 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
  17. 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
  18. 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
  19. 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
  20. 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
  21. 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