- 积分
- 11081
在线时间 小时
最后登录1970-1-1
|

楼主 |
发表于 2022-7-20 13:47:56
|
显示全部楼层
部署Ceph mon服务
5 x1 M1 F6 y( h( ~2 M2 } d9 c安装Ceph-mon服务程序(所有设备执行)
' s4 E) a: e" @
( h1 { t) S) H& G: E p& ]4 vyum install -y ceph-mon
% d4 ^' c, j9 k/ l9 x0 W- F$ p1
( }; _& \+ N0 V$ o初始化Mon服务(Ceph 01执行)$ ]' z3 b/ T' s" e
* Y: V S! |; p6 K2 \; d/ `4 j9 V4 F3 N生成uuid) D7 b& q7 m. b- v; h G
* O4 f% u8 m4 B1 yuuidgen
. F# {* D( l% l& p# _& Z) `> 9bf24809-220b-4910-b384-c1f06ea80728
9 \7 \) C6 q" z+ ^7 u1' v) ^) ?) v6 e1 `8 C. O5 D
2
+ d6 b( S/ d$ H( l* ?& b, g创建Ceph配置文件
. f F5 J5 i8 T; D+ Z; ^
# _5 ~& M( @% L4 t6 H" B- q& l3 Ccat >> /etc/ceph/ceph.conf <<EOF; l% g, r. O' t, w ~& H% ?
[global]
3 _, A6 ~5 h( kfsid = 9bf24809-220b-4910-b384-c1f06ea80728
! r. i) b* k9 P6 T6 n& I- E2 y. Pmon_initial_members = ceph01,ceph02,ceph03
6 d, g p6 A: H8 w- Qmon_host = 10.40.65.156,10.40.65.175,10.40.65.129! }8 m! z6 y1 M0 \/ V- L& c
public_network = 10.40.65.0/24
1 A1 ?# h' N6 B7 M, Nauth_cluster_required = cephx
' I) [' V/ q5 f/ y0 nauth_service_required = cephx
+ k' K1 k: r T- U$ dauth_client_required = cephx* ~1 h: E8 ^1 v& W& g T6 b- c5 p9 r
osd_journal_size = 1024; V; }0 t) }4 U) B: ?2 w7 J; }
osd_pool_default_size = 3% v: G* N/ u( Z+ A$ f# u& x5 [+ y
osd_pool_default_min_size = 21 L2 k0 ]! w r
osd_pool_default_pg_num = 64
* o5 C8 u- u. E0 E8 `1 p: qosd_pool_default_pgp_num = 64
1 M# L- c2 x X5 G' s" Zosd_crush_chooseleaf_type = 1
, m* v7 d% F( U2 e' @. y4 W+ k. t; bEOF$ K: f* Y% w6 Q2 V% g
1" X' n, A8 l% R( W' d
2# _4 a9 J0 K% H9 ~) e9 n' O
3
( h5 J4 C- ]4 J; H4; u! W, Y0 H- b/ Y
5
; Q6 W. l( c( q7 x! z, |6
5 L1 `' R+ \+ q& h, ?% a73 X, ~& [/ l' ^3 Z, }9 H/ S
8
) [/ R" u. X8 ?% }9 r$ R! I1 j91 c' p+ D1 s/ u" z1 C% p
103 {. z. V% [. w; v2 P4 n8 b
11
$ m P8 L/ u6 G: e7 g12
0 j0 Y) q# m& s# B- g: o# G! o, Y13
5 ?$ g/ y- M& Y% g4 {, K# R14
' B; f3 h: ]; `4 ?- j+ [15! Z! C# v: |2 W9 g* |8 Y' w! G
16
! ^) b, U0 O, Q/ A! ]. z* D( j4 z创建集群Monitor密钥。2 N' i, M1 G2 n* r
X2 m( P0 H8 Y/ ] Y. s
ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'2 l$ o4 B' ]" }: p. `
1
8 N! ^: p# u. R3 D$ d/ ^创建client.admin用户、client.bootstrap-osd用户密钥,添加到集群密钥中。
* G& M b y+ U4 y# i! `- l! W) T0 L- ]2 P2 a
ceph-authtool --create-keyring /etc/ceph/ceph.client.admin.keyring --gen-key -n client.admin --cap mon 'allow *' --cap osd 'allow *' --cap mds 'allow *' --cap mgr 'allow *'
( Y# `! Y5 {. \7 Mceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
4 Y1 K: m0 F2 V1
% W$ M7 A! O J" }# z; o2
" A2 j. J# W7 {ceph-authtool --create-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring --gen-key -n client.bootstrap-osd --cap mon 'profile bootstrap-osd' --cap mgr 'allow r'
! M5 l9 M" J$ f6 l# l1 |. Hceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
: Z1 j: p& b# e2 }% x+ z9 ~1
3 B9 N" ?8 {5 x$ i2
3 a0 v$ [& \( i# z使用主机名、主机IP地址、FSID生成monitor map。3 Q- F# ~7 ]/ J+ m/ q
! U' e# S) y9 O- L6 x
monmaptool --create --add ceph01 10.40.65.156 --add ceph02 10.40.65.175 --add ceph03 10.40.65.129 --fsid 9bf24809-220b-4910-b384-c1f06ea80728 /tmp/monmap
+ ~$ l+ Y' t: a @11 R% B2 ~8 M. t/ G
初始化并启动monitor服务1 U. N3 W; a$ n6 R
+ x, z6 A/ s7 K) r5 r
sudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph01
) m ]9 M, \) }* Dchown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap$ X+ |; [; i. A. c% x! @. p( M- V
sudo -u ceph ceph-mon --mkfs -i ceph01 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
, i* a6 r0 Q( {. ]8 Gls /var/lib/ceph/mon/ceph-ceph01/
4 H7 v0 _. D6 s, ]5 k4 C Z1; Q2 C! H3 |; W* g( ]+ B
2
$ @, B& {. D- S: L2 \* y31 R# \6 X, S9 f) P* N
4
0 ^& s: k8 O. U! g$ Esystemctl start ceph-mon@ceph01
" c" V0 a( H$ O1 X4 M% Ssystemctl enable ceph-mon@ceph01
( @8 G) O2 C; i7 D/ D* `systemctl status ceph-mon@ceph01+ Z: C1 i; @" _
1
- m6 j, b B, A- T I+ F+ s2: i* t* x! T8 Z% U( U6 q7 |
3
" R4 D4 b5 q7 J/ e3 F" \. V同步配置文件、密钥、monmap到其他节点中(Ceph 01执行)6 {: _0 r! h2 x' T) _! H
, J$ {, G. i: A9 v
复制ceph.client.admin.keyring、client.bootstrap-osd key、ceph.mon.keyring、monitor map、ceph.conf到另外2个节点
* Y, `% F5 G0 h6 j" `
3 R, m- a4 ]- H! Qscp /etc/ceph/ceph.client.admin.keyring root@ceph02:/etc/ceph/( t7 c+ D. t* p3 K! r* J4 x) `
scp /etc/ceph/ceph.client.admin.keyring root@ceph03:/etc/ceph/
4 G n# k+ c1 v( z6 o# \1* r" m2 t& @. s6 a9 q
2
" b# r: W3 ^+ w# @: { X! _9 Sscp /var/lib/ceph/bootstrap-osd/ceph.keyring root@ceph02:/var/lib/ceph/bootstrap-osd/
1 R* n- i& r+ k, [, H2 bscp /var/lib/ceph/bootstrap-osd/ceph.keyring root@ceph03:/var/lib/ceph/bootstrap-osd/$ ~: u1 r% m3 e1 X9 i
1- ] k9 ?+ j6 L2 y
2
8 ]) s! K. L/ A' o. m( uscp /tmp/ceph.mon.keyring root@ceph02:/tmp/
$ Q+ K7 ~3 `4 x0 Iscp /tmp/ceph.mon.keyring root@ceph03:/tmp/
% x: z0 P% L8 z1
. X1 Q0 r3 B9 U/ S2
7 a/ v8 `, {7 b l1 c @- bscp /tmp/monmap root@ceph02:/tmp/, T O1 B- H- b+ y6 n2 H
scp /tmp/monmap root@ceph03:/tmp/
8 m) U- ?* ^; b4 l1
, A% t6 K/ I7 o# y$ K+ Y( d: }26 J8 Z- h# Z' Q! ~# U
scp /etc/ceph/ceph.conf root@ceph02:/etc/ceph/* p4 a: h: U# v6 T
scp /etc/ceph/ceph.conf root@ceph03:/etc/ceph/
6 g; P& R( w' T/ k) R( Q10 o# ~# {' _8 [+ u; S1 a) h7 C
2
+ v. y% S y7 t& t/ y) u3 ^8 D% v启动其他节点的monitor服务(Ceph 02执行)! t# N& @/ @2 v" I1 I
+ ~: \9 |' U6 k4 o O8 S. {/ Esudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph02
# ^6 X& @5 f+ Fchown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap9 r+ M+ R% Z% l6 X9 n/ c- b. b3 A
sudo -u ceph ceph-mon --mkfs -i ceph02 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring( K8 q8 ]5 D2 s' b9 G2 {# c8 Y
ls /var/lib/ceph/mon/ceph-ceph02/0 r, l1 ]. g" i7 R
1( M6 B6 u7 @+ Q
2% ?) @7 Z. v% C' w3 q
3
( E) ]* j [1 E' b- j: p4
" T$ J8 c- X# w9 B% {0 Usystemctl start ceph-mon@ceph02
# _, Z* [, q' Gsystemctl enable ceph-mon@ceph022 s. Q2 {0 G& G }7 W
systemctl status ceph-mon@ceph023 y J% i1 f6 f. y5 u0 A) I
1
, n- B9 v$ I9 }5 L2 M s# e4 q2 d2
' P" _. l" Q' g- n3
% u- h7 P0 s# w) k启动其他节点的monitor服务(Ceph 03执行)
" d) _9 R; X" g2 i' m! I E
. ? |3 Q" ^8 nsudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph03& A( @1 G0 x( d
chown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap) e2 z" p* p+ D
sudo -u ceph ceph-mon --mkfs -i ceph03 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
h9 D5 T; a4 E4 P& C" `ls /var/lib/ceph/mon/ceph-ceph03/
* O2 ` K3 {) ^' h( p- ] ^3 [1
% T; i" t' y6 `2 Q2; H3 F. P( P) B( `: M/ |4 h
37 s! r* {; Z: H( [5 l/ X! |
4* c0 o; Z+ O/ I2 J1 }% x
systemctl start ceph-mon@ceph03- \7 A+ E2 }2 H+ Q
systemctl enable ceph-mon@ceph03
+ `7 Q0 r5 V" G R% O1 d+ v3 \systemctl status ceph-mon@ceph03
* y1 ^( T. B+ S D0 C! M% h1
% }2 Q7 g; J* Z7 |6 o- ]) o2
}: F5 Y7 i9 {( |' I3
7 Q. C' d! [8 _; \/ f; n查看当前集群状态(任意节点执行)6 e M" p1 u( Y
通过ceph -s命令查询集群状态,可见集群services中3个mon服务已启动。. U/ F/ P3 j7 r I5 b
0 T. Z1 O/ I9 u. B O% f
ceph -s# I5 X a* D/ z0 Y
> cluster:
5 U. U1 g9 Q" a; Z3 N> id: cf3862c5-f8f6-423e-a03e-beb40fecb74a " l! j" b& B# ?, M* t4 l
> health: HEALTH_OK
/ g- u6 \& n* k/ c2 y: q' I' t+ {>
" F# n# a; k1 x# f> services:
8 X8 l' ]" Y- b2 \! g> mon: 3 daemons, quorum ceph03,ceph02,ceph01 (age 12d) 9 v \2 R' q4 f. {; {
> mgr:
/ e) z& A ^$ v> osd: 7 n* N4 S c' l
>
7 b0 s+ F5 C$ ^0 ?> data:
1 `! c8 E( [. e/ a+ g> pools: + h7 T O8 G+ h+ |7 ~
> objects:
% z' |9 x1 t7 z; t6 r> usage:
5 v9 i. W+ s3 h4 Q> pgs: e! r1 v l# l) s7 T
1
+ V9 j) }2 M! k+ x" f24 z) i& f1 E8 Q9 M. M
3
7 r/ j1 L( I7 s. b* r9 R4 R4
( ?& ~# W# ]# o& u" }50 w0 J0 H; i! V4 n
6
+ S4 V( E- `, W5 G' j) C9 q+ r7
2 I5 H* o6 i6 r+ e6 P6 `! w+ L8; w9 v- Q! I2 b" E8 W! x
9
* K% q/ \+ u% `* I5 v6 j m6 J10
) |7 P7 l& @$ ^0 L115 L( Y8 U6 o0 d, j
12
/ ~. c1 K g, `% \8 @13( C9 o( U G2 u8 o: j
14
2 x& k! E0 [, |; v3 H6 m15
+ n: n6 T' ^1 P# u" N7 g% ^/ k3 A/ K部署Ceph mon服务(ceph-volume 自动化创建)
7 M: l' T6 q2 J8 }6 i( s安装Ceph-osd服务程序(所有设备执行)
' H$ p, |1 T. `6 h6 m' l k! Zyum install -y ceph-osd1 P4 b" j- l! J
1
1 \. n+ R4 A; f/ r; r' I" S9 d0 n初始化osd服务(所有设备执行)
$ {1 @/ o `- t- D通过fdisk等工具查看磁盘盘符,然后利用ceph-volume工具自动化创建osd服务。
% {* B0 l. E# M7 F, O6 nceph-volume lvm create --data /dev/sda
6 y* Z0 B3 E1 |% nceph-volume lvm create --data /dev/sdb
, y6 x3 ^& s3 {ceph-volume lvm create --data /dev/sdc8 [1 I6 f! F) s2 r
1/ y9 E. ^( f V3 V9 B
2
4 [& v5 Q' j0 g! O6 s' C, t; T9 v; `37 @! Z4 t& A9 P% r, Z
查看当前集群状态(任意节点执行)
9 O0 {4 W: }' f, Y3 Q* B通过ceph osd tree命令查询集群状态,可见集群services中所有osd服务已启动。
0 i7 |: [; i* J" E* q6 N0 {# U: a3 _* iceph osd tree2 _: x4 X0 n" q! Q$ i
> ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF+ G7 e1 |8 d' E ~! B' S9 o7 q2 t
> -1 16.36908 root default ^5 b: |3 x8 ~4 u2 V% v) v, a1 B
> -3 5.45636 host ceph01
- \ T" \: H: D) s& j> 0 hdd 1.81879 osd.0 up 1.00000 1.00000' A7 _. Z, k' C- n3 U. ^
> 1 hdd 1.81879 osd.1 up 1.00000 1.00000% c! ]) h1 r' }
> 2 hdd 1.81879 osd.2 up 1.00000 1.00000
/ I7 j+ @# v! `7 g' S> -5 5.45636 host ceph02+ h, M9 ^4 t" ?7 Z- o/ d
> 3 hdd 1.81879 osd.3 up 1.00000 1.00000. t; O/ B. M8 d
> 4 hdd 1.81879 osd.4 up 1.00000 1.00000% U o. V3 q# ]* T+ ^/ w
> 5 hdd 1.81879 osd.5 up 1.00000 1.00000
; J6 t. r& y" x+ A! @> -7 5.45636 host ceph03
3 M/ w0 [" T5 U3 C% w5 t> 6 hdd 1.81879 osd.6 up 1.00000 1.00000 S1 k1 ?/ ]3 g. @) x
> 7 hdd 1.81879 osd.7 up 1.00000 1.00000
- ?5 o6 @9 {3 `8 k' c> 8 hdd 1.81879 osd.8 up 1.00000 1.00000# v! L: E \$ n6 E7 W
1
1 V; _- h9 f" S+ [& N2
L8 i1 R3 W3 z0 H W3) v5 y; n2 a8 M. L
4
5 \. n/ P) s- J- X: i' M5
! ~1 d: ~- o$ b' N# l6
1 Z) I$ [% _" a; E7
7 S, q2 L' ~& z. }- m7 V1 P8* }- u. d+ ?" `
9
/ y5 y# n- z$ y5 O104 r% [2 h; k' F
11
^# Z0 k1 ^( `6 k: u# N4 l% h# }123 M3 Q. u! j8 N6 m. n
136 m1 T4 ~+ p& E/ ?+ \
14
- |( Q) v, i4 U" K7 c/ `2 `" q9 y155 H4 h l, F$ Y1 B& R9 d9 l1 D
部署Ceph mgr服务并开启Dashboard2 z5 B: `4 V" W) E3 Q) U
安装Ceph-mgr服务程序(所有设备执行)& C& ?, s4 M& G8 A# V7 t8 }# I
yum install -y ceph-mgr1 V! b- C( w/ W; R* U( o3 K
10 w6 [: d6 f. N2 \( @
初始化并启动主MGR服务(Ceph01执行)
9 v( H& p$ R7 X5 zmkdir -p /var/lib/ceph/mgr/ceph-ceph01- H% D2 r- f& r( L8 o$ i: E
chown ceph.ceph -R /var/lib/ceph
( M$ O% g- p( Bceph-authtool --create-keyring /etc/ceph/ceph.mgr.ceph01.keyring --gen-key -n mgr.ceph01 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'- N9 j1 K- Q. U: e
ceph auth import -i /etc/ceph/ceph.mgr.ceph01.keyring( S! w( O- T! {; c6 Y
ceph auth get-or-create mgr.ceph01 -o /var/lib/ceph/mgr/ceph-ceph01/keyring8 a+ ~6 {0 u/ P
1% J6 w' K1 b' X: u/ T( ], u' y* I
2# M* X: g/ Z& l0 W r2 q& F
3' g/ C# A: V* Z2 W3 U. Q
4" o9 h, m. f5 z* z7 q$ y, K5 D
5& j' j- m( f+ Z- e& j6 |
systemctl start ceph-mgr@ceph011 a( i8 {( Q6 _7 D9 j
systemctl enable ceph-mgr@ceph01
; Z! B' x8 ~4 @) T0 q6 i, usystemctl status ceph-mgr@ceph01
% t6 [1 Z$ H! w0 w7 c1: B2 U0 A @/ A7 K e: B
2, g0 l6 Z) @9 Z3 ^
35 G; f) }) K, W0 d& F
初始化并启动从MGR服务(Ceph02执行)' p4 S# ~" {/ F8 B4 c, q: J
mkdir -p /var/lib/ceph/mgr/ceph-ceph02% [, ?# M% E! ~6 T' ]
chown ceph.ceph -R /var/lib/ceph3 S0 F2 N0 ]* |9 Y m% j
ceph-authtool --create-keyring /etc/ceph/ceph.mgr.ceph02.keyring --gen-key -n mgr.ceph02 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'
* f, w9 e _9 c7 }: h1 w1 ^+ Uceph auth import -i /etc/ceph/ceph.mgr.ceph02.keyring
: `0 Y! }; C* \3 Z4 r% O# Mceph auth get-or-create mgr.ceph02 -o /var/lib/ceph/mgr/ceph-ceph02/keyring: V; T# C- u4 I! B; k4 f
1
E0 E( K! X* d2' c' Y" N: k0 P% X' M, {( a
3/ \' ]- S4 X- Y$ M" X0 b
4+ M! ~: \' @) l& e; b
54 I2 x) N$ `3 { j; D: o
systemctl start ceph-mgr@ceph02
v& N: ~& A5 v- F" y% e$ Fsystemctl enable ceph-mgr@ceph021 \3 I9 W1 q/ v: B" E% u2 k& ?
systemctl status ceph-mgr@ceph02
# G& r' ^8 z+ @& Y% C$ Q2 x% z1
, j( ]% a# O) w( O2
* o* L3 h1 E e1 X9 m3# h6 m4 P" W8 Z# u+ y* {( N6 x
初始化并启动从MGR服务(Ceph03执行)
1 i7 W2 L1 p1 ]) `! C: a+ umkdir -p /var/lib/ceph/mgr/ceph-ceph03
: K8 E4 N0 k/ T8 L6 Jchown ceph.ceph -R /var/lib/ceph
5 p) o/ }# n( N2 T" }ceph-authtool --create-keyring /etc/ceph/ceph.mgr.ceph03.keyring --gen-key -n mgr.ceph03 --cap mon 'allow profile mgr' --cap osd 'allow *' --cap mds 'allow *'
: I" d2 s- h* ?$ `ceph auth import -i /etc/ceph/ceph.mgr.ceph03.keyring4 y- D* e( G# ~# [. C7 c0 r" I
ceph auth get-or-create mgr.ceph03 -o /var/lib/ceph/mgr/ceph-ceph03/keyring
- F- O) e2 h( {8 R' ]7 U' H! v1
$ @! c& ^- ^" J* F* P2/ s: Q: `" ?1 P
3( }. Z! u8 |) f( d9 N/ d
49 B/ I2 b! g: C$ r1 Q' E
5
1 g9 ~8 E. L/ @0 M4 L9 A+ I8 X! Bsystemctl start ceph-mgr@ceph035 ]3 {& Y; N) X S( f
systemctl enable ceph-mgr@ceph03/ a$ n, X3 z9 y2 R0 f6 P' T4 N
systemctl status ceph-mgr@ceph03
$ u) ~0 `7 `& d, E& X9 W6 h" s16 g: {& z) E+ {) y4 t. \7 i
2
0 ]3 Y8 U9 `/ c& ?3, T/ Z2 M2 E# l& ]6 A/ v' D
查看当前集群状态(任意节点执行)
3 E. ?# k0 Y6 }/ m通过ceph -s命令查询集群状态,可见集群services中3个mgr服务已启动。
: S( w+ p$ I( x# Lceph -s4 R2 ~9 v# }- l% H; ?' F
> cluster:
8 k% G. x' g+ b4 x& w5 z> id: cf3862c5-f8f6-423e-a03e-beb40fecb74a
% D" s+ x; t4 e7 S> health: HEALTH_OK0 } y% O' {7 v4 G1 F
>
+ Z5 ^5 k/ {% u! b3 Z> services: / p: i7 Q6 m/ B. W! a% G
> mon: 3 daemons, quorum ceph03,ceph02,ceph01 (age 12d) 8 t" E _! Z9 R( t: h b1 w
> mgr: ceph01(active, since 3w), standbys: ceph01、ceph02 9 R+ M/ @: z5 m/ ]+ Y
> osd: ' o! A/ B9 t3 B0 [, X7 ?" L+ C
>
" d, F2 O" j c: D1 m) v> data:, I' D8 H) i3 F$ `) |
> pools: 5 p, B3 H$ n, b4 L- w" u- f. |
> objects: , F6 n4 K2 \9 K0 `1 @
> usage:
- l0 O+ X3 I$ n4 [1 C5 M2 H> pgs:
7 p' B( j' A9 }% w& k1 f" a- J1 C/ a/ o
2
. l. W7 V }$ p% K- u, p, A3
) W2 d1 J- |- g' p) k4
( M' q) V! p" [5
4 [2 L5 Z! \- B. E; E* }4 p64 A8 n c! K( H7 k
7
2 R$ u+ P1 U6 M! d$ i) N8 w& G8
: K1 _# s C$ ~1 N% y3 J# _% z93 k! N) Z! U5 j
10
" P" J& f6 n, a$ |0 a11& ]3 d4 d7 o1 b1 `# D I
123 [# S9 ^: c9 M F+ f2 S
134 B- b9 v. c" o& I8 D# d/ ?, H
148 V0 x4 K# ^8 W0 N; M
15
6 c- k; x4 L4 }! ?. X使能Dashboard访问功能(任意节点执行)6 T4 {! O: @1 G- P
开启mgr dashboard功能$ ^4 s8 O8 b8 u& \
ceph mgr module enable dashboard# r$ x5 ?: O* z2 O& A- f! B8 p
1
$ Y: b) J: p! w( D+ e* B S生成并安装自签名的证书. ]7 K- C, H9 e0 w4 }" B
ceph dashboard create-self-signed-cert" W2 n1 v! t' g& H$ ^
1# J+ b( M: L: E9 e+ d
配置dashboard/ O+ d. h* v$ r9 _; p$ S
ceph config set mgr mgr/dashboard/server_addr 10.40.65.148
* H5 D( e& [0 h1 _# Eceph config set mgr mgr/dashboard/server_port 8080' O6 S/ l, N; [8 d' P
ceph config set mgr mgr/dashboard/ssl_server_port 8443
$ [* l" J0 ~' A1
4 y/ z4 J0 n/ Z4 P% W; [4 B; N2
& d8 h; ^* l! K7 p4 H3
) b8 G# {0 o' v6 c9 m创建一个dashboard登录用户名密码
1 B/ j- T" H. E" M5 Vecho '123456' > password.txt
0 @7 j; e! j2 O% Dceph dashboard ac-user-create admin administrator -i password.txt' \1 I# W! q; N) ]
1
T) x: e' A8 N) b) a6 s' {2% F7 p7 b6 P v' f7 Y
查看服务访问方式
' P6 s+ s/ w* R' E; a# {0 q. ^ceph mgr services5 g* P! {. ~- D6 g
1
8 w( Y: {. X$ a4 W* }% S通过web访问Ceph Dashboard,用户名密码为admin/123456' L7 _/ Z/ v" T# ?8 O
https://10.40.65.148:8443 |
|