$30 off During Our Annual Pro Sale. View Details »

DevOps Conference 2015

DevOps Conference 2015

Wie baut man ein privates Amazon AWS mit Open Source? In diesem Vortag wird die Realisierung einer privaten Cloud vom Konzept bis hin zum Produktivsystem vorgestellt. Amazon hat mit AWS diese Idee als Public Cloud für die breite Öffentlichkeit zugänglich gemacht. Es gibt jedoch gute Gründe eine eigene, private Cloud zu bauen. Diese Gründe können Sicherheitsbedenken und rechtliche Kriterien sein. Dr. Lukas Pustina und Daniel Schneller von der codecentric AG haben für das Startup CenterDevice eine private Cloud realisiert. In diesem Vortrag werden konkret Konzepte, Entscheidungen und Probleme erläutert. Dabei wird auch die ein oder andere Anekdote aus dem täglichen Wahnsinn der Cloud Administration nicht fehlen. Anhand spezifischer Anforderungen werden die eingesetzten Komponenten Ubuntu Linux, Ansible, Ceph und OpenStack eingeführt.

Lukas Pustina

June 03, 2015
Tweet

More Decks by Lukas Pustina

Other Decks in Technology

Transcript

  1. Private Cloud mit Ceph
    und OpenStack
    Daniel Schneller
    [email protected]
    @dschneller
    Lukas Pustina
    [email protected]
    @drivebytesting

    View Slide

  2. Aus dem täglichen Wahnsinn des Cloud Betriebs

    View Slide

  3. Wer sind wir?

    View Slide

  4. @dschneller
    @drivebytesting

    View Slide

  5. Was machen wir?

    View Slide

  6. View Slide

  7. Wo kamen wir her?

    View Slide

  8. Warum wollten wir
    davon weg?

    View Slide

  9. Wohin wollten wir?

    View Slide

  10. View Slide

  11. Private Cloud

    View Slide

  12. Hardwareabstraktion

    View Slide

  13. Bare Metal Hardware
    Virtual Environment
    Application
    Virtualization
    Storage Network
    Compute

    View Slide

  14. Bare Metal Hardware

    View Slide

  15. View Slide

  16. View Slide

  17. Baseline Benchmarks
    Erwartungen definieren

    View Slide

  18. Storage
    Disk I/O pro Node

    View Slide

  19. View Slide

  20. View Slide

  21. Netzwerk

    View Slide

  22. IEEE 802.3ad != IEEE 802.3ad
    > cat /etc/network/interfaces
    ...
    auto bond2
    iface bond2 inet manual
    bond-slaves p2p3 p2p4 # interfaces to bond
    bond-mode 802.3ad # activate LACP
    bond-miimon 100 # monitor link health
    bond-xmit_hash_policy layer3+4 # use Layer 3+4 for link selection
    pre-up ip link set dev bond2 mtu 9000 # set Jumbo Frames
    auto vlan-ceph-clust
    iface vlan-ceph-clust inet static
    pre-up ip link add link bond2 name vlan-ceph-clust type vlan id 105
    pre-up ip link set dev vlan-ceph-clust mtu 9000 # Jumbo Frames
    post-down ip link delete vlan-ceph-clust
    address ...
    netmask ...
    network ...
    broadcast ...
    ...

    View Slide

  23. [node01] > iperf -s -B node01.ceph-cluster
    [node02] > iperf -c node01.ceph-cluster
    [node03] > iperf -c node01.ceph-cluster

    View Slide

  24. Storage

    View Slide

  25. “Unified, distributed storage system designed for
    excellent performance, reliability and scalability”

    View Slide

  26. Hoch skalierbar
    Commodity Hardware
    Kein Single Point of Failure

    View Slide

  27. Ceph Komponenten

    View Slide

  28. OSD Daemons
    Object Storage Device Daemons

    View Slide

  29. Ceph Benchmark

    View Slide

  30. Virtualisierung

    View Slide

  31. View Slide

  32. View Slide

  33. OpenStack Komponenten

    View Slide

  34. CenterDevice

    View Slide

  35. Gesamtarchitektur
    Bare Metal
    Ceph
    Node 1 Node 2 Node 3 Node 4
    OSD 1









    OSD 48

    View Slide

  36. Node 5
    Node 1 Node 2 Node 3 Node 4
    CD-VM1
    VMs
    Bare Metal
    Ceph
    Node 6
    CD-VM2
    Node 7
    CD-VM3
    Node 8
    CD-VM4
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    Node …
    VM …
    VM …
    Gesamtarchitektur
    OSD 1









    OSD 48

    View Slide

  37. Node 5
    Node 3
    Node 1
    Rados GW
    Node 2
    Rados GW Rados GW
    Node 4
    Rados GW
    CD-VM1
    VMs
    Bare Metal
    Ceph
    Node 6
    CD-VM2
    Node 7
    CD-VM3
    Node 8
    CD-VM4
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    Node …
    VM …
    VM …
    Gesamtarchitektur
    OSD 1









    OSD 48

    View Slide

  38. Node 5
    Node 1
    Rados GW
    Node 2
    Rados GW
    Node 3
    Rados GW
    Node 4
    Rados GW
    CD-VM1
    HAProxy
    VMs
    Bare Metal
    Ceph
    Node 6
    CD-VM2
    Node 7
    CD-VM3
    Node 8
    CD-VM4
    HAProxy HAProxy
    HAProxy
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    Node …
    VM …
    VM …
    Gesamtarchitektur
    OSD 1









    OSD 48

    View Slide

  39. Node 5
    Node 1
    Rados GW
    Node 2
    Rados GW
    Node 3
    Rados GW
    Node 4
    Rados GW
    CD-VM1
    HAProxy
    VMs
    Bare Metal
    Ceph
    Node 6
    CD-VM2
    Node 7
    CD-VM3
    Node 8
    CD-VM4
    HAProxy HAProxy
    HAProxy
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    ES Mo
    CD CD
    Node …
    VM …
    VM …
    Gesamtarchitektur
    OSD 1









    OSD 48

    View Slide

  40. Vorteile

    View Slide

  41. Nachteile

    View Slide

  42. Hardware Caveats

    View Slide

  43. Bonding Modes
    Halbe Kraft voraus!
    [node01] > iperf -s -B node01.ceph-cluster
    […]
    [ 4] local 10.102.5.11 port 5001 connected with 10.102.5.12 port 49412
    [ 5] local 10.102.5.11 port 5001 connected with 10.102.5.12 port 49413
    [ 6] local 10.102.5.11 port 5001 connected with 10.102.5.13 port 59947
    [ 7] local 10.102.5.11 port 5001 connected with 10.102.5.13 port 59946
    [ ID] Interval Transfer Bandwidth
    [ 4] 0.0-10.0 sec 342 MBytes 286 Mbits/sec
    [ 5] 0.0-10.0 sec 271 MBytes 227 Mbits/sec
    [SUM] 0.0-10.0 sec 613 MBytes 513 Mbits/sec
    [ 6] 0.0-10.0 sec 293 MBytes 246 Mbits/sec
    [ 7] 0.0-10.0 sec 338 MBytes 283 Mbits/sec
    [SUM] 0.0-10.0 sec 631 MBytes 529 Mbits/sec
    ???

    View Slide

  44. Bonding Modes
    Halbe Kraft voraus!
    CAUTION
    TRUST

    NOTHING!
    CAUTION
    MEASURE

    EVERYTHING!

    View Slide

  45. Bonding und VLANs
    Ein Switch als Weihnachtsbaum

    View Slide

  46. Bonding und VLANs
    Ein Switch als Weihnachtsbaum
    01: Handle up event of interface Po4
    02: VPC Po4(VPC ID: 4) UP on self. Inform peer to program peer-link to BLOCK traffic
    03: Received control message of type MLAG_INTERFACE_DOWN, for VPC ID 4
    04: Handle down event of interface Po2
    05: VPC Po2(VPC ID: 2) DOWN on self. Inform peer to program peer-link to ALLOW traffic
    06: Handle up event of interface Po2
    07: VPC Po2(VPC ID: 2) UP on self. Inform peer to program peer-link to BLOCK traffic
    08: Handle down event of interface Po42
    09: VPC Po42(VPC ID: 42) DOWN on self. Inform peer to program peer-link to ALLOW traffic
    10: Handle up event of interface Po42
    11: VPC Po42(VPC ID: 42) UP on self. Inform peer to program peer-link to BLOCK traffic
    12: Received control message of type MLAG_INTERFACE_DOWN, for VPC ID 42
    13: Received control message of type MLAG_INTERFACE_UP, for VPC ID 14
    14: Handle down event of interface Po16
    15: VPC Po16(VPC ID: 16) DOWN on self. Inform peer to program peer-link to ALLOW traffic
    16: Received control message of type MLAG_INTERFACE_DOWN, for VPC ID 39
    17: Received control message of type MLAG_INTERFACE_UP, for VPC ID 42
    […]

    View Slide

  47. Bonding und VLANs
    Ein Switch als Weihnachtsbaum
    CAUTION
    TRUST

    NOTHING!
    CAUTION
    FIRMWARE
    FAILS, TOO!

    View Slide

  48. BIOS Updates
    3 Betriebssysteme und diverse Gigabytes

    View Slide

  49. BIOS Updates
    3 Betriebssysteme und diverse Gigabytes
    CAUTION
    KNOW THE

    TOOLCHAIN!

    View Slide

  50. Ceph Caveats

    View Slide

  51. Scrubbing
    Integrität hat ihren Preis.
    CAUTION
    DISK I/O

    INTENSIVE!
    CAUTION
    SCHEDULE

    MANUALLY!

    View Slide

  52. RADOS Gateway
    Use as recommended for maximum happiness
    CAUTION
    OBEY USER

    LIMITS!
    CAUTION
    KNOW THE
    CONFIG
    CAUTION
    NO SNAPS

    ALLOWED!

    View Slide

  53. OpenStack Caveats

    View Slide

  54. Netzwerk – Total trivial
    Node 5
    CD-VM1
    Node 6
    CD-VM2
    Node 7
    LB1
    HAProxy

    Node 8
    LB2
    HAProxy

    Der Wolf im Netzpelz

    View Slide

  55. Netzwerk – Total trivial
    Der Wolf im Netzpelz
    https://openstack.redhat.com/Networking_in_too_much_detail

    View Slide

  56. Netzwerk – Total trivial
    Der Wolf im Netzpelz
    VHOST_NET_ENABLED=0
    # To load the vhost_net module, which in some cases can speed up
    # network performance, set VHOST_NET_ENABLED to 1.
    $ cat /etc/default/qemu-kvm

    View Slide

  57. Netzwerk – Total trivial
    Der Wolf im Netzpelz
    # To load the vhost_net module, which in some cases can speed up
    # network performance, set VHOST_NET_ENABLED to 1.
    VHOST_NET_ENABLED=1
    $ cat /etc/default/qemu-kvm

    View Slide

  58. Netzwerk – Total trivial
    Der Wolf im Netzpelz
    # To load the vhost_net module, which in some cases can speed up
    # network performance, set VHOST_NET_ENABLED to 1.
    VHOST_NET_ENABLED=1
    $ cat /etc/default/qemu-kvm
    CAUTION
    VIRTUAL

    NETWORKS!

    View Slide

  59. Live Migration
    “Der sich den Wolf patcht”
    CAUTION
    CHECK BUG

    TRACKERS!
    CAUTION
    YOU’RE NOT

    DEFAULT!

    View Slide

  60. Heat Stacks
    Ein Wolf kommt selten allein
    CAUTION
    CHECK BUG

    TRACKERS!
    CAUTION
    YOU’RE NOT

    THE DEFAULT!

    View Slide

  61. Fazit

    View Slide

  62. Fazit
    http://bit.ly/1FktZok #AllesKaputt
    Aber OpenSource ermöglicht Selbsthilfe.

    View Slide

  63. Zum Schluss

    View Slide

  64. Folien bei Slideshare
    http://www.slideshare.net/dschneller

    View Slide

  65. http://www.cloudfibel.de
    codecentric Cloud Fibel 1. 2015
    PRAXIS AUS DEM NÄHKÄSTCHEN
    ÜBERBLICK
    6 OPENSTACK - PRIVATSACHE
    18 DOCKER - DIENSTE IN CONTAINERN
    29 CEPH - MÄCHTIG FLEXIBEL
    42 ANSIBLE - EINFACH LEISTUNGSFÄHIG
    58 DOCKER TOOLS
    68 CEPH BENCHMARKS
    74 HARDWARE FÄLLT AUS
    78 NEVER CHANGE A RUNNING SYSTEM
    80 PROVISIONIERUNG VON IAAS CLOUDS
    86 JINJA2 FÜR BESSERE ANSIBLE TEMPLATES
    93 SSH ZWEIFAKTOR-AUTHENTIFIZIERUNG
    100 EIN OPENSTACK-KRIMI

    View Slide

  66. Blog Posts
    • https://blog.codecentric.de/en/2015/03/true-kvm-live-migration-openstack-
    icehouse-ceph-based-vm-storage/
    • https://blog.codecentric.de/en/2014/06/provisioning-iaas-clouds-dynamic-ansible-
    inventories-openstack-metadata/
    • https://blog.codecentric.de/en/2014/08/jinja2-better-ansible-playbooks-templates/
    • https://blog.codecentric.de/en/2014/06/ansible-simple-yet-powerful-automation/
    • https://blog.codecentric.de/en/2014/09/openstack-crime-story-solved-tcpdump-
    sysdig-iostat-episode-1/
    • https://blog.codecentric.de/en/2014/12/haproxy-http-header-rate-limiting/
    • https://blog.codecentric.de/en/2014/12/centerdevice-cloud-architecture-revisited/
    • https://blog.codecentric.de/en/2013/12/never-change-running-system-wrong/
    • https://blog.codecentric.de/en/2013/11/hardware-will-fail-just-way-expect/

    View Slide

  67. Vielen Dank.
    Daniel Schneller
    [email protected]
    @dschneller
    Dr. Lukas Pustina
    [email protected]
    @drivebytesting

    View Slide