Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and...

42
Migrating deployment processes and Continuous Integration at SAP SE to a future-proof design using SLES12, Chef, GitHub, OBS and KIWI Florian Winkler Linux Consultant & Trainer B1 Systems GmbH [email protected] Eike Waldt Linux Consultant & Trainer B1 Systems GmbH [email protected]

Transcript of Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and...

Page 1: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

Migrating deployment processes and Continuous Integration at SAP SEto a future-proof design using SLES12, Chef, GitHub, OBS and KIWI

Florian Winkler

Linux Consultant & Trainer

B1 Systems GmbH

[email protected]

Eike Waldt

Linux Consultant & Trainer

B1 Systems GmbH

[email protected]

Page 2: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

2

Introduction

Page 3: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

3

Introducing B1 Systems

● founded in 2004● operating both nationally & internationally● ~ 100 employees● vendor-independent (software & hardware)● SUSE consulting & training partner● focus:

– consulting

– support

– training

– development

– operations

– solutions

Page 4: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

4

Areas of expertise

Monitoring

NAGIOS RHEL

Linux Operating Systems

Systems Management

Cloud Computing

KVM

XEN

Virtualization

ICINGA

Configuration Management

PUPPET

SALT ANSIBLE

RH SATELLITE

SPACEWALK

SUSE MANAGER

SLES

DEBIAN

UBUNTU

MIRANTIS

SUSE CLOUD

RH OSP

OPENSTACK

Virtualization

Page 5: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

5

Who we are

● Eike Waldt– Linux Consultant & Trainer

– B1 employee since 05/2015

● Florian Winkler– Linux Consultant & Trainer

– B1 employee since 04/2014

Page 6: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

6

Close collaboration of ...

– SaaS Cloud

– HANA Enterprise Cloud

– SAP Managed Service – SaaS Cloud Managed Services

Page 7: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

7

Agenda

• Motivation and goals

• Software used

• Landscapes and processes

• GMP - Global Management Portal

• Operating system images

• Deployment

• Chef – Configuration management

• Version control

• Workflow

• GMP - Integration of new tools

• Chef design @ SAP’s clouds

• Conclusion

• Outlook

Page 8: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

8

Motivation and goals

Page 9: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

9

Motivation and goals

● SLES12 SP1 at the doorstep

– all the changes that come with it …● historically grown deployment process

– reinvent this completely

– state of the art technology● no real configuration management so far● we wanted a fancy DevOps approach xD● regaining a common base between several cloud landscapes

Page 10: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

10

Software used

Page 11: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

11

Software used

● SUSE® Linux Enterprise Server 12● Open Build Service● kiwi(-ng)● jenkins● GitHub Enterprise● chef● chefdk● Berkshelf● test-kitchen● docker

Page 12: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

12

Landscape overview

Page 13: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

13

Admin

Customer

GMP

ResourcePools

SaaS

HEC

landscapes

landscapes

Bare Metal Hypervisor

Xen KVM VMware

Virtual Machines

HardwarePools

VMPools

Pools

Landscape overview

HEC 13 landscapes 13 Dcs13.000 VMs 800 hypervisors 1.700 BareMetal

SaaS 19 landscapes 8 DCs32.000 VMs 3.700 hypervisors 1.100 Baremetal

HEC

SaaS

Page 14: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

14

GMP - Global Management Portal

Page 15: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

15

Global Management Portal (GMP)

– network• network ranges• DHCP• DNS

– hypervisor administration and deployment

– virtual machine administration and deployment

● customer frontend● inventory database

– operating system images

– monitoring

– LDAP administration

– storage administration

– remote execution tool

– auditing

• SAP internal development• orchestration platform for ...

Page 16: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

16

Operating system images

Page 17: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

17

OS images - ye olde way

● dump/restore a Goldmaster VM

– update VM via “zypper up”

– make changes directly in VM

– different VMs for different image types• hypervisor• virtual machines

Pitfalls• waste of resources• dumping a running system is

unclean• no good version

control/changelog• no reproducible builds• you do not really know what you

are deploying

Page 18: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

18

OS images - the fancy way

● build images with kiwi in OBS

– define content• in descriptive language

• in file form

– kiwi files and xml in git

– minimalistic image approach

Benefits

• integration in already existing OBS

• clean build

– contents of the images are well-defined

– reproducible builds

• release management

• ease of customization

• great changelog in git

• faster deployment

• up-to-date packages

Page 19: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

19

Deployment

Page 20: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

20

Deployment - ye olde way

1) (PXE boot)

2) Restore dumped image

3) (Re)boot

4) Fetch/execute firstboot script

a) perl scripts

b) config file templates

c) daemons to

enable/start/disable/stop

d) platform, DC specific parameters

