continuous delivery with -...

42

Upload: phungdung

Post on 19-Jun-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

public

Continuous Delivery with

Cloud Foundry Christoph Szymanski

Alexander Link

SAP SE

public

3

Agenda

Continuous Delivery: Enterprise Challenges

Orchestration of CD Services

Cloud Foundry Integration

public

4

From Code to Products: Challenges

Hundreds of projects and development teams

Cover lots of platforms & technologies

Corporate compliance rules

public

5

Technologies

public

6

From Code to Products: Challenges

Hundreds of projects and development teams

Covering lots of platforms & technologies

Corporate compliance rules

public

7

Terminology

• Continuous Integration

– Integrate frequently

– Verified by automated

build, test and quality checks

• Continuous Delivery

– Use CI intensively to be confident

you could release to production at any time

• Continuous Deployment

– Every change which passed automated tests

is deployed to production automatically

code build test release deploy plan

code build test release plan

code build test plan

public

8

• One central Jenkins

• Pipelines only inside Jenkins

Continuous Integration

Build, Test, Deploy (to repository)

Artifact Repository SCM

Central Build

Slave Slave

Slave Slave

Slave

public

9

Team Z Jenkins

Team Y Jenkins

• Team Jenkins for special scenarios

– High team effort

– Expert knowledge not shared

– Pipelines hardly possible

Continuous Integration

Central Build

Team X Jenkins

Slave Slave

Slave Slave

Slave

public

10

• Advanced scenario

– Separate easy to (re)use services

– Pipeline orchestration

– Extensible via own services

Continuous Integration

ci-connect Pipeline Orchestration

Standard Build Standard

Tests

Custom Tests

Translation …

Code Scans

Artifact Repository SCM

public

11

Continuous Deployment

• CI Evolution

Continuous Deployment

SCM

Standard Build Standard

Tests

Custom Tests

Translation CF

Deploy

Code Scans

ci-connect Pipeline Orchestration

Standard Build

Custom Tests

public

12

Demo

public

13

services

public

14

Demo

public

15

Demo

public

16

Demo

public

17

Demo

public

18

Demo

public

19

Demo

public

20

public

21

public

22

Central Build

CF Deploy

Staging

Pull Request

public

23

Central Build

CF Deploy

Staging

Pull Request

public

24

Central Build

CF Deploy

Staging

Pull Request

public

25

Central Build

CF Deploy

Staging

Pull Request

public

26

public

28

CF Deploy Service

Central Build

ci-connect | orchestration

GitHub Event (push, pull_request, status, …) GitHub Commit Status Feedback Each service decides on which events to react – based on config

public

29

ci-connect + Cloud Foundry

Jenkins CI System

CF Command Line Interface

# cf push

CF Deploy Service

public

30

Typical Usage Scenarios

Continuous Deployment

The Pull Request Scenario

public

31

Pull Requests Examined

Multiple deployments of the same project?

Non-unique routes

Forks and the manifest.yml

public

32

Authentication

Basic authentication (CLI)

Token mechanism

public

Thanks for Listening!

Contact:

[email protected]

[email protected]

public

Christoph Szymanski

Alexander Link

SAP SE

public

Additional Slides

public

36

Token handling w/o ci-connect

Service B

Service A

Service C Problem: - Different OAuth tokens for repos of different teams - Each service would have to manage tokens

public

37

ci-connect – token handling

Service B

Service A

Service C Solution: - Users activate services in ci-connect - ci-connect manages OAuth tokens - Services authenticate on ci-connect public/private key encryption

public

38

Simple Process

Central Build

CF Deploy

public

39

Staging vs. Prod Deployment

Central Build

CF Deploy

Productive

Staging

feature

release

public

40

Custom Tests before Deployment

Central Build

CF Deploy

Team Tests

public

41

Pull Request Scenario

Central Build

Staging

CF Deploy

Team Tests

PR

Pull Request

public

42

Pull Request Scenario

Central Build

Staging

CF Deploy

Team Tests

PR

public

43

Continuous Delivery

Central Build

Staging

Productive

CF Deploy

Team Tests

CF Deploy

change in “release” branch