Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Using Ceph-Deploy
Search
Tomokazu HIRAI
June 05, 2014
Technology
1
4.4k
Using Ceph-Deploy
JTF 2014 での発表資料
Tomokazu HIRAI
June 05, 2014
Tweet
Share
More Decks by Tomokazu HIRAI
See All by Tomokazu HIRAI
rcbops/chef-cookbooks
jedipunkz
1
3k
Elasticsearch, Fluentd, Kibana 概要とデプロイ方法
jedipunkz
0
240
15分で解る Chef
jedipunkz
0
200
openstack-chef-repo
jedipunkz
1
97
Other Decks in Technology
See All in Technology
"君は見ているが観察していない"で考えるインシデントマネジメント
grimoh
4
1.1k
State of Open Source Web Mapping Libraries
dayjournal
0
220
マルチプロダクトな開発組織で 「開発生産性」に向き合うために試みたこと / Improving Multi-Product Dev Productivity
sugamasao
1
260
エンジニアが一生困らない ドキュメント作成の基本
naohiro_nakata
2
150
【若手エンジニア応援LT会】ソフトウェアを学んできた私がインフラエンジニアを目指した理由
kazushi_ohata
0
110
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
2
940
AIチャットボット開発への生成AI活用
ryomrt
0
150
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
120
エンジニア候補者向け資料2024.11.07.pdf
macloud
0
4.6k
Team Dynamicsを目指すウイングアーク1stのQAチーム
sadonosake
1
280
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.1k
これまでの計測・開発・デプロイ方法全部見せます! / Findy ISUCON 2024-11-14
tohutohu
3
310
Featured
See All Featured
How GitHub (no longer) Works
holman
310
140k
What's in a price? How to price your products and services
michaelherold
243
12k
Facilitating Awesome Meetings
lara
50
6.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Cost Of JavaScript in 2023
addyosmani
45
6.7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
364
24k
How STYLIGHT went responsive
nonsquared
95
5.2k
StorybookのUI Testing Handbookを読んだ
zakiyama
26
5.2k
Adopting Sorbet at Scale
ufuk
73
9.1k
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
Transcript
Using Ceph-Deploy Tomokazu HIRAI @jedipunkz
Index * ࣗݾհ * Ceph-Deploy ͱ ? * ߏ *
Ceph-Deploy Λ༻͍Δ४උ * खॱ : conf ϑΝΠϧͷੜ * खॱ : Ceph ͷΠϯετʔϧ * खॱ : MON ͷՔಇ * खॱ : 伴ͷڞ༗ * खॱ : OSD ͷՔಇ * खॱ : MDS ͷՔಇ * खॱ : ֤छϚϯτํ๏
ࣗݾհ ! * ໊લ: Tomokazu HIRAI * ࣄ: ϗεςΟϯάձࣾۈ *
ຊ OpenStack Ϣʔβձ * #Ceph, #Chef, #Fog, #Swift, #Sensu, #Ruby, #docker, #Mesos, … * http://jedipunkz.github.io/ * https://twitter.com/jedipunkz
ࠓճͷखॱͲ͓Γʹૢ࡞ ͢ΕɺͱΓ͋͑ͣಈ͖·͢.
Ceph-Deploy ͱʁ * Ceph ͷެࣜσϓϩΠπʔϧ * Python * ެ։ॴ
: https://github.com/ceph/ceph-deploy * ϚχϡΞϧͰΠϯετʔϧ͢Δͱ ‘Ceph-Deploy ͑’ ͱ ౖΒΕΔ !
ߏ EFWTEC EFWTED EFWTTE DFQIOPEF NPO PTE PTE EFWTEC EFWTED
EFWTTE DFQIOPEF NPO PTE PTE EFWTEC PTE EFWTED EFWTTE DFQIOPEF NPO PTE DFQI NET $MVTUFS/FUXPSL 1VCMJD/FUXPSL DFQI NET
Ceph-Deploy Λ༻͍Δ४උ #1 Ceph-Deploy Public Network ্ͷͲ͔͜ͷϊʔυͰ࣮ߦ ͜ͷखॱͰ ceph05
Ͱ࣮ߦ͢Δ͜ͱΛલఏʹ ! % sudo apt-get update ; sudo apt-get -y install python-virtualenv % git clone https://github.com/ceph/ceph-deploy.git ~/ceph-deploy % cd ~/ceph-deploy % ./bootstrap ! % sudo ${EDITOR} /etc/hosts 10.200.10.1 ceph01 10.200.10.2 ceph02 10.200.10.3 ceph03 10.200.10.4 ceph04 10.200.10.5 ceph05
Ceph-Deploy Λ༻͍Δ४උ #2 % ssh-keygen % ssh-copy-id ceph@ceph01 % ssh-copy-id
ceph@ceph02 % ssh-copy-id ceph@ceph03 % ssh-copy-id ceph@ceph04 ! targets# ${EDITOR} /etc/sudoers.d/ceph cephALL=(ALL) NOPASSWD:ALL
Conf ϑΝΠϧͷੜ #1 % ceph-deploy --cluster cluster01 new \ ceph01
ceph02 ceph03 ceph04 ceph05 ! * ΧϨϯτσΟϨΫτϦʹ cluster01.conf ͕ੜ͞ΕΔ * ߲࣍ͷίϯϑΟΪϡϨʔγϣϯΛه͢Δ
Conf ϑΝΠϧͷੜ #2 public network = <network_addr> cluster network =
<network_addr> ! [mon.a] host = ceph01 mon addr = <ceph01_ip_addr>:6789 ! [mon.b] host = ceph02 mon addr = <ceph02_ip_addr>:6789 ! [mon.c] host = ceph03 mon addr = <ceph03_ip_addr>:6789 ! <ӈଓ͘> [osd.0] public addr = <ceph01_public_ip_addr> cluster addr = <ceph01_cluster_ip_addr> ! [osd.1] public addr = <ceph01_public_ip_addr> cluster addr = <ceph01_cluster_ip_addr> ! [osd.2] public addr = <ceph01_public_ip_addr> cluster addr = <ceph01_cluster_ip_addr> ! [mds.a] host = ceph04 ! [mds.b] host = ceph05
Ceph ͷΠϯετʔϧ % ceph-deploy --cluster cluster01 install \ ceph01 ceph02
ceph03 ceph04 ceph05 ! Πϯετʔϧ͢ΔόʔδϣϯͷࢦఆԼهͷ௨Γߦ͏ ! --release <code-name> --testing --dev <branch-or-tag>
MON ͷՔಇ % ceph-deploy --cluster cluster01 mon create \ ceph01
ceph02 ceph03
伴ͷڞ༗ MON ϗετ͔Β伴Λऔಘ͠ OSD, MDS ϒʔτετϥοϓʹඋ͑Δ ! % ceph-deploy --cluster
cluster01 gatherkeys \ ceph01 ceph02 ceph03
OSD ͷՔಇ Disk Ұཡͷ֬ೝ % ceph-deploy --cluster cluster01 disk list
ceph01 % ceph-deploy --cluster cluster01 disk list ceph02 % ceph-deploy --cluster cluster01 disk list ceph03 ! Disk ΛॳظԽ % ceph-deploy --cluster cluster01 disk zap ceph01:/dev/sdb ceph01:/dev/sdc % ceph-deploy --cluster cluster01 disk zap ceph02:/dev/sdb ceph02:/dev/sdc % ceph-deploy --cluster cluster01 disk zap ceph03:/dev/sdb ceph03:/dev/sdc ! ϝλσʔλΛ֨ೲ͢Δ Disk ͷύʔςΟγϣχϯά (sdb, sdc ༻ 2 ͭ) targets% sudo gdisk /dev/ssd #<= ֤ϊʔυͰ࣮ࢪ /dev/ssd1, ssd2 Λੜ ! OSD ͷՔಇ % ceph-deploy --cluster cluster01 osd create ceph01:sdb:/dev/ssd1 \ ceph02:sdb:/dev/ssd1 ceph03:sdb:/dev/ssd1 % ceph-deploy --cluster cluster01 osd create ceph01:sdc:/dev/ssd2 \ ceph02:sdc:/dev/ssd2 ceph03:sdc:/dev/ssd2
MDS ͷՔಇ % ceph-deploy --cluster cluster01 mds create \ ceph04
ceph05
֤छϚϯτํ๏
֤छϚϯτํ๏ Block Device Mount % sudo rbd -c /etc/ceph/cluster01.conf create
foo --keyring \ /etc/ceph/cluster01.client.admin.keyring --size 4096 ! % sudo modprobe rbd ! % sudo rbd map foo --pool rbd --name client.admin --keyring \ /etc/ceph/cluster01.client.admin.keyring -c \ /etc/ceph/cluster01.conf ! % sudo mkfs.ext4 -m0 /dev/rbd/rbd/foo % sudo mkdir /mnt/myrbd % sudo mount /dev/rbd/rbd/foo /mnt/myrbd
֤छϚϯτํ๏ Kernel Driver Mount % sudo mkdir /mnt/mykernelfs % sudo
mount -t ceph 10.200.10.1:6789:/ \ /mnt/mykernelfs -o \ name=admin,secret=`sudo ceph-authtool \ -p /etc/ceph/cluster01.client.admin.keyring `
֤छϚϯτํ๏ Fuse Driver Mount % sudo apt-get install ceph-fuse %
sudo ceph-fuse -m 10.200.9.116:6789 \ /mnt/myfusefs \ -c /etc/ceph/cluster01.conf —keyring /etc/ceph/cluster01.client.admin.keyring
·ͱΊ
·ͱΊ * ϚχϡΞϧૢ࡞ېࢭ -> Ceph-Deploy Λ༻͍Δͷ͕ެࣜखॱ * ΄΅શͯͷૢ࡞Λ Ceph-Deploy Λ༻͍ͯ֎෦͔Βߦ͏
* OSD Disk 1ຊʹରͯ͠ 1 ϓϩηεͷؔ * OSD, MON, MDS ͦΕͧΕϨϓϦέʔγϣϯ͕औΕΔ Ceph SPOF ͕ແ͍ Distributed Storage System Ͱ͋Δ