5) Reboot

6) Machine is ready

Pitfalls• data stored in files• unmaintainable

• no “good” version control/changelog

• no reproducible builds

Page 21: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

21

Deployment - the fancy way

1) (PXE boot)

2) Restore kiwi image

3) (Re)boot

4) cloud-init

a) network settings

b) chef-client settings

5) Execute chef-client

a) config file templates

b) daemons to enable/start/disable/stop

c) platform, DC specific parameters

6) Reboot

7) Machine is ready

Benefits● clean deployment● everything is kept in git● great changelog in git● way more maintainable

Page 22: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

22

Chef - ConfigManagement

Page 23: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

23

Chef design basics

● client/server architecture● stored data

– attributes defined in roles

• execution of code

– cookbooks/recipes

• design of dependencies

– roles for landscapes/DCs (attributes)

– nested roles for pools/customers/applications

– run_list defines all roles and recipes for a client group or a single client

• lifecycle and release management

– environments define cookbook versions

Page 24: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

24

Version control

Page 25: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

25

Version control - ye olde way and what doesn’t come with it

● local SVN repo for Perl scripts

– only firstboot under control

– no version control for external sources

Pitfalls• no real AAA• no QA workflow• no approval workflow

Page 26: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

26

Version control - the fancy wayand what comes with it

● git(hub) for almost everything

– kiwi files

– cookbooks

• in their own separate repositories

– chef environments

Benefits• github is a well-known tool• using SAP’s internal github-

enterprise• real AAA• Development /testing/

approvement/rollout workflows

Page 27: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

27

Workflow

Page 28: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

28

Workflowdev/test/deploy

github

jenkins

chef-server

GMP

admin

test environment docker/Xen hypervisor

development workstation direct

indirect

chef-server

Page 29: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

29

GMP (Global Management Portal) –Integration of new tools

Page 30: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

30

Global Management Portal (GMP)

– network• network ranges• DHCP• DNS

– hypervisor administration and deployment

– virtual machine administration and deployment

● customer frontend● inventory database

– operating system images

– monitoring

– LDAP administration

– storage administration

– remote execution tool

– auditing

• SAP internal development• orchestration platform for ...

Page 31: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

31

GMP integration

● automated chef-server install● chef-server tasks

– manipulating node objects

• configuration database and mapping of entities

– images to pools

– chef-servers to pools

– attributes to landscapes/pools

– run_list to pools/nodes● automated sync: GMP → (git) → chef-server

– landscape attributes (roles)

– environments, cookbooks and roles

Page 32: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

32

Chef design @ SAP’s clouds

Page 33: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

33

Chef design @ SAP’s cloudsAdmin

Hardware Pools

SaaS HEC

run_list

attributes

role

chef-server

GMP

Resource Pool: DC1-Customer 1

Resource Pool: DC2-Customer 2

Customer 1

environment

VM Pools

Hypervisorrun_list

Hypervisorrun_list

attributes

role

Bare Metalrole run_list

single attribute

chef-server

Customer 2

Landscape "SaaS 01"

Landscape "SaaS 02"

single attribute

attributes

role

attributes

base_role

attributes

bas_role run_list

environment

attributesattributes

rolerole

Page 34: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

34

Conclusion

Page 35: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

35

Conclusion

● cleaned up deployment process● working configuration management● way better testing and integration workflow

– implementing CI and CD● identical infrastructure code in both SAP clouds● future-proof

– ready for new OS versions

Page 36: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

36

Outlook

Page 37: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

37

Outlook

● application deployment via Chef● in-depth customization from customer side

– cookbooks

– coles

– own chef servers (unmanaged)● “backporting” deployment to SLES 11● establishing configuration management for SLES11

Page 38: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

38

Thank you

Page 39: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

39

Thank you for making this possible!

● Tools team

– Sebastian Koehn

– Sven Schubert

● HEC XEN team

– Florian Kellmer

– Ralf Lang

– Christian Wolter

● MCD team

– Tino Kaufmann

– Alexander Lode

● SaaS Cloud team

– Daniel Schier

– Tobias Stolz

– Ronny Tiebel

• ticketweb

– Sebastian Krieger

Page 40: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

40

Questions?

Page 41: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment

41

Related Talks ...

● SUSE Manager 3 & SaltStack at Tyson Foods

– Friday, Nov 11, 10:15 AM - 11:15 AM

• The SUSE Manager Roadmap: A journey towards agile management of workloads in the enterprise

– Friday, Nov 11, 9:00 AM - 10:00 AM

Page 42: Migrating deployment processes and Continuous Integration ... · Migrating deployment processes and Continuous Integration at SAP SE ... ANSIBLE RH SATELLITE ... application deployment