Top Banner
Deployment & Betrieb von Ceph mit (ceph-)ansible Frühjahrsfachgespräch GUUG 2018 1. März 2018 Michel Raabe Linux Consultant & Trainer B1 Systems GmbH [email protected]
22

Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Jul 19, 2018

Download

Documents

duongnga
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: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Deployment & Betrieb von Ceph mit(ceph-)ansibleFrühjahrsfachgespräch GUUG 2018 1. März 2018

Michel RaabeLinux Consultant & Trainer

B1 Systems [email protected]

Page 2: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Vorstellung B1 Systemsgegründet 2004primär Linux/Open Source-Themennational & international tätigca. 100 Mitarbeiterunabhängig von Soft- und Hardware-HerstellernLeistungsangebot:

Beratung & ConsultingSupportEntwicklungTrainingBetriebLösungen

Büros in Rockolding, Köln, Berlin & Dresden

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 2 / 22

Page 3: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Schwerpunkte

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 3 / 22

Page 4: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Ceph

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 4 / 22

Page 5: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Ceph: Distributed Storage

Software-Defined-StorageObject, Block & File – alles in einem„...economical commodity hardware...“kein Single-Point-Of-Failureself-manageLTS Releases (Jewel, Luminous, Nautilus, ...)CERN, Telekom, SAP, Western Digital , Cisco, ...

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 5 / 22

Page 6: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Ceph: Daemons 1/2

3 per ClusterQuorumCluster/PG Statusunabhängig von Daten/Tree

10s bis 1000s per Clusterpro Storage Device (SSD, HDD,NVMe)ClientzugriffReplikation

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 6 / 22

Page 7: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Ceph: Daemons 2/2

Weitere Daemons:Ceph Manager – mgrCeph Metadata Server – mdsRadow Gateway (S3) – rgw

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 7 / 22

Page 8: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Ceph: Deployment

ceph-deployceph Puppet ModuleSalt (z.B. DeepSea)kolla-ansibleceph-ansible

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 8 / 22

Page 9: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 9 / 22

Page 10: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible

Github Projectstable-3.0 (v3.0.26)Ceph Luminous ab stable-2.2 Tagansible-2.1/2.2.1site.yml oder site-docker.ymlCluster via Inventory: mons, osds, rgws, ...

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 10 / 22

Page 11: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: Inventory[mons]ceph-mon1ceph-mon2ceph-mon3[mgrs]ceph-mon1ceph-mon2ceph-mon3[ods]ceph-osd1ceph-osd2ceph-osd3

Groups:mons, agents, osds, mdss, rgws, nfss, restapis, rbdmirrors, mgrs, ...

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 11 / 22

Page 12: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: Groups

Ansible-spezifische Konfiguration:

group_vars/all.ymlosds.ymlclients.ymlmons.yml

host_vars/$hostname.yml

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 12 / 22

Page 13: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: config II - docker vs „normal“

site-docker.ymlcontainerized_deployment: true

site.ymlceph_origin: repositoryceph_repository: communityceph_stable_release: luminous

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 13 / 22

Page 14: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: osds 1/3

osd_objectstore: bluestore || filestore

osd_scenario: collocated

devices:- /dev/vdb- /dev/vdc

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 14 / 22

Page 15: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: osds 2/3

osd_objectstore: bluestore

osd_scenario: non-collocated

devices:- /dev/vdb- /dev/vdc

dedicated_devices:- /dev/vdd- /dev/vdd

bluestore_wal_devices: "{{ dedicated_devices }}"

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 15 / 22

Page 16: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: osds 3/3

osd_objectstore: filestore (!)

osd_scenario: lvm

lvm_volume:- data: datalv1

data_vg: datavg1journal: journallv1journal_vg: journalvg1

- data: datalv2data_vg: datavg2journal: /dev/vdd

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 16 / 22

Page 17: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: pools 1/2mons.ymlopenstack_config: trueopenstack_glance_pool:

name: imagespg_num: "{{ osd_pool_default_pg_num }}"rule_name: ""

openstack_pools:- "{{ openstack_glance_pool }}"

openstack_keys:- { name: client.glance, [...], mode: "0600", acls: [] }

openstack_config: true aktiviert vordefinierte Openstack Keys (cinder, glance,openstack, ...)Ermitteln von osd_pool_default_pg_num per:

# ceph daemon mon.<name> config get osd_pool_default_pg_num

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 17 / 22

Page 18: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: pools 2/2 1

inventory[clients]$hostname

clients.ymluser_config: truecopy_admin_key: truepools:- { name: foobar, pgs: "{{ ceph_conf_overrides.global.osd_pool_default_pg_num }}" }keys:- { name: client.foobar, key: "#KEY", mon_cap: "allow r", osd_cap: "allow *", mode: "0600", acls: [] }

1Nicht für Container Deployments!

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 18 / 22

Page 19: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: (crush-)rules

Nur via create-simple, kein create-replicated !

crush_rule_config: truecrush_rule_ssd:

name: SSDroot: SSDtype: hostdefault: false

crush_rules:- "{{ crush_rule_ssd }}"

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 19 / 22

Page 20: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: (osd-)crush-location 2

Konfiguration über Inventoryflexibel pro Hostper default nur rack:

osd_crush_location: "\"root={{ ceph_crush_root }} rack={{ ceph_crush_rack }} host={{ ansible_hostname }}\""

osds.ymlcrush_location: true

Inventory[osds]osd0 ceph_crush_root=default ceph_crush_rack=rack1

2Nicht für Container Deployments!

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 20 / 22

Page 21: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

ceph-ansible: bads

fetch Verzeichnisceph-keysceph user/group fehltContainerized Deployment

B1 Systems GmbH Deployment & Betrieb von Ceph mit (ceph-)ansible 21 / 22

Page 22: Deployment & Betrieb von Ceph mit (ceph-)ansible · Deployment & Betrieb von Ceph mit (ceph-)ansible FrühjahrsfachgesprächGUUG20181.März2018 Michel Raabe Linux Consultant & Trainer

Vielen Dank für Ihre Aufmerksamkeit!Bei weiteren Fragen wenden Sie sich bitte an [email protected] oder +49 (0)8457 -

931096