Slide 1

Slide 1 text

CI/CD: A Mean to Deliver Software Roy Inganta Ginting Sr. Principal System Engineer of GDP Labs

Slide 2

Slide 2 text

About Me ● Roy Inganta Ginting ● Senior Principal System Engineer ● 4 years experiences working with CI/CD ● Cloud Computing ● Infrastructure as Code ● DevOps ● Automation 2

Slide 3

Slide 3 text

ABOUT GDP LABS

Slide 4

Slide 4 text

ABOUT GDP LABS

Slide 5

Slide 5 text

What is this talk about? ● Challenge in delivering software ● Continuous Delivery (CD) in Academics ● CD Concept ● CD in GDP Labs 5

Slide 6

Slide 6 text

What is the main challenge of creating a software for customers? 6

Slide 7

Slide 7 text

Building the right software Building the software right 7 What is the main challenge of creating a software for customers?

Slide 8

Slide 8 text

How do we know if we are building the right software and the software right? 8

Slide 9

Slide 9 text

Fast feedback loop is everything 9 How do we know if we are building the right software and the software right?

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

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

Slide 13

Slide 13 text

Some References re CI/CD (Con’t) Everything you need to know is in the book 13

Slide 14

Slide 14 text

14 What is Continuous Delivery?

Slide 15

Slide 15 text

15

Slide 16

Slide 16 text

CD Principles ● Build quality in ● Work in small batches ● Computers perform repetitive tasks, people solve problems ● Relentlessly pursue continuous improvement ● Everyone is responsible 16

Slide 17

Slide 17 text

CD Foundations 17 Continuous Testing Configuration Management Continuous Integration

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

20 Continuous Testing

Slide 21

Slide 21 text

Deployment Pipeline 21

Slide 22

Slide 22 text

Integration Pipeline in GDP Labs 22 Github Build Dashboard Notification MASTER Build Dashboard Notification PR Check-in Master Webhook PR Webhook Integration Feedback

Slide 23

Slide 23 text

Deployment Pipeline in GDP Labs 23 Artifact Repository Target Server Get Artifact Configure Artifact Send Artifact Setup Artifact SSH SSH CI Pipeline

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

Thank you for your time Questions? Roy Inganta Ginting www.linkedin.com/in/royinganta 26

Slide 27

Slide 27 text

We Are Hiring [email protected] 27

Slide 28

Slide 28 text

Backup Slides 28

Slide 29

Slide 29 text

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

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

Request Github Repository

Slide 32

Slide 32 text

Empty Github Repository

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

Create a PR

Slide 37

Slide 37 text

Jenkins Report on PR

Slide 38

Slide 38 text

Jenkins Build Results

Slide 39

Slide 39 text

Jenkins Static Analysis Report

Slide 40

Slide 40 text

Jenkins Test Coverage Report

Slide 41

Slide 41 text

Jenkins 1-click Deploy 41

Slide 42

Slide 42 text

Jenkins Pipeline 42