Download - Continuous Delivery at SAP IT, Alon Aizenberg

Transcript
Page 1: Continuous Delivery at SAP IT, Alon Aizenberg

INTERNAL

Continuous Delivery @ SAP IT

Alon Aizenberg SAP Global IT / Social Collaboration Platform team January 2013

Page 2: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 2 Public

About SAP

§  40 years old

§  Leader in enterprise applications

§  ~ 70K employees

§  ~ 183K customers

§  ~ 130 countries

Page 3: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 3 Public

Social Collaboration Platform team

We produce many platforms

Page 4: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 4 Public

Social Collaboration Platform team

We produce many platforms

Page 5: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 5 Public

Search Consolidation Project

§  One stop when searching SAP related content

§  ~ 100 machines in all environments

§  ~ 40 in productive deployments

§  ~ 2 years in continuous

delivery mode

Page 6: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 6 Public

The Problems

?

Page 7: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 7 Public

The Problems

Physical hardware,

manual setup

Manual

deployment Manual QA

phases

Big features, long

development cycles

Page 8: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 8 Public

Virtualization, InfrastructureAutomation

The Tools

Deployment

Automation Test

Automation

Continuous

Delivery

Page 9: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 9 Public

The Tools

Page 10: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 10 Public

Infrastructure

Automation

Page 11: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 11 Public

Infrastructure Automation

§  Start with manual VM operations

§  Command line wrapper allows automation

§  Evolve, full Infrastructure as code

§  Projects, environments, machine descriptors and automation scripts in source control

Infrastructure

Automation

Page 12: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 12 Public

Project Configuration Example

- name: prod

servers:

- name: search01

runlist:

- role[search-server]

- name: search02

runlist:

- role[search-server]

- name: db

template: SLES_11_64bit

cpus: 8

memory: 16384mb

runlist:

- role[hanadb-server]

- name: index01

runlist:

- role[indexing-server]

- name: index02

runlist:

- role[indexing-server]

- name: index03

runlist:

- role[indexing-server]

- name: ls5133

physical: true

dnsname: search11111

ipaddress: 11.11.11.11

runlist:

- role[trex-name-server]

Infrastructure

Automation

chefrepo: [email protected]:srch/chef-repo-int.git

Page 13: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 13 Public

Chef usage

§  Each project has a chef repository in git

§  Shared automations have their own repositories in git

§  Use librarian-chef and git to create a full chef repository

Before uploading the scripts to chef server

Infrastructure

Automation

Page 14: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 14 Public

Project A Chef repository

Chef Server

Production Project A

production environment

Shared cookbook repo /

Cookbook shelf

Chef Usage Infrastructure

Automation

Combined chef repository

Page 15: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 15 Public

Librarian-Chef Configuration Examples

site "http://cookbooks.sap.corp:8080" cookbook 'monsoon’ # loads jvm cookbook because tomcat declares it’s dependent on jvm cookbook 'tomcat’ # use git repo to load a cookbook cookbook 'saml2', :git => 'git://github.sap.corp/srch/saml2’

Infrastructure

Automation

Page 16: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 16 Public

Barkeeper

§  The glue

§  Manages projects and environments

§  Manages VMs

§  Manages chef servers

§  Handles permissions

§  UI, REST API and CLI

Infrastructure

Automation

Project configuration and chef repository

Barkeeper VMware

API

Page 17: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 17 Public

Barkeeper Infrastructure

Automation

Page 18: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 18 Public

Deployment

Automation

Page 19: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 19 Public

Deployment Automation

Dedicated cookbooks automate

application deployment and configuration

Deployment

Automation

Page 20: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 20 Public

Test

Automation

Page 21: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 21 Public

Test Automation

§  End to end functional acceptance tests

§  80% of functional tests are automated

§  Manual QA

§  Integrations with other systems

§  Not everything is automated, yet

Test

Automation

Page 22: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 22 Public

Continuous

Delivery

Page 23: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 23 Public

Continuous Delivery

§  Bamboo Continuous Integration server

§  Orchestrates the flow from code push to productive deployment

§  Build grid

§  Parallel execution

Continuous

Delivery

Page 24: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 24 Public

Bamboo jobs

Build, unit test

Package, publish

Deploy Test, functional tests

Deploy QA, sanity tests

Deploy Prod

Artifact / Binary repository

Source/Chef repositories

Commit

Test

QA

Prod

Environments

Pull deployment automation, binaries and artifacts

Page 25: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 25 Public

Pipeline Interactions – Deploy Environment

Bar K

eeper

GIT Project Repo

Chef Server

VM 1

VM 2

VM 3

VM 4

VM 5

VM 6

Create chef server

Create VMs

Continuous

Delivery

Page 26: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 26 Public

Pipeline Interactions - Install Environment

Build Agents

Bar K

eeper

Bam

boo

GIT Chef Repo

Chef Server Chef Server

VM 1

VM 2

VM 3

VM 4

VM 5

VM 6

Shared cookbooks shelf

Sync

Run chef clients

Continuous

Delivery

Page 27: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 27 Public

Pipeline Interactions - Test Application

Build Agents

Bam

boo

Chef Server Chef Server

VM 1

VM 2

VM 3

VM 4

VM 5

VM 6

REST API Tests

Functional tests

Git source repo with test automation

Continuous

Delivery

Page 28: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 28 Public

How did we get there?

§  2 years

§  Evolution not revolution

§  Constantly rethink and improve

§  Tech talks, documentation, encourage hands on

§  Make the tools easy to use for everyone

Page 29: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 29 Public

A change in the state of mind

§  Not only coding

§  Master always shippable

§  Feature toggles

§  Must be maintained

§  Be ready to handle production

§  If you build it… they will come

Page 30: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 30 Public

Lessons learned

§  Management buy-in

§  Fast pipeline

§  Application adaptations

§  Testing automation is big investment

§  Tests should be easy to write and run

§  Automate everything – build infrastructure, load balancers, load tests, monitoring, analytics etc.

Page 31: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 31 Public

? Questions

Page 32: Continuous Delivery at SAP IT, Alon Aizenberg

©  2013 SAP AG. All rights reserved. 32 Public

Thank you

Twitter @alonaizenberg

Email [email protected]