Top Banner
OpenNebula, the foreman and CentOS play nice, too Let‘s set up a private cloud. Nils Domrose Berlin, 09-May-2014
36

OpenNebula, the foreman and CentOS play nice, too

Aug 20, 2015

Download

Technology

inovex GmbH
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: OpenNebula, the foreman and CentOS play nice, too

OpenNebula, the foreman and CentOS play nice, too

Let‘s set up a private cloud.

Nils Domrose Berlin, 09-May-2014

Page 2: OpenNebula, the foreman and CentOS play nice, too

2

1.  Cattle vs. Pets 2.  Repositories, Bare-Metal Deployment OS

3.  Puppet 101

4.  Foreman deployment

5.  OpenNebula

Agenda

Page 3: OpenNebula, the foreman and CentOS play nice, too

3

▸  senior linux systems engineer at inovex GmbH

▸  worked as a network engineer, software developer and systems engineer

▸  using foreman for about 1 year

▸  using bare-metal deployment for ages

▸  life is short – let’s focus on interesting stuffstuff!

About me

Page 4: OpenNebula, the foreman and CentOS play nice, too

4

‣  What is it you want to achieve ?

‣  Do you have pets or cattle ?

Let‘s setup a private Cloud ...because everyone needs a cloud they said...

Virtual Infrastructure

cattle or pet?

Cloud Management

cattle

pet

Term “Cloud” is missing here by purpose!

Page 5: OpenNebula, the foreman and CentOS play nice, too

5

Let‘s setup a private Cloud ...common pet Names

gollum gandalf sauron

lx-smb01 git-srv1

scotty spock kirk

sheldon leonard

penny

mail

fw gw

build-01

Page 6: OpenNebula, the foreman and CentOS play nice, too

6

Let‘s setup a private Cloud ...common cattle Names

care don’t

you

Page 7: OpenNebula, the foreman and CentOS play nice, too

7

Let‘s setup a private Cloud ...what if I can‘t remember all my pet‘s names ?

Virtual Infrastructure

Cloud Management

Page 8: OpenNebula, the foreman and CentOS play nice, too

8

Regardless of cattles or pets we need to get the hardware installed....

How to Start ? In the beginning there was bare metal...

OS Mirror Bare Metal Installer

Page 9: OpenNebula, the foreman and CentOS play nice, too

9

You want... ‣  ...long-term support

‣  ...HW vendor supported firmware tools für your hardware

‣  ...maybe benefit a bit from the RedHat Eco-System

You don‘t want... ‣  ...the latest greatest distro to operate your cloud on

‣  ...be the first to find all the errors

‣  ...keep hunting update issues

‣  ...pay for fear

OS ...choose your weapon well....

OS

Page 10: OpenNebula, the foreman and CentOS play nice, too

10

You don‘t want to download and install an ISO....

OS ...we can‘t do anything with the OS yet....

OS

Page 11: OpenNebula, the foreman and CentOS play nice, too

11

What can pulp do for you? ‣  manage RPM repositories

‣  simple mirroring

‣  snapshot (branch) repositories

‣  create custom or mixed repositories

‣  manage puppet repositories (local forge)

Mirror ...or better call it repository management from now on....

Mirror

Page 12: OpenNebula, the foreman and CentOS play nice, too

12

Create a vm / setup a single system ‣  get pulp puppet module

https://github.com/FILIADATAGmbH/puppet-pulp

Install the repository management (optional) ...or use the public repos if you don‘t need it...

Mirror

class {'pulp': repo_enabled => true, } -> class{'pulp::server': } -> class{‚pulp::admin‘:}

$ pulp-admin rpm repo create --repo-id=foreman --feed=http://yum.theforeman.org/releases/1.4/el6/x86_64/ --relative-url=foreman Successfully created repository [foreman]

$ pulp-admin rpm repo sync run --repo-id=foreman

Page 13: OpenNebula, the foreman and CentOS play nice, too

13

What you get: ‣  Pulp Server

‣  Pulp admin tools

‣  MongoDB (used for pulp meta data)

‣  qpid used as pulp internal task broker

Install the repository management (optional) ...or use the public repos if you don‘t need it...

Mirror

Page 14: OpenNebula, the foreman and CentOS play nice, too

14

You want ... ‣  ...it in you Datacenter!

What can the foreman do for you? ‣  Bare-metal deployment

‣  Iso based deployment

‣  CMDB

‣  Puppet ENC & dashboard

‣  Provision your DNS and DHCP infrastructure

‣  Provision your virtual datacenter or Cloud-Services

‣  Provide a single interface to manage you server and compute resources

‣  Provide an extensible platform for lifecycle management

Bare-Metal Installer

Bare Metal Installer

Page 15: OpenNebula, the foreman and CentOS play nice, too

15

Create a vm / setup a single system ‣  use puppet as early as possible via apply

‣  puppetize the installation later on to run on a master, too.

‣  The foreman installer is basically a puppet apply + hiera data

Bare-Metal Installer Installing the bare-metal installer

Bare Metal Installer

