44
A one stop solution for Puppet and Openstack Daniel Lobato Garcia daniel.lobato.garcia@cern,ch @eLobatoss

A One-Stop Solution for Puppet and OpenStack

Embed Size (px)

DESCRIPTION

Throughout the last year, we have been using and developing tools that allow us to have an IaaS where our data center is configured by Puppet and our virtualization and authentication needs are catered by Openstack. RedHat's foreman is our lifecycle management tool which we configured to support both bare metal and Openstack virtual machines. We use git to manage environments and hostgroup configurations and we will tell you how we deal with its security implications, how to store Hieradata secrets. Switching from a homebrew toolchain to open source tools like Facter, Foreman, Openstack has turned out into many contributions to these teams. Nearly everyone at CERN has started to wear the devops hat which brings new challenges in terms of development workflows and scalability. Daniel Lobato Garcia Software Engineer, CERN Daniel Lobato is a developer who has worked in very different environmentst, from data centers and mainframes to startups. Nowadays he has dived into the Agile Infrastructure team at CERN where the design and implementation of the new computing infrastructure is done. As for Puppet, he currently helps RedHat to develop Foreman, a lifecycle management tool for physical and virtual machines. One of his goals at CERN is to knot this tool to all the relevant parts of the infrastructure, which includes Puppet for configuration management, OpenStack for virtualization and authentication, Puppetdb and others. He is sure the source of all computer problems is between the chair and the keyboard.

Citation preview

Page 1: A One-Stop Solution for Puppet and OpenStack

A one stop solution

for Puppet and Openstack

Daniel Lobato Garcia

daniel.lobato.garcia@cern,ch

@eLobatoss

Page 2: A One-Stop Solution for Puppet and OpenStack
Page 3: A One-Stop Solution for Puppet and OpenStack

What is CERN

Between Geneva and the Jura mountains, straddling the Swiss-French border

Mission: learn what is the universe made of and how does it work?

3

Page 4: A One-Stop Solution for Puppet and OpenStack

Fundamental

questions in

physics

Why do particles have mass?

What is 96% of the universe made of?

Why isn’t there anti-matter in the universe?

What was the state of matter after the Big Bang?

4

Page 5: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 5

Page 6: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 6

Page 7: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 7

Page 8: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 8

Page 9: A One-Stop Solution for Puppet and OpenStack

Current status

• 270 Openstack hypervisors

• 2900 virtual machines

• 300 users

• 14 Puppet masters

• 6 Foreman backend nodes

• Some production services migrating to our

cloud – early birds

9

Page 10: A One-Stop Solution for Puppet and OpenStack

Goals

• Ramp up to 15K hypervisors – 150-200K

vms in 2015

• Multi-site (Hungary)

10

Page 11: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 11

Page 12: A One-Stop Solution for Puppet and OpenStack

8/12/2013 Document reference 12

Page 13: A One-Stop Solution for Puppet and OpenStack

Why?

• Unnecessary homebrew stack of tools

• Shift to cloud standards with minimal

customizations

• High turnover – can’t teach new tools

13

Page 14: A One-Stop Solution for Puppet and OpenStack

Why?

• Symbiotic relationship with the community

14

Page 15: A One-Stop Solution for Puppet and OpenStack

Openstack?

• Modular IaaS free open source project

• APIs ~compatible with those of Amazon

15

Page 16: A One-Stop Solution for Puppet and OpenStack

Openstack Nova

(compute)

Cloud fabric controller

16

Page 17: A One-Stop Solution for Puppet and OpenStack

Openstack

Keystone (Identity)

RBAC

Integrated with LDAP

Multiple auth* methods

17

Page 18: A One-Stop Solution for Puppet and OpenStack

Openstack Glance

(Images)

Discovery, registration,

delivery of images

18

Page 19: A One-Stop Solution for Puppet and OpenStack

Openstack Horizon

(Dashboard)

19

Page 20: A One-Stop Solution for Puppet and OpenStack

Modules

• Puppet definitions for every use case you

can imagine.

• Dynamic environments

• Hadoop node

• Openstack hypervisor

• … you name it

20

Page 21: A One-Stop Solution for Puppet and OpenStack

21

Workflow..?

Page 22: A One-Stop Solution for Puppet and OpenStack

Modules and Git

• Manifests and hieradata are version

controlled

22

Page 23: A One-Stop Solution for Puppet and OpenStack

23

Git workflow

Puppet masters

Page 24: A One-Stop Solution for Puppet and OpenStack

24

Easy cherry pick

Page 25: A One-Stop Solution for Puppet and OpenStack

25

Git workflow

Page 26: A One-Stop Solution for Puppet and OpenStack

26

Git workflow

Jens

‘Puppetfiles’

Separate repositories

Makes environments and

creates them on the masters

Page 27: A One-Stop Solution for Puppet and OpenStack

Foreman

• Lifecycle management tool for VMs and

physical servers

• External Node Classifier – tells the puppet

master what a node should look like

27

Page 28: A One-Stop Solution for Puppet and OpenStack

28

Page 29: A One-Stop Solution for Puppet and OpenStack

29

Page 30: A One-Stop Solution for Puppet and OpenStack

Power operations & Foreman

8/12/2013 Document reference 30

Foreman Proxy

Physical

box IPMI

Physical

box IPMI

Physical

box IPMI

VM VM VM

Openstack

Nova API

Page 31: A One-Stop Solution for Puppet and OpenStack

Openstack VM creation

8/12/2013 Document reference 31

Page 32: A One-Stop Solution for Puppet and OpenStack

Openstack VM creation

8/12/2013 Document reference 32

Page 33: A One-Stop Solution for Puppet and OpenStack

Openstack VM creation

8/12/2013 Document reference 33

Page 34: A One-Stop Solution for Puppet and OpenStack

Scalability experiences

• Split up services

• Puppet – critical vs non critical

34

12 backend nodes

Batch

4 backend nodes

Interactive

Page 35: A One-Stop Solution for Puppet and OpenStack

Scalability experiences

• Foreman – split into different services

35

ENC Reports

processing UI/API

Load balancer

9443 – UI/API

9444 – Reports

9445 – ENC

Page 36: A One-Stop Solution for Puppet and OpenStack

Scalability experiences

• Autoscale via alarms (Heat)

• Define situations (i.e: load threshold..)

• Spin up VMs as needed

36

Page 37: A One-Stop Solution for Puppet and OpenStack

Scalability guidelines

37

Page 38: A One-Stop Solution for Puppet and OpenStack

github.com

/

cernops

38

Page 39: A One-Stop Solution for Puppet and OpenStack

39

Page 40: A One-Stop Solution for Puppet and OpenStack
Page 41: A One-Stop Solution for Puppet and OpenStack

Secrets provisioning (naïve)

• Use case: provision a db password

41

Page 42: A One-Stop Solution for Puppet and OpenStack

Secrets provisioning (hiera-gpg)

• Use case: provision a db password

42

Page 43: A One-Stop Solution for Puppet and OpenStack

Secrets provisioning (hack)

• Use case: provision a db password

43

Page 44: A One-Stop Solution for Puppet and OpenStack

Secrets provisioning

•Masters need not read secrets

44