More Related Content Similar to Continuous Delivery at SAP IT, Alon Aizenberg (20) More from DevOpsDays Tel Aviv (20) Continuous Delivery at SAP IT, Alon Aizenberg1. Continuous Delivery @ SAP IT
Alon Aizenberg
SAP Global IT / Social Collaboration Platform team
January 2013
INTE
RNA
L
2. About SAP
§ 40 years old
§ Leader in enterprise applications
§ ~ 70K employees
§ ~ 183K customers
§ ~ 130 countries
© 2013 SAP AG. All rights reserved. Public 2
5. 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
© 2013 SAP AG. All rights reserved. Public 5
6. The Problems
?
© 2013 SAP AG. All rights reserved. Public 6
7. The Problems
Physical
hardware,
manual setup
Manual QA Manual
phases deployment
Big features,
long
development
cycles
© 2013 SAP AG. All rights reserved. Public 7
8. The Tools
Virtualization,
Infrastructure
Automation
Test Deployment
Automation Automation
Continuous
Delivery
© 2013 SAP AG. All rights reserved. Public 8
10. Infrastructure
Automation
© 2013 SAP AG. All rights reserved. Public 10
11. Infrastructure Automation
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
© 2013 SAP AG. All rights reserved. Public 11
12. Project Configuration Example
Infrastructure
Automation
chefrepo: git@github.sap.corp:srch/chef-repo-int.git
- name: prod - name: index01
servers: runlist:
- name: search01 - role[indexing-server]
runlist: - name: index02
- role[search-server] runlist:
- name: search02 - role[indexing-server]
runlist: - name: index03
- role[search-server] runlist:
- name: db - role[indexing-server]
template: SLES_11_64bit - name: ls5133
cpus: 8 physical: true
memory: 16384mb dnsname: search11111
runlist: ipaddress: 11.11.11.11
- role[hanadb-server] runlist:
- role[trex-name-server]
© 2013 SAP AG. All rights reserved. Public 12
13. Chef usage
Infrastructure
Automation
§ 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
© 2013 SAP AG. All rights reserved. Public 13
14. Chef Usage
Infrastructure
Automation
Project A Chef repository
Chef Server
Combined
chef repository Production
Project A
production environment
Shared cookbook repo /
Cookbook shelf
© 2013 SAP AG. All rights reserved. Public 14
15. Librarian-Chef Configuration Examples
Infrastructure
Automation
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’
© 2013 SAP AG. All rights reserved. Public 15
16. Barkeeper
Infrastructure
Automation
§ The glue
§ Manages projects and environments
§ Manages VMs
§ Manages chef servers
§ Handles permissions
§ UI, REST API and CLI
API
Project configuration and chef Barkeeper VMware
repository
© 2013 SAP AG. All rights reserved. Public 16
17. Barkeeper
Infrastructure
Automation
© 2013 SAP AG. All rights reserved. Public 17
18. Deployment
Automation
© 2013 SAP AG. All rights reserved. Public 18
19. Deployment Automation
Deployment
Automation
Dedicated cookbooks automate
application deployment and configuration
© 2013 SAP AG. All rights reserved. Public 19
20. Test
Automation
© 2013 SAP AG. All rights reserved. Public 20
21. Test Automation
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
© 2013 SAP AG. All rights reserved. Public 21
22. Continuous
Delivery
© 2013 SAP AG. All rights reserved. Public 22
23. Continuous Delivery
Continuous
Delivery
§ Bamboo Continuous Integration server
§ Orchestrates the flow from code push to productive
deployment
§ Build grid
§ Parallel execution
© 2013 SAP AG. All rights reserved. Public 23
24. Bamboo jobs Source/Chef
repositories
Commit
Build, unit test
Package, publish
Pull deployment automation,
Artifact / Binary binaries and artifacts
repository
Deploy Test,
functional tests
Test
Deploy QA,
sanity tests QA
Prod
Deploy Prod
Environments
© 2013 SAP AG. All rights reserved. Public 24
25. Pipeline Interactions – Deploy Environment
Continuous
Delivery
Create chef server
Chef Server
Bar Keeper
Create VMs
VM 1
VM 2
VM 3
VM 4
VM 5
VM 6
GIT Project Repo
© 2013 SAP AG. All rights reserved. Public 25
26. Pipeline Interactions - Install Environment
Continuous
Delivery
Sync
Chef Server Chef Server
Bar Keeper
Bamboo
Run chef clients
VM 1
VM 2
Build Agents
VM 3
VM 4
VM 5
VM 6
Shared cookbooks
GIT Chef Repo shelf
© 2013 SAP AG. All rights reserved. Public 26
27. Pipeline Interactions - Test Application
Continuous
Delivery
Chef Server Chef Server
REST API Tests
Bamboo
VM 1
Functional tests
VM 2
Build Agents
VM 3
VM 4
VM 5
VM 6
Git source repo with test
automation
© 2013 SAP AG. All rights reserved. Public 27
28. 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
© 2013 SAP AG. All rights reserved. Public 28
29. 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
© 2013 SAP AG. All rights reserved. Public 29
30. 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.
© 2013 SAP AG. All rights reserved. Public 30
31. ?
Questions
© 2013 SAP AG. All rights reserved. Public 31
32. Thank you
Twitter @alonaizenberg
Email alon.aizenberg@sap.com
© 2013 SAP AG. All rights reserved. Public 32