|
|
Source the admin credentials to gain access to admin-only CLI commands:
- g$ J0 D0 N, i1 @$ z$ . admin-openrc
- @ Q0 }/ { t9 }# mTo create the service credentials, complete these steps:
7 j: p& ~/ d) hCreate the ceilometer user:
, a3 p4 a n' f$ openstack user create --domain default --password-prompt ceilometer6 N# l9 @, V9 B# L- [/ L
User Password:2 c$ C1 o0 \; k2 ^. B) t8 {% D) Q
Repeat User Password:* d: t9 V. J' N/ C9 g
+-----------+----------------------------------+
: N r4 G$ H, a" C| Field | Value |
! v, i# A; V/ N- {+-----------+----------------------------------+
4 s8 C9 g: S6 F: c4 j0 [# Q| domain_id | e0353a670a9e496da891347c589539e9 |
# t' I4 J7 ~0 K# _; }' `6 n| enabled | True |
% j8 Z" R2 y0 F1 V' v: D- \| id | c859c96f57bd4989a8ea1a0b1d8ff7cd |5 \ X) ?! E7 ^) f9 N$ |5 A7 d
| name | ceilometer |/ Y8 ~0 `' t& o2 B+ j( S
+-----------+----------------------------------+
9 c& a( \, _, I( p3 Y4 NAdd the admin role to the ceilometer user.
( X% g2 a$ n# G# Z8 g$ openstack role add --project service --user ceilometer admin
% n2 g& I/ Z' \. E Note
( ?1 I. c% N) j8 G8 ~0 |This command provides no output.
% y+ K' w/ S3 b, H4 M6 `& m8 q7 CRegister Gnocchi service in Keystone:
6 z" V) Y4 I$ W1 a; L. hCreate the gnocchi user:
) z7 W' X# ~2 X% t3 r$ openstack user create --domain default --password-prompt gnocchi
, K3 S/ M# x( I8 d" g: m6 E6 @User Password:
7 l; W5 C3 S3 i9 g u; l! B+ HRepeat User Password:
3 ~6 J3 Y6 I2 J3 K% R ^8 u% W+-----------+----------------------------------+
4 X% Z- z5 b# e| Field | Value |
, x. c" X7 T: G: E+-----------+----------------------------------+
# C' e8 a3 {( m& g+ r; T| domain_id | e0353a670a9e496da891347c589539e9 |
* e3 ?$ [5 a) n# ?| enabled | True |
$ F; \; Y$ m0 `: R| id | 8bacd064f6434ef2b6bbfbedb79b0318 |
" n5 L/ J# I: s, f: M| name | gnocchi |0 G' x/ j5 j% a y' L: ?5 w @- V
+-----------+----------------------------------+: g, n8 B) E! [- m1 b& B6 u
Create the gnocchi service entity:' z" h9 U/ i% X! c
$ openstack service create --name gnocchi \
6 r2 w g' O# c8 ?4 x5 m --description "Metric Service" metric
, ^; Z; d4 x# Y2 T b J+-------------+----------------------------------+& c/ f' {) `& U9 U/ U
| Field | Value |! k/ r8 R( T" [' @# J! w
+-------------+----------------------------------+' } Y0 _# J$ r; }8 ~0 B
| description | Metric Service |. F2 P( e; n6 m# m, R2 t; _! w
| enabled | True |
0 y8 A" E% _) O1 y6 i| id | 205978b411674e5a9990428f81d69384 |4 p- Z( s3 C' P( j. o
| name | gnocchi |" D% j( P7 _) R
| type | metric |" D6 F. b' l) x6 t8 V+ s8 N
+-------------+----------------------------------+
- j2 B; w- u* |% g, b, ~# zAdd the admin role to the gnocchi user.2 W- x( ?$ f$ I+ p, | @, ?" L
$ openstack role add --project service --user gnocchi admin$ J9 V7 c" c+ w3 W w) K
Note+ T! s: R9 i5 L: h; f
This command provides no output.* f" M0 ~9 x5 z. F7 J! e
Create the Metric service API endpoints:3 h( C7 ]/ ]. ^1 Y4 Z: v
$ openstack endpoint create --region RegionOne \
5 s( I/ a; L. V- @2 u, X/ ? metric public http://controller:8041# D4 l8 t; T9 z- n% P# I$ R
+--------------+----------------------------------+8 L: Q3 \% N6 M2 |8 \
| Field | Value |
0 ^2 k- n' b+ F6 Q+--------------+----------------------------------+
. R7 b, H; e2 E$ `/ q, v" N| enabled | True |. P+ W/ M& D! n6 }8 U8 k
| id | b808b67b848d443e9eaaa5e5d796970c |" b- F' |$ g# X& O: \4 A
| interface | public |
) J% z1 {0 s0 A% E- Q' M. ~& F| region | RegionOne |/ w% A1 l/ n9 c4 n0 D- _: N! d
| region_id | RegionOne |
! c& ?3 e: a" o* J: x+ k3 H# h| service_id | 205978b411674e5a9990428f81d69384 |
2 Q. ~% i" |% ~/ K$ z9 q| service_name | gnocchi |- g. S) x. A, y- x9 u& U
| service_type | metric |
9 P: c3 O1 W& V7 @" H5 ~! R$ \| url | http://controller:8041 |+ p) B7 b0 j( w- b2 y
+--------------+----------------------------------+
( a; S O( ]) g8 s3 H$ openstack endpoint create --region RegionOne \
3 O# U' U& ` a# p metric internal http://controller:80414 y2 G4 j9 b$ H
+--------------+----------------------------------+
' k; E" m: } \3 }. ~+ @3 {8 F: ]| Field | Value |; ^6 ?6 K% a% t3 @+ l% o& b; n* ]" b
+--------------+----------------------------------+
+ I) B# u$ M$ t2 U& y| enabled | True |
; t/ ~8 E) \# a4 K, Z' k# P| id | c7009b1c2ee54b71b771fa3d0ae4f948 |6 x- @6 O: H6 q9 q
| interface | internal |8 u& \- b l2 \, Q
| region | RegionOne |6 ]( k, M7 X6 Y1 I6 p0 y4 Z
| region_id | RegionOne |
* y: T* z. l j+ X: ~| service_id | 205978b411674e5a9990428f81d69384 |4 C/ G8 D* F; }3 x
| service_name | gnocchi |
' \: K8 \) `$ n* T| service_type | metric |& E/ } W( N9 p8 l Q H+ ?
| url | http://controller:8041 |
- T" g2 M6 a$ n7 q* x* N+--------------+----------------------------------+3 M6 D' ?& r+ J' F9 ?5 _3 |$ F
$ openstack endpoint create --region RegionOne \0 c( a% z; T6 [- P6 f- ]
metric admin http://controller:8041' y9 H: e; l0 m( I
+--------------+----------------------------------+
" f( x% _ J3 E9 `| Field | Value |
6 y( G) e9 G8 }8 V# N+--------------+----------------------------------+' W1 ^, \1 u8 `2 M/ F
| enabled | True |
' J( b& |5 X' A5 n z| id | b2c00566d0604551b5fe1540c699db3d |
" B: D. B4 Q3 O) e8 i! |# u; H| interface | admin | I/ t" f' j9 a" a6 F& B/ c
| region | RegionOne |
2 E5 z9 Y; W/ A; h| region_id | RegionOne |
Q, [# U8 C, V9 r: s8 o& ]5 U| service_id | 205978b411674e5a9990428f81d69384 |
' j% P9 r9 g s. e| service_name | gnocchi |
% }$ z$ P9 T6 y. I& h8 Q% z0 H( j| service_type | metric |$ x! n$ B4 K5 k% e [8 [7 z0 E! ~
| url | http://controller:8041 |
2 W* d& r; r4 F! F( L/ D! `0 Q+--------------+----------------------------------+. W" T$ a' Z3 u# v8 G
Install Gnocchi¶
/ `4 i: c2 V! o1 H$ VInstall the Gnocchi packages. Alternatively, Gnocchi can be install using pip:
9 E6 ^5 x- l! `# yum install openstack-gnocchi-api openstack-gnocchi-metricd \
* S& V0 H3 D( U: ]3 W% o python-gnocchiclient
) a9 i+ T+ Q. B" M! e2 E" V2 y- h Note
! r" r# n& q0 J+ N8 gDepending on your environment size, consider installing Gnocchi separately as it makes extensive use of the cpu.5 f9 _# O! [3 J% l0 y+ ]. o5 }
Create the database for Gnocchi’s indexer:$ Y* q% [" C3 h3 N3 M; ` ?( H6 ]
Use the database access client to connect to the database server as the root user:, r0 r( z& {. {4 V8 a. h0 K
$ mysql -u root -p, K& M# p& L' i7 J+ K
Create the gnocchi database:6 J/ N& `( E5 j$ u
CREATE DATABASE gnocchi;
v- |1 x2 n: N3 aGrant proper access to the gnocchi database:" J) v$ T" O& T. D8 P
GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'localhost' \
# v! w) n* a9 i$ [: g IDENTIFIED BY 'GNOCCHI_DBPASS';( ^ A3 g) K# j) c( t
GRANT ALL PRIVILEGES ON gnocchi.* TO 'gnocchi'@'%' \% W. ]9 ?9 t3 J* x8 G& W
IDENTIFIED BY 'GNOCCHI_DBPASS';3 N- H1 o+ F# Z6 z# C
Replace GNOCCHI_DBPASS with a suitable password.
; [& w. f' D0 @. w9 X7 R, gExit the database access client.* v8 Z: E- w; L# a
Edit the /etc/gnocchi/gnocchi.conf file and add Keystone options:8 N8 B& m0 W4 q1 R6 O
In the [api] section, configure gnocchi to use keystone: F* `# O1 H* f3 a
[api]
4 A5 p) |, V- d. A) v7 J& aauth_mode = keystone+ A9 c6 ]* D: m5 Y2 h2 m
In the [keystone_authtoken] section, configure keystone authentication:
) V! _* }/ q C( y; }8 A[keystone_authtoken]
9 {1 l9 h: ]- D) \- a...
& j9 y3 Y+ ~3 X# P, b. J& Dauth_type = password
4 l# f: d$ N( Z' i3 Uauth_url = http://controller:5000/v38 e* f z S+ W3 z- C* q
project_domain_name = Default
- w" t" K$ ?4 D4 E9 uuser_domain_name = Default& s7 @8 C4 s3 r( k
project_name = service
. t( ~4 G& h- W1 q- Gusername = gnocchi+ Q* e' O& t# I5 I$ ^" D
password = GNOCCHI_PASS
3 f8 h7 `% P+ n# N* T7 uinterface = internalURL
0 [! Q3 Z! Z) |" n8 D, @region_name = RegionOne
* C& F- W, |- \$ R. g+ X |Replace GNOCCHI_PASS with the password you chose for the gnocchi user in the Identity service.7 S) c% o& M1 A, l/ ]1 z `
In the [indexer] section, configure database access:
+ U; j* Q. g" {5 r* C) ~[indexer]
a. i$ D; ^5 {' furl = mysql+pymysql://gnocchi:GNOCCHI_DBPASS@controller/gnocchi8 B; v' s6 x! G/ T. g$ n
Replace GNOCCHI_DBPASS with the password you chose for Gnocchi’s indexer database.
; j& G( F4 v6 G' h# }& ^ YIn 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:- r9 \- B3 H& q' D; C- g: n7 U
[storage]. ]) Y/ U$ i3 `: A: ~7 _
# coordination_url is not required but specifying one will improve9 P% c0 t1 F4 Z! f; r
# performance with better workload division across workers.
! e/ o* R( b" J" C5 r7 Icoordination_url = redis://controller:6379
8 ]8 f5 s+ J$ q' n( mfile_basepath = /var/lib/gnocchi: U$ L; q9 {% d0 y# {2 C
driver = file
# e4 Y* B8 M3 o' n; E YInitialize Gnocchi:! Q& ]* m& b& W O4 Y2 ~
gnocchi-upgrade% a. V1 S% L6 I( X9 z% s
Finalize Gnocchi installation¶2 N7 W: {# l/ X- M/ M2 H
Start the Gnocchi services and configure them to start when the system boots:; i, v5 u; [+ f/ c! e4 G
# systemctl enable openstack-gnocchi-api.service \2 K' j" l5 l& _! o/ V$ }
openstack-gnocchi-metricd.service
% G! |8 I I8 a: J" q# systemctl start openstack-gnocchi-api.service \% g# E5 b( v2 n" k# m
openstack-gnocchi-metricd.service3 h: d. q/ P$ S. N# U
Install and configure components¶8 E- ~1 g } b3 I4 ]+ z/ q/ M# {
Install the Ceilometer packages:
2 u o' _2 T/ _. Y" p. l# yum install openstack-ceilometer-notification \% f4 |: X, F$ f, @8 v/ S3 R
openstack-ceilometer-central
* g' Z1 Q( w2 }8 y( pEdit the /etc/ceilometer/pipeline.yaml file and complete the following section:
2 o0 I: d6 M. g$ r6 ?% n4 D/ NConfigure Gnocchi connection:
4 ], j5 O* k5 g! [publishers:9 E6 u' v# U, |6 @
# set address of Gnocchi. M# e" s! |3 A, ~) p
# + filter out Gnocchi-related activity meters (Swift driver); X+ m$ ^8 A- T* t6 i2 _' m$ I
# + set default archive policy
H/ G5 r0 A; q- C+ s+ V7 d - gnocchi://?filter_project=service&archive_policy=low
) F" H1 l' M# O, h3 r! uEdit the /etc/ceilometer/ceilometer.conf file and complete the following actions: e p, @/ X3 R- p4 l
In the [DEFAULT] section, configure RabbitMQ message queue access:
& b+ K7 c! C1 i- M( K; t) u( g3 b[DEFAULT]6 n$ {# D3 j4 k, }2 E& ]
...5 z2 S8 L$ p4 e0 N; b* f
transport_url = rabbit://openstack:RABBIT_PASS@controller8 B3 D/ B+ ^0 D/ n1 A, r- ^3 f$ w
7 W1 j' F/ h- u3 h
Replace RABBIT_PASS with the password you chose for the openstack account in RabbitMQ.# k7 P+ N+ l K3 S$ g+ l) {
In the [service_credentials] section, configure service credentials:8 j4 f% Z7 i, I% S$ _( ~% t. A
[service_credentials]2 k8 c5 O! m2 W- r
...( A' {8 Z! D' E& o' z4 ?
auth_type = password
6 A- u- X8 n* [8 S' N3 O' E/ s' kauth_url = http://controller:5000/v3# i- {8 c/ [- W7 r1 d5 L
project_domain_id = default
' K: S/ @3 R$ O$ iuser_domain_id = default
7 |" I) r# q+ }( q: d/ cproject_name = service
( R q5 u( |' {5 busername = ceilometer
. h0 \. r5 a1 |6 Kpassword = CEILOMETER_PASS- }6 N/ F0 [3 \: [: O. P1 Q
interface = internalURL
. {: e, f; I" T. ^, i+ \6 uregion_name = RegionOne' S8 j3 ?& t, V
Replace CEILOMETER_PASS with the password you chose for the ceilometer user in the Identity service.' ~5 z$ {# u8 m" j
Create Ceilometer resources in Gnocchi. Gnocchi should be running by this stage:
) y' Y1 D# [4 {* D3 ?. F A/ B* a# ceilometer-upgrade8 b9 \' e: v0 {: T' k" ~
Finalize installation¶
& ~3 Z% t W8 V: IStart the Telemetry services and configure them to start when the system boots:8 s# y7 ~0 b k1 X& b
# systemctl enable openstack-ceilometer-notification.service \8 M6 Y: k. @- N6 t) t* ^6 }
openstack-ceilometer-central.service/ k1 i, Q7 e# t$ b! \! T
# systemctl start openstack-ceilometer-notification.service \* \7 C) M( J3 a8 S5 l+ ^" W& h% k
openstack-ceilometer-central.service
( S& G+ g6 B- [/ R% O |
|