piotr kasprzak, gwdg andy edmonds, @dizz, icclab, zhaw · integrates with puppet (and acts as web...

39
From Bare Metal to Cloud Andy Edmonds, @dizz, ICCLab, ZHAW Piotr Kasprzak, GWDG

Upload: others

Post on 17-Aug-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

From Bare Metal to CloudAndy Edmonds, @dizz, ICCLab, ZHAW

Piotr Kasprzak, GWDG

Page 2: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Intros

ICCLab● Zurich University for

Applied Sciences● Cloud Computing

Research

GWDG● Service Provider for

Max Planck Society and University of Goettingen

● Research

Page 3: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

GWDG Cloud Hardware

Nodes 38CPUs 152Core 2432Memory 9728 TB

Nodes 20CPUs 80Core 1280Memory 1920 TB

ICCLab Cloud Hardware

We've Hardware for Cloud!

Page 4: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Challenges or Problems?

● Clouds in essence are big data centres

○ Means lots of servers:

■ Manual configuration not an option

■ Automation is required

Page 5: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Challenges or Problems?

Cloud frameworks can/are be complicated!

Page 6: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Challenges or Problems?

● But Clouds are "cool" - Aayyy!

● How to deploy a "cloud"○ with minimal user interaction?○ least number of "hands"?○ across many servers?

BUT

Page 7: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Challenges or Problems?

● How to share/standardise these processes?○ Configuration - drift prevention○ Testing - configuration, system functionality○ Compliance - auditing, ITIL○ Agility ○ Independence

■ Of physical/virtual deployment■ Of infrastructure

Page 8: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Automation Toolchain

Page 9: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Automation Toolchain

Page 10: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Provision - OS rollout

Baremetal VM

?

Page 11: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

● "Single Address For All Machines Lifecycle Management".

● Manages or proxies to DNS, DHCP, TFTP, Virtual Machines, PuppetCA, CMDB

● Integrates with Puppet (and acts as web front end to it).

● Provisions:○ most flavours of *NIX, Windows○ Virtual machines - libvirt, oVirt○ Cloud Resources - Amazon EC2, VMware vCenter

● Has an API! :-)

Provision - Foreman

Page 12: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Provision - Foreman Arch

Page 13: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

● Declarative configuration language○ Describe desired state of a system, not how to

achieve it○ Idempotence

● Different types of resources: software package, service, user, configuration file, mysql database, ...

● Dependencies can be formulated● Grouping of resources by "class" concept:

○ Way of structuring your descriptions● Abstraction layer for resources:

○ Independence from system type (different variants of linux, *bsd, mac os, windows, ...)

Configuration - Puppet

Page 14: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

==?

sync event

Configuration - Puppet's Model

Page 15: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

==?

sync event

package {‘sshd’: ensure => present, }

You describe system state...

Page 16: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

==?

sync event

package {‘sshd’: ensure => present, }

rpm –q sshd --------------------dpkg-query –search sshd

Puppet collects current state...

Page 17: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

!=

sync event

package {‘sshd’: ensure => present, }

absent present

rpm –q sshd --------------------dpkg-query –search sshd

Puppet compares...

Page 18: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

!=

sync event

package {‘sshd’: ensure => present, }

absent present

yum install sshd------------------------apt-get install sshd

rpm –q sshd --------------------dpkg-query –search sshd

Puppet synchronizes...

Page 19: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

currentstate

desiredstate

!=

sync event

package {‘sshd’: ensure => present, }

absent present

state transition: absent -> present

rpm –q sshd --------------------dpkg-query –search sshd

yum install sshd------------------------apt-get install sshd

Puppet logs...

Page 20: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

A more complete puppet manifestclass ssh::install {

package { "openssh":ensure => present, }

}class ssh::config {

file { "/etc/ssh/sshd_config":ensure => present,owner => 'root',group => 'root',mode => 0600,source => "puppet:///modules/ssh/sshd_config",require => Class["ssh::install"],notify => Class["ssh::service"], }

}class ssh::service {

service { "sshd":ensure => running,hasstatus => true,hasrestart => true,enable => true,require => Class["ssh::config"], }

}class ssh {

include ssh::install, ssh::config, ssh::service}

dependency"if I change..."

Page 21: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

OpenStack @ 10,000m, Looks Easy!

Page 22: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

OpenStack - The Ugly Close-up

Complicated● Many Services● Many Dependencies

Challenge to deploy ● 100's, 1000's of

nodes?

You need an automated toolchain!

Page 23: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Apple Moment!

Page 24: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Demo - What could go wrong?!

Multi-node OpenStack Installation

● 1 controller node ○ "boss"

● 1 compute node○ "worker1"

● More time? Easy to add more.

Page 25: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Demo: Deployment Architecture

Page 26: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Demo: OpenStack Component Deployment

Page 27: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Demo: Code/Config Details

● There are 2 roles (hostgroups)○ openstack/controller - controller.pp○ openstack/compute - compute.pp

● Both have different puppet manifests○ Same 'icclab' module

Page 28: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

What's in a controller node?

Page 29: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

What's in a compute node?

Page 30: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,
Page 31: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Conclusions/Learnings

● Automation is essential● Puppet codifies learnings, makes sharing easy● Foreman a central management point, full lifecycle,

adaptable to other services● Dependence on infrastructure service management

frameworks is lessened○ Fast and efficient to install new ones with a tool

chain● Other than SLA guarantees, the only guarantee to

maintain is the API between provider and customer and this is where standard APIs are need such as OCCI/CDMI/OVF.

Page 32: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Next Steps

● OpenStack to be rolled-out in ICCLab○ New data centre, rolled-out within the month○ Will include all OS Nova (Essex) and Swift services

■ Including OCCI interface ● puppetlab-nova pull-request available

● OpenStack to be rolled-out in GWDG○ Will include all OS Nova (Essex) and Swift services○ Providing production-quality OpenStack services

Page 33: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Everything Presented is Documented at:http://www.cloudcomp.ch

http://cloud.gwdg.deIncluding:

- HOWTOs - Foreman, Puppet, OpenStack installs

- Virtual Machine images

Thanks!Questions?

Page 34: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Backup slides

Page 35: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Toolchain map

VM

Dashboard

GitConfig-DB

(SQL)

ITIL CMDB

Puppet Agent

HostPuppet Agent

Puppet Master

Page 36: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Foreman Arch

Bare-MetalVM

Foreman

TFTP DHCP kernel

initrd

packages

kickstart.ks

XEN

VM

KVM

HTTPDNS

Netinstall (PXE) OS artefacts

Page 37: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

Puppetmaster <-> agent interaction

Page 38: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

What are the common config params?

Page 39: Piotr Kasprzak, GWDG Andy Edmonds, @dizz, ICCLab, ZHAW · Integrates with Puppet (and acts as web front end to it). Provisions: most flavours of *NIX, Windows Virtual machines - libvirt,

CNA und FCoE(Converged Network Adapter/Fiber Channel over Ethernet)

ToR(Top of Rack)

EoR/MoR(End/Middle of Row)

Core

GWDG Cloud topology