$foreman_answersfile = ‘/etc/foreman/foreman-installer-answers.yaml‘ file {$foreman_answersfile: owner => ‘root‘, group => ‘root‘, mode => ‘0600‘, content => template(‘foreman/foreman-installer-answers.yaml.erb‘), } exec {‘foreman-installer‘: command => ‘/usr/bin/foreman-installer –d‘ logoutput => on_failure, ...

Page 16: OpenNebula, the foreman and CentOS play nice, too

16

What you get: ‣  Puppet master

‣  Puppet CA ‣  Gitolite repo

‣  PXE boot environment

‣  DHCP Server ‣  Foreman-Smart Proxy

‣  Foreman GUI

Bare-Metal Installer Installing the bare-metal installer

Bare Metal Installer

Page 17: OpenNebula, the foreman and CentOS play nice, too

17

Now we need some puppet roles including the profiles for our services

What‘s next

OS Mirror Bare Metal Installer √ √ √

Page 18: OpenNebula, the foreman and CentOS play nice, too

18

Puppet 101

Puppet Module Design

Roles - Business Logic (optional)

Hieraoptional params.ppProfiles - Technology Abstraction (optional)

Component Modules - Resource Modelling params.pp

os and module specific data

environment specific data

1

1..n

1

1..n

R

1 1..n

R R R RRR

1 1

1..n

node to role classification

Node / ENC1 1

These are puppet forge modules

Create service specific profiles from component modules + config

Create roles from profiles

Page 19: OpenNebula, the foreman and CentOS play nice, too

19

Puppet 101 ...Profiles

class profile_one { class {'one': oned => true sunstone => true } }

Page 20: OpenNebula, the foreman and CentOS play nice, too

20

Puppet 101 ...Roles

Class role_one_node { class {‘profile_base‘:} -> class {‘profile_ceph ‘:} -> class {‘profile_one ‘:} }

Page 21: OpenNebula, the foreman and CentOS play nice, too

21

https://github.com/epost-dev/opennebula-puppet-module

Might need to set: Encoding.default_external = Encoding::UTF_8

Might need to set/fix defaults for $kickstart_data, $ssh_prov_keys /$ssh_pub_keys and $one_repo_enable in params.pp or via module_data or global hiera.

Update baseurl to: ‘http://downloads.opennebula.org/repo/CentOS/6/stable/$basearch’ in prerequisites.pp

Puppet component module for your cloud ...and minor tweaks for CentOS

# git clone https://github.com/epost-dev/opennebula-puppet-module one

Page 22: OpenNebula, the foreman and CentOS play nice, too

22

When we talk about open source and Cloud-Management today, we will most likely end up in an Openstack discussion.

‣  Openstack is an amazing Project with huge momentum

‣  With Openstack you can cover almost all aspects of cloud infrastructure

Why do we use OpenNebula here

Page 23: OpenNebula, the foreman and CentOS play nice, too

23

On the other hand Openstack is maybe moving to fast,

‣  Core Components are subject to change ‣  Manageability and clean upgrade paths just recently become a priority

‣  Lots of projects went live with an already outdated release

Why do we use OpenNebula here

Page 24: OpenNebula, the foreman and CentOS play nice, too

24

Analyze your requirements and ask yourself:

Do I really need all the features?

Then either stick to Openstack or consider an alternative like OpenNebula…

Why do we use OpenNebula here

Page 25: OpenNebula, the foreman and CentOS play nice, too

25

Installation process using the foreman ...let‘s deploy some boxes

Smart-Proxy

PuppetMaster

DHCP

DNS

Puppet CA

compute Resource

TFTP

OS Repo

query unattended Resources

virtual / physical Instances

9 PXE Boot

8 DHCP request

7 create compute instance (optional)

6 create auto sign entry

5 provision TFTP & PXE

4 request kernel & initrd

3 create DNS entries

2 request lease

1 create new host

unattendedResources

2

34

5

6

7

8

9

1212

request puppet certificate

GET ENC & catalog, upload facts

notify finish

10

11

12

13

10

10

11

13

113

Page 26: OpenNebula, the foreman and CentOS play nice, too

26

Deploying One nodes

Page 27: OpenNebula, the foreman and CentOS play nice, too

27

Deploying One nodes

Page 28: OpenNebula, the foreman and CentOS play nice, too

28

Deploying One nodes

Page 29: OpenNebula, the foreman and CentOS play nice, too

29

Deploying One nodes

Page 30: OpenNebula, the foreman and CentOS play nice, too

30

Accessing your new cloud

Page 31: OpenNebula, the foreman and CentOS play nice, too

31

Accessing your new cloud

Page 32: OpenNebula, the foreman and CentOS play nice, too

32

Accessing your new cloud

Page 33: OpenNebula, the foreman and CentOS play nice, too

33

Accessing your new cloud

Page 34: OpenNebula, the foreman and CentOS play nice, too

34

The big picture

Physical Network

Virtual Network

Hosted

VirtualR

ealForeman REST API

CMDB

Deploym

entLifecycle M

gmt.

Page 35: OpenNebula, the foreman and CentOS play nice, too

35

‣  There are still some rough edges in the modules used

‣  Good news – they are of minor type

‣  Currently you cannot use OpenNebula as a compute resource due to missing fog support

‣  You can however use OpenNebula to provision hosts on foreman for bare-metal deployment of instances – see: http://opennebula.org/opennebula-and-foreman-integration/

Disclaimer

Page 36: OpenNebula, the foreman and CentOS play nice, too

36

Thank you for listening

Contact Nils Domrose Senior System Engineer Linux inovex GmbH Office Cologne [email protected]