|
|
Source the admin credentials to gain access to admin-only CLI commands:8 w9 T7 j: _9 H( U2 S
$ . admin-openrc0 h. _9 I4 Q0 R6 V
To create the service credentials, complete these steps:
8 w8 P5 m' _# w& V& gCreate the ceilometer user:1 F- w5 Q$ {: J
$ openstack user create --domain default --password-prompt ceilometer( E' \9 s( D3 o4 B- T7 z
User Password:
- \ h, @" M5 D/ G7 d4 lRepeat User Password:: }8 _) A/ o+ T: D0 B/ l
+-----------+----------------------------------+
* }( z! M- m# f9 J| Field | Value |* A1 m7 {' Q) V
+-----------+----------------------------------+, N+ l2 O6 L X7 @" B% s
| domain_id | e0353a670a9e496da891347c589539e9 |2 _* g; C# v+ L7 U4 @( b' j" z
| enabled | True |* w6 g0 y# t/ }0 g% U9 u
| id | c859c96f57bd4989a8ea1a0b1d8ff7cd |
5 h9 ]0 ?) h7 x: C% U3 }* P9 A| name | ceilometer |
9 F/ w& m n" M: O; s" a+-----------+----------------------------------+
4 |8 r0 n' l7 SAdd the admin role to the ceilometer user.
8 G& U9 F* e2 M' G0 e: f4 B$ openstack role add --project service --user ceilometer admin( J$ N2 b+ I: m. d$ Y" g( c; @' S3 ]
Note
8 S( L1 z6 B8 `: dThis command provides no output.
F" A! f0 j0 E0 L7 O4 U `: WRegister Gnocchi service in Keystone:7 I, K: l9 E4 B
Create the gnocchi user:6 d* W# ~, J: e5 [% U6 O8 C
$ openstack user create --domain default --password-prompt gnocchi
9 Y1 t# H [5 F" _) l) T6 X$ dUser Password:
' P- a, B; A o4 YRepeat User Password:
4 X9 [& N3 W5 w; R+-----------+----------------------------------+$ @, h* ], W9 E0 }/ Z8 b
| Field | Value |2 I- q( o8 | m& `, B
+-----------+----------------------------------+) O- O) {' I+ u9 p% P! r4 K
| domain_id | e0353a670a9e496da891347c589539e9 |
3 W) o5 s/ q) R$ ^- w' U| enabled | True |
( }& r7 p; B5 t. C, G| id | 8bacd064f6434ef2b6bbfbedb79b0318 |2 j% q' J+ |3 c
| name | gnocchi |
7 d& ?2 L6 s& t* O$ g# i+-----------+----------------------------------++ H0 D6 O; U6 B% W! J
Create the gnocchi service entity:
. w( i+ r8 t) X, d9 b3 j' d$ openstack service create --name gnocchi \- y+ w5 p( p6 E& {2 |# T. N
--description "Metric Service" metric4 r. U) A3 w0 ~5 _; e! T
+-------------+----------------------------------+
8 }2 V' _2 t& | N| Field | Value |1 v, u( V% J `9 p
+-------------+----------------------------------+
" ^. [( J `, D| description | Metric Service |
5 g: I* g/ x0 }- o0 O1 N| enabled | True |
( V6 D+ W8 v7 V' t' r| id | 205978b411674e5a9990428f81d69384 |
, n& ?1 ~3 W2 k' B6 m8 z8 _| name | gnocchi |
! j$ E2 l! l4 n- s {! W| type | metric |/ B1 E8 b4 R, m+ ?; Y2 S
+-------------+----------------------------------+) b! X" k5 c0 V4 Y# n2 ~
Add the admin role to the gnocchi user.
& r4 U5 S! |- c2 V9 I$ openstack role add --project service --user gnocchi admin
+ H: O3 O% V; A& F% t+ N Note7 h6 l! e+ p) E' n% O7 ?) ?
This command provides no output.2 ]9 U. W* C/ T7 g2 \
Create the Metric service API endpoints:
7 d0 [( z3 h/ S3 f# @3 f$ openstack endpoint create --region RegionOne \# o4 b3 A, {+ P2 M! K8 P' i, e/ ~
metric public http://controller:80416 n4 ^8 f4 B: Q/ s3 E6 y2 B8 | u5 J
+--------------+----------------------------------+( O$ M) _3 F7 T3 {$ x
| Field | Value |1 o) W4 z# y5 Z% M
+--------------+----------------------------------+* S2 Y+ T1 h% C3 i, n2 v; p2 S! R7 q
| enabled | True |, g* Q1 W4 D# t& H- h) j8 |" O/ @: {
| id | b808b67b848d443e9eaaa5e5d796970c |! P1 }/ g0 F2 u& v w1 S
| interface | public |
: { e ?; r/ k$ a( T) p| region | RegionOne |+ {; M, K- r# N4 Q5 D5 T6 u
| region_id | RegionOne |) @+ Y9 H5 R6 u7 l8 Q
| service_id | 205978b411674e5a9990428f81d69384 |' A8 Y, E* G2 v, f2 S
| service_name | gnocchi |% ]9 V+ U5 b6 c3 E& `+ i, J- J; M
| service_type | metric |
' }& ]% g7 u1 m4 [* V" L% ]" N| url | http://controller:8041 |
6 v( a5 v! @! U/ ?- c) `0 A+--------------+----------------------------------+ S3 v; l6 d! X+ c F
$ openstack endpoint create --region RegionOne \! }8 C2 Q9 {9 F R
metric internal http://controller:8041
* L2 K" V+ I3 d( K# b+--------------+----------------------------------+
1 F& F+ e! R P9 w$ `| Field | Value |4 U$ p: M5 m) Z0 Y
+--------------+----------------------------------+* o$ N: i) [) ~; A/ H1 I$ r) e
| enabled | True |
. W& C5 O$ T% O5 \$ T0 W| id | c7009b1c2ee54b71b771fa3d0ae4f948 |
# H" @* a5 j* ^6 N1 I7 w8 \| interface | internal |
+ M; C2 A! G* r" v0 |9 r| region | RegionOne |9 p5 O7 O- F' z- J* [8 O$ J/ ^3 z2 V
| region_id | RegionOne |
6 D6 F, R3 l7 V! F. ~( j| service_id | 205978b411674e5a9990428f81d69384 |7 X3 u$ F+ C7 K1 ], u
| service_name | gnocchi |
8 C, d2 Z J {" G8 b| service_type | metric |
2 y- t! u7 B' L+ `' z& d! c$ t/ t| url | http://controller:8041 |
6 E) ?( p2 g F+--------------+----------------------------------+
6 P* I, e- } p) a3 a$ openstack endpoint create --region RegionOne \" U0 d' _' J) G- D8 I! K- }) k) Q
metric admin http://controller:8041
( L6 U! `" @! D) `+ i+--------------+----------------------------------+8 t/ K" B" w% T- E, E" B8 W/ M1 C% @
| Field | Value |
4 k6 s& F' Y/ @+--------------+----------------------------------+( L! u2 E7 _) N0 i5 z
| enabled | True |
2 V8 W' B! S( i. ]5 f$ || id | b2c00566d0604551b5fe1540c699db3d |
. U3 v5 A" p: P* k0 k| interface | admin |, R5 \" M. a+ e7 S0 F
| region | RegionOne |
. c' M, P, r" r8 c| region_id | RegionOne |8 K( F+ Y) C* E ?/ A0 G
| service_id | 205978b411674e5a9990428f81d69384 |! b5 y) e4 `0 {' N
| service_name | gnocchi |* K H1 J! A$ i: q
| service_type | metric |- H8 {$ n; G. b4 o
| url | http://controller:8041 |
9 y/ E* A0 U' l0 p3 d7 V4 L9 k+--------------+----------------------------------+
& N# @3 u: k6 y$ a+ UInstall Gnocchi¶
& E' ?' J, C, N* H2 s0 hInstall the Gnocchi packages. Alternatively, Gnocchi can be install using pip:6 f( R& X" I7 f! P1 b% B
# yum install openstack-gnocchi-api openstack-gnocchi-metricd \
! Q; Y3 ?9 m1 `0 t6 f) o3 [ python-gnocchiclient
/ r# t7 S4 Z; ]: D% B, Y, \0 B Note' M7 U; N7 {7 E5 J
Depending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu.
N" F& C+ k, _) c. G6 cCreate the database for Gnocchi’s indexer:2 a2 u z' T: p; M5 r, N O/ c
Use the database access client to connect to the database server as the root user:( J d; Y( Y0 m/ w/ J2 L( ]
$ mysql -u root -p
7 Y! l: ^- H8 SCreate the gnocchi database:
3 A* F. b9 c- s/ ~$ NCREATE DATABASE gnocchi;- t/ M# ?2 m, B5 _& w
Grant proper access to the gnocchi database:
% q* r( d0 ?0 y- r# n+ w- l* j' {GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' \% |" X9 H* m5 \
IDENTIFIED BY 'GNOCCHI_DBPASS';
+ @5 `& o) n' L4 M1 l N, FGRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'%' \
# n& F g3 L+ s, n1 m IDENTIFIED BY 'GNOCCHI_DBPASS';
, l3 F, ^" `) |3 D; X' Q2 C6 ZReplace GNOCCHI_DBPASS with a suitable password.
! p3 ?7 e. s9 hExit the database access client.
2 N4 H; ~) b& s+ n% u- U& nEdit the /etc/gnocchi/gnocchi.conf file and add Keystone options:! w' u8 S a; M: Q7 K7 U: Y
In the [api] section, configure gnocchi to use keystone:
6 S# v& U3 P# K1 z4 g2 o- z* b[api]+ v7 o* s) K9 k" C- }
auth_mode = keystone- C$ ]+ c ]1 p2 K
In the [keystone_authtoken] section, configure keystone authentication:
" c# p) G4 ]& c/ i) b; P2 d0 b0 {1 ][keystone_authtoken]) F2 ?% K* u( A; F8 G
...
7 ]. _0 L% W) `$ ?* @7 U: qauth_type = password2 t: b. a" K" l) q7 i/ S
auth_url = http://controller:5000/v3
5 `, q/ J4 X, bproject_domain_name = Default# q! S/ ~- k7 l! X8 M
user_domain_name = Default
4 }) b* P: Y* ~project_name = service
. j6 {- x, N3 O$ ^+ v; y: l% eusername = gnocchi
( s) m6 g5 f! A! N! L `' M0 vpassword = GNOCCHI_PASS
4 l; P* o$ d) u4 `) _* |8 Hinterface = internalURL K" v6 c. U1 x) ?: B, J
region_name = RegionOne9 a! e0 i2 G0 F5 k3 D2 B [% P
Replace GNOCCHI_PASS with the password you chose for the gnocchi user in the Identity service. u' k5 }3 p2 r$ E, A3 L
In the [indexer] section, configure database access:
/ F$ Q; m8 O" Y4 r7 R/ Z' I[indexer]
: V: g/ m& [ w* c: iurl = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@controller/gnocchi
z/ ~. {! R( OReplace GNOCCHI_DBPASS with the password you chose for Gnocchi’s indexer database.
" b: j6 S# y! [6 MIn 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:
+ V+ A+ P6 \0 q/ H# T[storage]4 ^8 K. T' R% m9 s, v7 Y* D/ C
# coordination_url is not required but specifying one will improve
9 R# P) y1 \$ `- G1 t# performance with better workload division across workers.
L. d. |/ `: c6 c+ X' P$ y1 ocoordination_url = redis://controller:6379
- Y0 y1 {0 ?# m1 L' Dfile_basepath = /var/lib/gnocchi8 P$ R) {- W) h V4 b' c! O
driver = file
8 u! m8 b( x2 \. ]2 u4 ^3 `Initialize Gnocchi:& s5 [' p- n6 H
gnocchi-upgrade- m" B* N1 Q P& `3 W
Finalize Gnocchi installation¶
: h& P9 b$ s# U5 }1 |" M" |Start the Gnocchi services and configure them to start when the system boots:" z. j6 l6 Q/ _5 q0 w, Q" ]
# systemctl enable openstack-gnocchi-api.service \
5 v" T3 `/ ]4 L& f+ j% ~4 ~" b- W openstack-gnocchi-metricd.service: F: ?- v- r# j+ _! Z9 {
# systemctl start openstack-gnocchi-api.service \' {% T. ]/ S8 a" c e& |
openstack-gnocchi-metricd.service0 [2 p& n* ~& ?7 w$ x
Install and configure components¶
' v' m4 q0 v& v9 P) ZInstall the Ceilometer packages:; M+ u( Q6 u2 U- \
# yum install openstack-ceilometer-notification \. S" G$ x7 w8 X
openstack-ceilometer-central
4 X6 v4 J4 w1 H5 u; R+ }Edit the /etc/ceilometer/pipeline.yaml file and complete the following section:
4 F6 X3 ^% k8 f6 `9 X# A- _Configure Gnocchi connection:
8 V& h0 o; R |0 x1 A) {( dpublishers:+ W* N$ {, e7 s6 r2 ?
# set address of Gnocchi0 f+ @7 v5 H% R9 j% R, |& U! z3 k
# + filter out Gnocchi-related activity meters (Swift driver)
, V/ f7 k+ F# i6 X! ?8 Y # + set default archive policy! N0 [) f) d( x) ]2 W
- gnocchi://?filter_project=service&archive_policy=low
" G+ U1 L) z0 G8 K$ SEdit the /etc/ceilometer/ceilometer.conf file and complete the following actions:! S! i0 W( P8 o2 o/ {2 q
In the [DEFAULT] section, configure RabbitMQ message queue access:
' ^$ r S) W \5 v' h; M8 d, U[DEFAULT]& Z9 I$ D: a+ Q5 l* I
...
, V1 ~ [5 m. Ctransport_url = rabbit://openstack:RABBIT_PASS@controller
8 G% X4 o' i9 j# G1 h0 q* \$ y" D n, o R( x. W
Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ." R8 m n- K& o+ R: f4 |
In the [service_credentials] section, configure service credentials:' P4 C E$ w. C
[service_credentials] u# Z9 @4 b& u6 L( p" l
...
8 q* K2 N( I2 Rauth_type = password8 Q/ B7 U4 [* p
auth_url = http://controller:5000/v33 ?7 r* P" [& e7 p. i
project_domain_id = default9 {) ^; e" S* N" T3 I9 j W
user_domain_id = default! z% A, t% ^5 o( r6 |
project_name = service7 Y! _; v9 R3 X
username = ceilometer) Y8 V0 _' j1 G" B0 [5 l8 Q
password = CEILOMETER_PASS* w a. j4 t$ `
interface = internalURL3 m* h/ H7 q. J( [
region_name = RegionOne- P$ l) y3 F- Y" R- X, ]
Replace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.
7 M8 Z" s9 J; fCreate Ceilometer resources in Gnocchi. Gnocchi should be running by this stage:9 j2 J# i" b; V
# ceilometer-upgrade
7 r0 v+ `' g+ e7 P# IFinalize installation¶
0 \. L2 z6 [1 w! T' J9 J1 ?Start the Telemetry services and configure them to start when the system boots:2 h; _6 ^6 {" a4 m3 g
# systemctl enable openstack-ceilometer-notification.service \7 k2 ~$ m5 n6 S; I% X5 ~: e2 {; w0 X
openstack-ceilometer-central.service
- ^* `/ f6 h! q0 R! V. x$ w# systemctl start openstack-ceilometer-notification.service \
0 h1 b. Q( r6 P* H" Q3 I& R5 g& k9 | openstack-ceilometer-central.service
8 Q& I; i; _% i" T3 ?3 K2 T |
|