|
|
Source the admin credentials to gain access to admin-only CLI commands:
4 x7 H- o6 ?% T; t _ r$ . admin-openrc
5 R# s8 c0 A0 F$ YTo create the service credentials, complete these steps:
) ]; ]/ L8 D" o3 bCreate the ceilometer user:' ^! S1 ?7 p; ` q3 E# [5 s
$ openstack user create --domain default --password-prompt ceilometer* J: |6 _; N1 J: G
User Password:
0 v: Z* z5 v+ [8 n5 h9 @4 ?7 wRepeat User Password:+ i/ f! G; G7 j W9 Z, W0 y- a
+-----------+----------------------------------+
5 J6 O. r' z* N+ N- |7 g9 W| Field | Value |( \4 k( k+ Z. ~9 Q' O2 I' I! p4 j
+-----------+----------------------------------+* ^0 M0 ~1 U; g, e* Z
| domain_id | e0353a670a9e496da891347c589539e9 |% S0 O# F" x& N! A5 q* t3 y
| enabled | True |* y7 ~* s6 |6 B$ N% g1 I
| id | c859c96f57bd4989a8ea1a0b1d8ff7cd |
8 m7 Q% h7 v* a) a| name | ceilometer |7 m& H2 u% f# k- y% l5 \/ V
+-----------+----------------------------------+5 p- K3 Z; c3 ~1 P- {) o2 [
Add the admin role to the ceilometer user.4 o2 R/ z- s& [6 y f, z
$ openstack role add --project service --user ceilometer admin
2 Z, {* p, f! ] Note
D& U( t* Q7 c& F2 o% a! C$ W0 `This command provides no output.
u- o; S, w% }Register Gnocchi service in Keystone:
& J! Y% U8 |8 _9 VCreate the gnocchi user:
) ~" [9 Q) r( ~4 }0 I9 \$ openstack user create --domain default --password-prompt gnocchi9 I$ F9 b) ?. A
User Password:
, l2 ~3 g- a( j" v3 {& nRepeat User Password:5 C- C- J& r# Y7 J2 J+ P( e
+-----------+----------------------------------+! `) g$ g0 [* j: K/ m
| Field | Value |
6 b# v1 o" V* l9 i0 O/ {+-----------+----------------------------------+
" b0 |. J$ r1 P7 H| domain_id | e0353a670a9e496da891347c589539e9 |
$ x% m1 }( Y4 D| enabled | True |
) H; ~- }4 N' A6 F( ?# u/ s2 i/ l9 t| id | 8bacd064f6434ef2b6bbfbedb79b0318 |
, u/ v2 R1 Y8 Q| name | gnocchi |
1 |/ x6 o. \% o" q+-----------+----------------------------------+
6 d; w0 u+ S6 T6 A# s( rCreate the gnocchi service entity:
/ N) \) p# j. x9 G- A e3 y( P$ openstack service create --name gnocchi \
. R5 e! A" i+ \0 S N6 w7 s8 y8 } --description "Metric Service" metric
: e4 v8 ~- |& w) W4 Z+-------------+----------------------------------+. s5 [' e2 g% }: P
| Field | Value |
# K3 U2 s# N% i' ^) g) m+-------------+----------------------------------+
' u0 {4 l6 ]9 ~. P; j+ G9 k| description | Metric Service |5 p5 M: I/ A, E/ R
| enabled | True |
; }0 @& o! o d0 b M| id | 205978b411674e5a9990428f81d69384 |
. X7 E( I# x: i! X$ E Y| name | gnocchi |
: T! K0 k* m# x. P/ _7 l| type | metric |
! F! b8 d/ T8 n/ u8 E" a6 q3 M) q+-------------+----------------------------------+
% w! ?9 y3 r( @4 r* ^+ yAdd the admin role to the gnocchi user.4 Y5 x4 k- s3 b+ o' s S% c
$ openstack role add --project service --user gnocchi admin- }. k/ X4 b' c- h
Note C5 J D5 J5 ]0 B$ o6 }
This command provides no output.* N2 ^ a* r. w; J6 O z; h
Create the Metric service API endpoints:
2 v% W i q Q, S( w* i$ openstack endpoint create --region RegionOne \2 Z! G4 D2 t6 p1 E
metric public http://controller:80414 T9 k7 }. N2 V9 h c( u
+--------------+----------------------------------+: G: y: }/ T! {) v1 n
| Field | Value |
$ \% b2 [% v2 B+--------------+----------------------------------+5 H& _4 c' ?# [7 K7 L# w8 h
| enabled | True |
8 D: m% |( S' w# f| id | b808b67b848d443e9eaaa5e5d796970c |/ I5 @* \& Z8 H) x
| interface | public |& g$ h* I8 H. J' u+ H$ S5 x
| region | RegionOne |( `. [) H4 C! S" c: Z( J) o
| region_id | RegionOne |
% b1 g w% _1 n: z1 M| service_id | 205978b411674e5a9990428f81d69384 |: T1 K2 K' O9 _8 S* k7 Q
| service_name | gnocchi |( E8 T' J9 o7 j7 L3 |
| service_type | metric |
' D ]( ^, O# ?) O: ]& _6 t| url | http://controller:8041 |
0 H, t% d2 M" @/ W6 n" h+--------------+----------------------------------+
, N% X6 y) p1 S7 o6 ]) G4 H$ openstack endpoint create --region RegionOne \) g9 e8 V0 `5 e% _* @
metric internal http://controller:8041
0 z( j0 Z7 A, ?2 o( o+--------------+----------------------------------+9 C. u3 l' R) k1 O3 f0 z4 N. H
| Field | Value |! p: [! Q2 X9 P$ p: h3 u* [5 _
+--------------+----------------------------------+
: a- R" m& A0 G% V# m$ h| enabled | True |
. E1 _0 u& ~! M8 t% O: M| id | c7009b1c2ee54b71b771fa3d0ae4f948 |; C4 E5 N5 |+ J# }: E# \( ?
| interface | internal |
3 g% P) Y2 u. @6 P| region | RegionOne |. f, D; j. B0 e" B
| region_id | RegionOne |3 @+ I; v |* Z$ y2 ]1 {
| service_id | 205978b411674e5a9990428f81d69384 |
% R2 s8 x" y8 p$ |+ V# A/ I| service_name | gnocchi |) D7 m% T, C$ F: I0 Y. ^. J- U/ ?
| service_type | metric |: E+ `- J5 z( G/ L7 @& A7 m
| url | http://controller:8041 |
& Y4 r8 d A% q) p1 _' ^+--------------+----------------------------------+) R' R( {; z _) C, K
$ openstack endpoint create --region RegionOne \' d# L( Y' E. F
metric admin http://controller:8041
: i6 w9 s3 b7 Q- i+--------------+----------------------------------+1 _9 @4 Q* b" o
| Field | Value |. p0 y0 i& G% d7 d6 J! d, Q# h) [
+--------------+----------------------------------+
* P; ^$ @+ O. v/ ?| enabled | True |
6 R+ A) o3 ^" C* |! @3 }| id | b2c00566d0604551b5fe1540c699db3d |
8 ^6 m, S0 b+ i5 _| interface | admin |
8 j$ b0 s) B. Y, x* _! x4 d8 M| region | RegionOne |
4 S. D* I) u) |* y% K| region_id | RegionOne |
. Q& X' z! E+ n: Y| service_id | 205978b411674e5a9990428f81d69384 |% H* T4 U9 I: X5 U) i
| service_name | gnocchi |" A) t9 o5 n) [# n6 ?9 o* U
| service_type | metric |
9 m$ l a: m1 ^4 U9 O| url | http://controller:8041 |& v4 z& Z# J3 |- [3 i7 N2 K, H
+--------------+----------------------------------+4 ~% I8 p: `( t2 z& \0 L- h! ^+ k
Install Gnocchi¶
. t1 G4 m5 E6 N' f3 G& z2 j4 R1 qInstall the Gnocchi packages. Alternatively, Gnocchi can be install using pip: q Z% Z |/ o$ n/ r9 _" s7 @
# yum install openstack-gnocchi-api openstack-gnocchi-metricd \
0 X3 C9 O5 g9 h$ \* G python-gnocchiclient
9 N1 l0 k. D h# o' [. P9 C Note
3 T( G# O5 {, u* R2 r( g8 ^Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu. C0 h& t" ]. d
Create the database for Gnocchi’s indexer:) ]: _$ _5 T. _) ^+ w' t: q
Use the database access client to connect to the database server as the root user:( M& ~' C6 k" {
$ mysql -u root -p
9 S6 j, G _% ?& @* [) X+ H# KCreate the gnocchi database:5 L- o3 }& l5 h
CREATE DATABASE gnocchi;; u# q$ F+ y9 |% w# k, p
Grant proper access to the gnocchi database:
3 [0 X+ ^8 K, m AGRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' \0 W) W' P' L2 y- s
IDENTIFIED BY 'GNOCCHI_DBPASS';
2 B" a. \) ^- _$ @9 g6 eGRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'%' \
5 `) i. N. k; _+ F* y( n IDENTIFIED BY 'GNOCCHI_DBPASS';# k8 E2 K, A O% d' ~5 W1 e
Replace GNOCCHI_DBPASS with a suitable password." j) h1 w6 ?4 F/ D* I7 c! o/ d
Exit the database access client.
7 F% s" A( w% a Q5 ]$ E. pEdit the /etc/gnocchi/gnocchi.conf file and add Keystone options:" x9 z" n, S) g6 N% ]' ^6 k6 F
In the [api] section, configure gnocchi to use keystone:5 ^6 D3 W/ u1 [. r; _+ o7 ^& \0 l
[api]
# ^) f- p% ^" M( V$ G d1 m2 q( sauth_mode = keystone% e1 b. P9 f Z* ]8 X
In the [keystone_authtoken] section, configure keystone authentication:: |2 S9 {4 D1 N* |% O5 p8 x+ q
[keystone_authtoken]4 }9 q& W; t1 T; ]
...0 k- c5 }1 M: G8 J+ p
auth_type = password
# R5 k9 R$ U" q$ `7 jauth_url = http://controller:5000/v3
, L0 W4 q. |- J e1 q: gproject_domain_name = Default
7 U5 D9 G; X, o! c: buser_domain_name = Default
! @1 c- R0 \9 x$ Nproject_name = service i$ Z8 w2 } c9 F' I# Z
username = gnocchi
5 C3 Y8 ?' x* g: p7 `/ Qpassword = GNOCCHI_PASS6 P8 s* K& w# V$ |1 j8 H
interface = internalURL
6 i6 C8 r/ K& P, `0 F N0 \region_name = RegionOne
1 `+ g' @0 }/ y2 l* } m7 v7 qReplace GNOCCHI_PASS with the password you chose for the gnocchi user in the Identity service.
+ O/ @& R" o- ]4 m% h5 t' aIn the [indexer] section, configure database access:
n( v4 L) A9 J2 Z+ R' P$ `% ][indexer]0 l2 A% x7 h- E1 F9 R7 l1 L* e
url = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@controller/gnocchi/ D" i/ I- }, ^- B4 U$ T
Replace GNOCCHI_DBPASS with the password you chose for Gnocchi’s indexer database.
: \, |, k0 M; B, ?In the [storage] section, configure location to store metric data. In this case, we will store it to the local file system. See Gnocchi documenation for a list of more durable and performant drivers:
9 F! V8 y% |! P1 C( b[storage]- D5 ?/ x" q6 V& x& Y! [6 s2 O$ l
# coordination_url is not required but specifying one will improve
- I3 t& c$ r% y% z' Z5 a! H# performance with better workload division across workers.+ m2 r: ?7 K' s2 q
coordination_url = redis://controller:6379
1 \- S: T% K' b8 U }file_basepath = /var/lib/gnocchi$ @+ V6 e* L! {5 f' _# l; p. n
driver = file/ m) w, P0 Z6 B3 t0 @) I, u$ F
Initialize Gnocchi:! h; M& {& B" v, g. g: ~4 x
gnocchi-upgrade( j% l+ }) \2 j: {* |( x
Finalize Gnocchi installation¶# @( e' j- [. c6 F1 X
Start the Gnocchi services and configure them to start when the system boots:
+ m3 O: j, y* m# j/ A# systemctl enable openstack-gnocchi-api.service \
, r' [; B% N8 n" ~$ J openstack-gnocchi-metricd.service+ Z7 ]6 n8 \: }+ f+ D" _: T7 F" `1 {5 L: \4 Z
# systemctl start openstack-gnocchi-api.service \
( c Q4 q: q1 o openstack-gnocchi-metricd.service' ^' V8 l" A7 S: l% u( _" }
Install and configure components¶
+ {# K9 W, D; `. ^7 g+ {+ I+ QInstall the Ceilometer packages:& x# J- K$ M' I' w8 h4 V6 i: K
# yum install openstack-ceilometer-notification \( u( Z; m1 b9 i7 b: Q$ W* P
openstack-ceilometer-central: q4 |' L2 s, d
Edit the /etc/ceilometer/pipeline.yaml file and complete the following section:% s! e4 x$ r) B Q" c
Configure Gnocchi connection:5 G6 q% W" s, r+ P. I' j5 [
publishers:; G3 Y" T" @( t" D0 z
# set address of Gnocchi( E5 I, Y6 _* h) L4 |0 a! @2 Y/ Z) h! s
# + filter out Gnocchi-related activity meters (Swift driver)5 F* v C% a* L8 ]. z3 [ U
# + set default archive policy
3 @9 i* K4 v7 }, s1 f2 g0 X - gnocchi://?filter_project=service&archive_policy=low0 e7 o5 U$ `$ m I8 }
Edit the /etc/ceilometer/ceilometer.conf file and complete the following actions:# @- S6 J+ }# B3 z2 W
In the [DEFAULT] section, configure RabbitMQ message queue access:; h* K7 w9 v! f4 p; `
[DEFAULT]3 ]& h4 }5 Q3 W
...$ D9 K9 c* V5 T
transport_url = rabbit://openstack:RABBIT_PASS@controller5 R' B5 \! a7 k0 y$ o! K8 ]+ g* N
/ _' ^* Z" c& e1 ?- _1 l, L
Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.
# {- n. \$ q9 T( i. W( qIn the [service_credentials] section, configure service credentials:0 {) n# h* c1 |4 c( X$ k
[service_credentials]
7 u- w& Q9 j `! Z1 y...
0 J' F: Z" u3 C$ W% \ H/ eauth_type = password: P5 y# J5 j# r& D, t
auth_url = http://controller:5000/v3
H! v$ n! Q, |8 z8 K+ v) A) ]project_domain_id = default
: k8 G7 e I8 q6 J' yuser_domain_id = default5 K ^# ?& A8 e& m8 W% o8 T h
project_name = service
2 l6 Y& ?7 s0 @5 susername = ceilometer) ~3 _, Z3 U# U1 ]. Y
password = CEILOMETER_PASS' ^: I4 u; z' o" h2 Y
interface = internalURL
. B2 b' j/ w: w6 {8 Kregion_name = RegionOne4 L3 J7 T/ I* F6 j$ v
Replace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
0 g1 c& o% T( a/ c' G3 `Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage:
y4 e: M; c4 k; T6 h9 | {# ceilometer-upgrade ?! P/ \4 V" Y7 Y% m3 P6 i3 n: `
Finalize installation¶
- U4 P* w# d# i" z' C4 gStart the Telemetry services and configure them to start when the system boots:
, a" ?: z, P! ^) e! j# systemctl enable openstack-ceilometer-notification.service \
3 E8 I/ V5 a( {) e5 W openstack-ceilometer-central.service
; t; C4 _$ F' ?' _/ e0 a7 v$ Y* k# systemctl start openstack-ceilometer-notification.service \- M) C7 A1 D, ?/ {" U
openstack-ceilometer-central.service4 y- S+ S/ P- f: E5 o/ R
|
|