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

楼主 |
发表于 2022-7-20 13:47:56
|
显示全部楼层
部署Ceph mon服务# m$ `( T P5 N- [
安装Ceph-mon服务程序(所有设备执行)
' S/ S2 k- h( D7 j. l+ {& _+ u _ {7 s- X) e
yum install -y ceph-mon
( y: C# V `: x0 H- _14 U* _0 H. K% v s8 c( y6 h
初始化Mon服务(Ceph 01执行)6 P( W* t. i8 {3 R
1 J/ i" ~) F. _% r: i5 m$ h
生成uuid0 F/ f% n! Y% W, V7 p+ q8 X; h
3 z# P" Z5 c9 @4 b- B' b( l$ muuidgen
/ v7 _% W, H. k6 s, Q> 9bf24809-220b-4910-b384-c1f06ea80728
2 @0 y. ?' W4 n. a( F1
. Z3 Q z2 X4 X4 o) Z8 \* ~2
+ u4 I5 m e9 ]4 X; B创建Ceph配置文件
+ K: z3 Z5 u) ]$ V* w0 A% b' D9 L; q, b, q
cat >> /etc/ceph/ceph.conf <<EOF
9 o' w+ `8 o9 W* C, c* f1 O[global]+ j( w- k/ m# H+ W7 B; i5 ]
fsid = 9bf24809-220b-4910-b384-c1f06ea80728
! b5 B) ~3 H0 `/ @, Z$ l: h1 Bmon_initial_members = ceph01,ceph02,ceph03$ H% v( [3 e9 U# Y0 W2 ]
mon_host = 10.40.65.156,10.40.65.175,10.40.65.1298 A* z6 u1 p6 ^7 y
public_network = 10.40.65.0/24
" C' [0 \" a( Pauth_cluster_required = cephx
' H/ X( r* r! E4 Rauth_service_required = cephx' i6 n: D, X; F8 A) t1 V1 x& A) R* k& J
auth_client_required = cephx" z+ f+ b4 W% v1 _6 I" A
osd_journal_size = 1024
- Q; H d: F( b" h/ Qosd_pool_default_size = 3
/ {5 z: e$ Q$ v5 ?: c$ Oosd_pool_default_min_size = 2! }& }9 V6 N% B
osd_pool_default_pg_num = 64
d l5 Y$ C+ h! Josd_pool_default_pgp_num = 64
6 Q- y" ~" w& W0 d4 t& x. Sosd_crush_chooseleaf_type = 1
+ h+ y5 A8 o! S, e8 H/ REOF
; x/ e- [ ~& H, S4 J$ ?( \1
" ^) ?- g& U# n1 h4 Y2" i: d9 x# }, L/ g( X
34 b8 F/ v- I; k6 [" V7 y3 k
4
' J9 e& p. U8 {, u2 p+ y& J5
0 V/ |1 v5 P: K: m1 X5 o/ _! ~6
2 l4 J" ^" Q I7 c1 ~' k4 ^+ i75 u3 g r+ v1 I0 o+ v- a
85 s7 X, C6 f( N$ U& r
9
5 r2 v# l) `+ i9 j10) f* J p, ^" _# I0 M
11
% P2 z4 l- B3 r) s* k123 Z% D( m; c8 W& N
13
, T3 M/ g! u5 i5 b6 _3 l* D1 H0 F149 ~& d) N! Z& N2 S# }- N
15
9 S# } U3 Q8 Y. y9 t16
3 y8 _3 ^' P) S$ n创建集群Monitor密钥。- C: j- ~1 Q- w# k( l! T
9 i4 Z+ j4 L8 a* x( ?ceph-authtool --create-keyring /tmp/ceph.mon.keyring --gen-key -n mon. --cap mon 'allow *'
# @) [. o3 `3 N/ [$ E6 p; u1
7 }2 J+ P! i9 T& |8 C! W% S! L创建client.admin用户、client.bootstrap-osd用户密钥,添加到集群密钥中。
; z+ z* ?3 @+ a$ b* `
. f* D0 U7 x% o6 T3 d( [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 *'0 S, F) s. ~6 l. l* o
ceph-authtool /tmp/ceph.mon.keyring --import-keyring /etc/ceph/ceph.client.admin.keyring
% z. _: M O- l& ?, W1! i0 D; Z# i7 U% D0 o& X
2
3 V- r6 U$ v- J2 x/ d6 W7 v( ^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'" Y" L3 H: M$ _) w
ceph-authtool /tmp/ceph.mon.keyring --import-keyring /var/lib/ceph/bootstrap-osd/ceph.keyring. @$ L5 C' M& d' n! l8 [$ q
1
9 g* F6 v% L o& p7 Y8 T. e2
' \( z$ M1 i' O! `% F使用主机名、主机IP地址、FSID生成monitor map。# i, {" R& ^* _# l
; a! H* ?" R, R7 E
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/monmap0 m) Z# D9 o& I* Y! S# E0 e
1
8 l: b0 a B, h" T/ |初始化并启动monitor服务
0 b; b' h7 O0 T! P8 g* ~& @. ?9 d+ E0 r* E6 }6 p4 e8 |7 X ?
sudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph01# y$ }3 m& J4 K1 @5 r5 K
chown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap
' ]* U1 ~! i, w, g7 q7 Usudo -u ceph ceph-mon --mkfs -i ceph01 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring5 S+ e( r7 E8 Y' A
ls /var/lib/ceph/mon/ceph-ceph01/
0 k; H% ?+ y2 G4 ~, a1: q. z6 f7 v8 d, {5 H! s7 J
2& ]# e5 V4 w1 m+ w$ v" u& x
3! m( N \ c- X* g( {" X
4
1 r1 }2 I: M3 @8 A! p: ^3 dsystemctl start ceph-mon@ceph01
3 N; B1 y& T4 B/ W1 r! Xsystemctl enable ceph-mon@ceph01- i/ f& h1 p* H; |7 Q+ b
systemctl status ceph-mon@ceph01
{6 s! P" |# Y, @1( S5 H* D/ Z4 y6 o+ M' V+ |0 ]
2, Q. s( P- t. E6 k2 B
3* z% t/ M* ?4 n; v. G1 {2 U
同步配置文件、密钥、monmap到其他节点中(Ceph 01执行)
, H' L7 l Z2 s0 C
3 K7 a {1 p) _ L* |复制ceph.client.admin.keyring、client.bootstrap-osd key、ceph.mon.keyring、monitor map、ceph.conf到另外2个节点4 F+ h) d( W' [7 C6 a
3 O8 h2 `9 {) [& C C& \5 P
scp /etc/ceph/ceph.client.admin.keyring root@ceph02:/etc/ceph/* Y, ^# m6 l' W* O+ [7 g7 t6 Z
scp /etc/ceph/ceph.client.admin.keyring root@ceph03:/etc/ceph/! Q/ \; M5 K) \3 O# u
1
% h8 i$ A! t) ~8 o/ b9 l J1 b2
: T/ P4 g" q& [7 ~& ~% Ascp /var/lib/ceph/bootstrap-osd/ceph.keyring root@ceph02:/var/lib/ceph/bootstrap-osd/7 f, F9 ]" T& C0 \, G6 q- h4 }
scp /var/lib/ceph/bootstrap-osd/ceph.keyring root@ceph03:/var/lib/ceph/bootstrap-osd/
# H8 R( S) C4 \11 a0 W& N0 }9 ]( E8 n$ a: g
2/ c. U, ~2 n0 i$ U
scp /tmp/ceph.mon.keyring root@ceph02:/tmp/' o7 w9 i/ [; \. ~8 s9 t
scp /tmp/ceph.mon.keyring root@ceph03:/tmp/
' p* l5 F/ ^; W6 g: i+ _' E. s10 h/ Q: {9 ~: v" r
2% T6 G& c7 @$ r4 D/ x% i/ f
scp /tmp/monmap root@ceph02:/tmp/( J% V, q% q: W
scp /tmp/monmap root@ceph03:/tmp/
2 v6 v6 }) m: U2 ~4 X8 B, Z1$ ?% g0 J. w# g0 ?/ U! l
2
2 b- }. p- l$ Z3 f/ |scp /etc/ceph/ceph.conf root@ceph02:/etc/ceph// O1 q& Y# z" n# I$ O
scp /etc/ceph/ceph.conf root@ceph03:/etc/ceph/ I( h: N+ i) Q* m/ R
1' B: x- C; T% H! i% y5 J
29 s( |' h5 s' U% b- P
启动其他节点的monitor服务(Ceph 02执行)
2 [, w1 T2 B% }, V0 d2 A) u# B; B) D% ~% a
sudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph02
6 }, {% a+ L, Gchown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap6 y6 G5 q6 M. E) R2 {" G$ L% h" n
sudo -u ceph ceph-mon --mkfs -i ceph02 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
. l% ]% u) M$ [1 A' X. j1 R" dls /var/lib/ceph/mon/ceph-ceph02/
. Q5 [) v- Q: x, o- d3 c$ G3 O1& w z1 k( F! K* }; P4 x9 h
2
5 ~! ^* w+ S3 P8 T1 E( k3/ J4 \4 z% b- Q8 `! T
4) T5 u9 T( o% ^2 C
systemctl start ceph-mon@ceph02& g, w3 w- O9 R1 l
systemctl enable ceph-mon@ceph024 D: a2 b6 i0 p. {
systemctl status ceph-mon@ceph02* u" v( x/ O4 T6 d: Q8 u( t
17 U0 o, v, q1 |
2
: r3 j2 I! P6 K$ k+ Y3
; [ U, X( W- ?- z; [启动其他节点的monitor服务(Ceph 03执行)
2 O9 W$ O0 Y7 Q+ m% m6 [
2 x% k# N3 S) F" Qsudo -u ceph mkdir /var/lib/ceph/mon/ceph-ceph03
- H+ H( `- Z9 g7 `5 C! q6 v; Nchown ceph.ceph -R /var/lib/ceph /etc/ceph /tmp/ceph.mon.keyring /tmp/monmap* d) L& p* |. p. E3 R7 K" Z
sudo -u ceph ceph-mon --mkfs -i ceph03 --monmap /tmp/monmap --keyring /tmp/ceph.mon.keyring
6 p/ G' e- \5 ~+ c! {9 ^: B) F+ K( Zls /var/lib/ceph/mon/ceph-ceph03/
( C( M3 M1 e7 P" y1: @$ B; b. r; `' z& k0 p
2; P8 L5 X' Q, J; K# U; s, [
3
# x# W1 }) q& z" q; f# @4+ u. B8 B( R# G0 ]( I
systemctl start ceph-mon@ceph03
$ T* P) E& d5 i! Fsystemctl enable ceph-mon@ceph03! S% g; d: y) U: L) r& X) z
systemctl status ceph-mon@ceph03# ]0 p; l* Q' |
1
- k% E1 Z2 t6 x$ D# \" `$ v* |2
: d- t' Y- f7 X, x1 j39 ~& V6 y$ h( _) H+ w" A; O! h
查看当前集群状态(任意节点执行)2 j# S" ^4 k+ S* j* }, S4 j
通过ceph -s命令查询集群状态,可见集群services中3个mon服务已启动。* W3 x; i: W5 B
2 k* O0 _1 h f* h5 Y$ {" g
ceph -s3 _8 Z3 Q! u7 ^; e( `/ \3 \: q
> cluster: 7 |/ r0 H( P5 `5 h# D3 t, H( \' ]
> id: cf3862c5-f8f6-423e-a03e-beb40fecb74a
, ]) y' p3 v+ ^3 D7 G) j* r> health: HEALTH_OK" B" P$ O# X u
> 1 E/ e% E; N# ]
> services:
$ E" d4 X! R+ p> mon: 3 daemons, quorum ceph03,ceph02,ceph01 (age 12d)
' M. E7 c' I! [> mgr:
" G1 X6 _+ @) p> osd:
9 P0 _1 A- b+ c: [4 g& f> / S1 `6 Z7 I" u/ v! m3 C
> data:
/ h) Z# D. ^4 ^7 p4 D> pools: " j; r6 ^+ P- i9 s5 I. x# W
> objects: * b! K; y8 u. W- k6 E. @* M
> usage: 3 {1 @' |; H6 d9 }" l/ |
> pgs:
3 [* m% o6 U1 D2 u: k! a6 _1' r5 Q3 ?6 b+ \
2* o t5 A0 Q7 [6 F' P f1 \% F, c
3% n( h0 g3 a& B0 M
4
/ _' S' l2 m6 I1 c4 W- S$ R* ^3 K: X5
6 _* X2 ]) S6 D61 n. Z. x' K7 ~7 L
7
6 Y$ f' X5 n. \8
) A6 j, r/ B \9* r: c4 c2 s4 H: a/ o0 ]4 L }
100 o4 v4 U. {8 r( k+ ]
119 B6 C9 e+ q& U3 f6 H1 ?
12
) f( r( `& b& i9 W13" Z6 \$ h6 ~# q: V
14
+ a5 e/ n( O6 C- m$ p15
7 `! B6 x: A8 l) L2 L7 w. b部署Ceph mon服务(ceph-volume 自动化创建)( ]! ?9 x) k2 j0 g" `7 b f8 \) t
安装Ceph-osd服务程序(所有设备执行)
8 C+ ~1 ^2 o9 V" x% Zyum install -y ceph-osd
* _$ |* M5 m5 a& h- u, v: X8 V: k; u1 F) q; c E; z% H+ i& `- Z
初始化osd服务(所有设备执行)
% e$ X8 m+ @7 K; x8 P5 b' l5 {通过fdisk等工具查看磁盘盘符,然后利用ceph-volume工具自动化创建osd服务。
3 u1 ^4 ^( T1 P, {ceph-volume lvm create --data /dev/sda
s8 N c9 H4 P2 V2 m# Hceph-volume lvm create --data /dev/sdb7 Q7 G7 w$ K3 B$ B) @' i
ceph-volume lvm create --data /dev/sdc
# ^6 e/ ]7 R4 X& `, N1+ z- M" l9 o1 w' ]1 }
2& E) _1 k" {. Y9 @8 X7 o7 T) N1 G
3# z$ N1 o9 Y1 D: t4 q# K" N5 f; j
查看当前集群状态(任意节点执行)4 S1 O9 B% A5 C7 \
通过ceph osd tree命令查询集群状态,可见集群services中所有osd服务已启动。. y; Z) A- N0 F) t
ceph osd tree( w5 j2 q( y8 w9 b
> ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF
9 ?" W) l! r/ i0 C7 Q5 F4 p$ H> -1 16.36908 root default
1 E0 }" }0 u$ b& ?6 s5 z, Q0 h: N> -3 5.45636 host ceph01+ Y1 e- ], c3 [4 j
> 0 hdd 1.81879 osd.0 up 1.00000 1.000004 @ Q$ e. `' H- y
> 1 hdd 1.81879 osd.1 up 1.00000 1.000001 g- M- F, d3 H1 N
> 2 hdd 1.81879 osd.2 up 1.00000 1.000000 O4 N* H; Y* P" b8 q% H' R9 q
> -5 5.45636 host ceph02; A$ ?8 A4 l5 O. G; x d* M9 }" A
> 3 hdd 1.81879 osd.3 up 1.00000 1.00000* Y1 r. s. L7 C+ b2 e9 G) B
> 4 hdd 1.81879 osd.4 up 1.00000 1.00000
1 q* G/ G$ N% o9 L6 y> 5 hdd 1.81879 osd.5 up 1.00000 1.00000/ P$ d- r- x8 ^9 f! p1 W5 c
> -7 5.45636 host ceph03% Q% `. v' Z- z3 e" {! P
> 6 hdd 1.81879 osd.6 up 1.00000 1.00000
g; y8 _3 @ t2 M$ K' Z5 u' N> 7 hdd 1.81879 osd.7 up 1.00000 1.000000 Z; S; R/ J3 M7 o! v% m; R
> 8 hdd 1.81879 osd.8 up 1.00000 1.000006 J- K/ _4 t9 e; a9 n4 e P& U7 _
1
$ x: {2 P5 s& W4 }! V2. p f7 s$ B2 r- F8 _
3, r, q4 f4 L4 G
4
* e/ \0 d2 ? D% m5" \9 }- a- M' s( J+ w' ^: a
67 T2 ~- g5 h! O2 c: Y5 s U5 d
7
$ z9 h/ g* y( s& Q8; G: R& U$ W7 n# W
93 c% H! s$ S% ?- _# M
10
( h3 z a. Z* M \7 H110 |2 `" }; {1 w0 `
12
& W, R8 o2 Y2 L+ k13
0 n4 `. n9 x6 H) P! _! R141 J, j1 v8 p* a& n# R
15
0 W2 @, U4 g/ S' M部署Ceph mgr服务并开启Dashboard
0 H2 E: A$ w Z2 n: d3 c安装Ceph-mgr服务程序(所有设备执行)2 [2 x# Z, t; i4 |
yum install -y ceph-mgr
+ c x2 j4 H( W% P1& d9 e2 h/ R$ }9 s' m5 ~
初始化并启动主MGR服务(Ceph01执行)
8 K0 Z u! I7 ]4 Q9 hmkdir -p /var/lib/ceph/mgr/ceph-ceph01
1 D& V* c" ^) K" J1 Pchown ceph.ceph -R /var/lib/ceph G; h1 D: K" j; \' V' g
ceph-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 *'
+ C. U! P7 T- f4 L hceph auth import -i /etc/ceph/ceph.mgr.ceph01.keyring
' e/ _! ?0 i" S" E8 v3 J/ k& {ceph auth get-or-create mgr.ceph01 -o /var/lib/ceph/mgr/ceph-ceph01/keyring
) _3 c" V* w4 I# Q* P* b1$ V+ l( [1 {% A( h$ D1 e
2
! G1 [8 V7 e* t1 z3
# [* u% a7 m/ {3 S5 Q3 z# U+ L4
5 n/ x' B+ J" }0 z& ?- }% w- x; r, ^55 }/ g2 q# \9 w! \6 A1 U7 C
systemctl start ceph-mgr@ceph01+ ]; Y1 ^7 Z1 k
systemctl enable ceph-mgr@ceph01& l: M& b( Q: f. z
systemctl status ceph-mgr@ceph01
" t& C8 @+ I1 k1
4 `7 j# h* \) }# u# h% ^2
5 _/ `* Z7 d/ N3) h3 c. T% Y0 m
初始化并启动从MGR服务(Ceph02执行)9 C6 k8 r5 N9 z
mkdir -p /var/lib/ceph/mgr/ceph-ceph02
& w. T b: ^; Tchown ceph.ceph -R /var/lib/ceph
" E0 }, S1 v3 }' C& |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 *'
- K8 l6 _+ A* N4 G e( R$ i. z6 Tceph auth import -i /etc/ceph/ceph.mgr.ceph02.keyring3 Z8 M6 c' p. A* ^# f
ceph auth get-or-create mgr.ceph02 -o /var/lib/ceph/mgr/ceph-ceph02/keyring
% q$ y$ |: |0 M1
. h9 |, T+ _9 U, _+ G2) c0 B* v' q% J( e7 K; `# I- O
3
9 {1 V: ]. ?3 T6 Q f4
" b& i H/ {% I- A( k: D5
. a& M e& n5 _0 C! esystemctl start ceph-mgr@ceph02
; B+ L- p: ?! Usystemctl enable ceph-mgr@ceph021 F9 `, a3 ^9 s, O8 i7 _
systemctl status ceph-mgr@ceph02+ g) r3 r$ Z( }. n
1
; X! U, i. N- R% [, C+ [2) z9 z) U& u9 s6 u, U
3
7 X/ X% o, Z) l5 r0 C% l初始化并启动从MGR服务(Ceph03执行)
7 i. G" [8 _4 U/ S5 Q! xmkdir -p /var/lib/ceph/mgr/ceph-ceph03
. o( ~( F8 u0 m( J0 Vchown ceph.ceph -R /var/lib/ceph
. T3 O. ?7 e6 G. `) r: oceph-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 *'
0 [# G0 p# S0 l; ^2 lceph auth import -i /etc/ceph/ceph.mgr.ceph03.keyring6 W$ N$ b3 U4 H) g, ` d
ceph auth get-or-create mgr.ceph03 -o /var/lib/ceph/mgr/ceph-ceph03/keyring: W: I5 A* Q. X# M
15 C9 z l& ^6 x, H
2! Z) \& G4 s: E/ V6 C7 h
3
' l3 k* }0 S) M4 M8 D. B4
, Q: T! v! U2 i$ y( b, T W6 N57 y, o7 q& { m+ r; n# H* v
systemctl start ceph-mgr@ceph03+ e& P$ n0 O- d! L5 |# W2 m
systemctl enable ceph-mgr@ceph03
+ `1 d L5 E: c' R2 Q Csystemctl status ceph-mgr@ceph03* [! i/ ~8 k/ l# d, j+ i( B( K
1
7 d9 \( {1 E; N2
% w& ^- ?: A& F$ F ^3
+ R1 H! U2 @& X0 Z查看当前集群状态(任意节点执行)
% A$ f/ k( Z( Y- D7 b通过ceph -s命令查询集群状态,可见集群services中3个mgr服务已启动。
8 E, g T4 I P% R$ cceph -s
; T Z" W- V- S6 U> cluster: ( J0 ~' V' z a, e% t% v
> id: cf3862c5-f8f6-423e-a03e-beb40fecb74a
: s2 J. i, j# ~> health: HEALTH_OK
2 h1 @& V5 w( f; n0 D> & n V( b/ k* |1 z6 N
> services: ( u) V5 H8 H5 Y! E
> mon: 3 daemons, quorum ceph03,ceph02,ceph01 (age 12d) : X! g1 J0 E9 B [' \$ i
> mgr: ceph01(active, since 3w), standbys: ceph01、ceph02
' O$ r& [7 U; W- l( P/ N> osd:
i, U7 h7 C. f# p0 b& Z3 U> 4 u( Y( ~, O/ b# D( u9 ?9 A% b
> data:) F/ x& E. H% B8 n. z6 Z
> pools: 9 q0 ^# e9 o4 E: g9 Y
> objects:
2 q, X9 i' p: t: v5 d> usage:
2 [# R1 m$ x% x3 F2 b> pgs:/ x+ q" {6 S8 e9 l
1
% g p& A# C+ U/ r+ G& M2
6 P/ y m& _0 h4 m38 W+ m& N3 g1 C8 I
4
: H8 F0 _* Z* n9 ?8 L- [* y54 ]3 h4 ^4 m0 o# |( b
69 |- ^6 k# g0 R
7
2 c8 `+ q! [3 O! w: P8# A* }+ c8 P0 |* C1 j5 w
9$ Y# h4 E8 e; @5 u; F F& |% q% `
10; b% |$ t2 q" H/ _ D* j
11
# `4 W e, X6 a$ T125 D/ ~/ ~' D$ M. J5 X
138 ?# l( z9 z- P& _. G9 P6 [
14* o5 |+ M. g E' X* n% V
152 s" @. M f: ~ {7 X' |
使能Dashboard访问功能(任意节点执行)
6 l5 x. J) m u; Y/ F( o- e开启mgr dashboard功能: `3 M7 I9 s& p( c% Z& Z1 ?
ceph mgr module enable dashboard
# C# u; |# L: I! F1
1 z4 ]8 ^" T5 ~1 J5 \9 `& o+ A5 o4 T生成并安装自签名的证书
9 B2 P* H+ B$ f; i- N( yceph dashboard create-self-signed-cert
) n% F4 y1 O4 q% h3 T11 g! S7 V9 R2 M7 q% d8 Q
配置dashboard
; P8 I8 k7 P* n) Eceph config set mgr mgr/dashboard/server_addr 10.40.65.148
- N; E8 m% \$ Y0 @/ U. F/ Q# jceph config set mgr mgr/dashboard/server_port 8080
. J3 V9 ?& z3 }3 I: B9 u9 k8 eceph config set mgr mgr/dashboard/ssl_server_port 8443# M9 y, D K' ?! W& w. a
1
h6 `4 a9 V, K9 A: Q2
/ \7 L' S7 ?0 h33 G' ^% b# b% C1 }% v0 V
创建一个dashboard登录用户名密码
- D9 o# k5 L% X: C4 J0 recho '123456' > password.txt
9 I ^/ L5 ^0 ]3 X; l' jceph dashboard ac-user-create admin administrator -i password.txt
" P) b- c) W o5 P8 g3 h H7 c1
6 }8 _2 O4 I F9 V* d5 `2& F* y6 b) m4 H% p' m
查看服务访问方式
* S7 N$ e. G! t4 u7 I7 }; {! E1 @ceph mgr services
" z* V( C9 ] u \& e2 c1
3 `- K# Y* S0 t1 W3 I通过web访问Ceph Dashboard,用户名密码为admin/1234562 L2 l0 f( I2 g+ R# A) X
https://10.40.65.148:8443 |
|