blob: 4ef4bbea12e132ca0f0f04680ed68d342b3bc7d9 [file] [log] [blame]
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +03001=====
2Usage
3=====
Filip Pytloun943d6882015-10-06 16:28:32 +02004
Jakub Pavlikffc280d2016-05-20 11:19:14 +02005Keystone provides authentication, authorization and service discovery
6mechanisms via HTTP primarily for use by projects in the OpenStack family. It
7is most commonly deployed as an HTTP interface to existing identity systems,
8such as LDAP.
Filip Pytloun943d6882015-10-06 16:28:32 +02009
10From Kilo release Keystone v3 endpoint has definition without version in url
11
12.. code-block:: bash
13
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030014 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
15 | id | region | publicurl | internalurl | adminurl | service_id |
16 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
17 | 91663a8d...494 | RegionOne | http://10.0.150.37:5000/ | http://10.0.150.37:5000/ | http://10.0.150.37:35357/ | 0fd2dba...9c9 |
18 +----------------+-----------+--------------------------+--------------------------+---------------------------+---------------+
Filip Pytloun943d6882015-10-06 16:28:32 +020019
20Sample pillars
21==============
22
Alexander Noskov78b81e02016-12-05 16:20:50 +040023.. caution::
Adam Tengler7c66c882016-03-14 19:35:49 +010024
Jakub Pavlikffc280d2016-05-20 11:19:14 +020025 When you use localhost as your database host (keystone:server:
26 atabase:host), sqlalchemy will try to connect to /var/run/mysql/
27 mysqld.sock, may cause issues if you located your mysql socket elsewhere
Adam Tengler7c66c882016-03-14 19:35:49 +010028
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030029Full stacked Keystone:
Filip Pytloun943d6882015-10-06 16:28:32 +020030
31.. code-block:: yaml
32
33 keystone:
34 server:
35 enabled: true
36 version: juno
37 service_token: 'service_tokeen'
38 service_tenant: service
39 service_password: 'servicepwd'
40 admin_tenant: admin
41 admin_name: admin
42 admin_password: 'adminpwd'
43 admin_email: stackmaster@domain.com
44 roles:
45 - admin
46 - Member
47 - image_manager
48 bind:
49 address: 0.0.0.0
50 private_address: 127.0.0.1
51 private_port: 35357
52 public_address: 127.0.0.1
53 public_port: 5000
54 api_version: 2.0
55 region: RegionOne
56 database:
57 engine: mysql
58 host: '127.0.0.1'
59 name: 'keystone'
60 password: 'LfTno5mYdZmRfoPV'
61 user: 'keystone'
62
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030063Keystone public HTTPS API:
Filip Pytloun943d6882015-10-06 16:28:32 +020064
65.. code-block:: yaml
66
67 keystone:
68 server:
69 enabled: true
70 version: juno
71 ...
72 services:
73 - name: nova
74 type: compute
75 description: OpenStack Compute Service
76 user:
77 name: nova
78 password: password
79 bind:
80 public_address: cloud.domain.com
81 public_protocol: https
82 public_port: 8774
83 internal_address: 10.0.0.20
84 internal_port: 8774
85 admin_address: 10.0.0.20
86 admin_port: 8774
87
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +030088Keystone with custom policies. Keys with specified rules
89are created or set to this value if they already exists.
90Keys with no value (like our ``existing_rule``) are deleted
91from the policy file:
Adam Tenglerb1ebaca2017-05-04 21:06:08 +000092
93.. code-block:: yaml
94
95 keystone:
96 server:
97 enabled: true
98 policy:
99 new_rule: "rule:admin_required"
100 existing_rule:
101
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300102Keystone memcached storage for tokens:
Filip Pytloun943d6882015-10-06 16:28:32 +0200103
104.. code-block:: yaml
105
106 keystone:
107 server:
108 enabled: true
109 version: juno
110 ...
111 token_store: cache
112 cache:
113 engine: memcached
114 host: 127.0.0.1
115 port: 11211
116 services:
117 ...
118
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300119Keystone clustered memcached storage for tokens:
Filip Pytloun943d6882015-10-06 16:28:32 +0200120
121.. code-block:: yaml
122
123 keystone:
124 server:
125 enabled: true
126 version: juno
127 ...
128 token_store: cache
129 cache:
130 engine: memcached
131 members:
132 - host: 192.160.0.1
133 port: 11211
134 - host: 192.160.0.2
135 port: 11211
136 services:
137 ...
138
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300139Keystone client:
Filip Pytloun943d6882015-10-06 16:28:32 +0200140
141.. code-block:: yaml
142
143 keystone:
144 client:
145 enabled: true
146 server:
147 host: 10.0.0.2
148 public_port: 5000
149 private_port: 35357
150 service_token: 'token'
151 admin_tenant: admin
152 admin_name: admin
153 admin_password: 'passwd'
154
155Keystone cluster
156
157.. code-block:: yaml
158
159 keystone:
160 control:
161 enabled: true
162 provider:
163 os15_token:
164 host: 10.0.0.2
165 port: 35357
166 token: token
167 os15_tcp_core_stg:
168 host: 10.0.0.5
169 port: 5000
170 tenant: admin
171 name: admin
172 password: password
173
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300174Keystone fernet tokens for OpenStack Kilo release:
Filip Pytloun943d6882015-10-06 16:28:32 +0200175
176.. code-block:: yaml
177
178 keystone:
179 server:
180 ...
181 tokens:
182 engine: fernet
Jakub Pavlik6b0b74a2016-09-01 10:49:14 +0200183 max_active_keys: 3
Filip Pytloun943d6882015-10-06 16:28:32 +0200184 ...
185
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300186Keystone auth methods:
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300187
188.. code-block:: yaml
189
190 keystone:
191 server:
192 ...
193 auth_methods:
194 - external
195 - password
196 - token
197 - oauth1
198 ...
199
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300200Keystone domain with LDAP backend, using SQL for
201role/project assignment:
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100202
203.. code-block:: yaml
204
205 keystone:
206 server:
207 domain:
Ramon Melero96ff9122017-08-15 11:02:50 -0500208 external:
209 description: "Testing domain"
210 backend: ldap
211 assignment:
212 backend: sql
213 ldap:
214 url: "ldaps://idm.domain.com"
215 suffix: "dc=cloud,dc=domain,dc=com"
216 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
217 uid: keystone
218 password: password
Filip Pytloun6b9ec2b2016-01-12 13:52:01 +0100219
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300220Use driver aliases for drivers instead of class path's:
Dzmitry Stremkouskia0db50f2018-03-26 20:41:36 +0200221
222.. code-block:: yaml
223
224 keystone:
225 server:
226 domain:
227 test:
228 description: "Test domain"
229 backend: ldap
230 assignment:
231 backend: sql
232 driver: sql
233 identity:
234 backend: ldap
235 driver: keystone.identity.backends.ldap.Identity
236 ldap:
237 url: "ldaps://idm.domain.com"
238 ...
239
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300240Using LDAP backend for default domain:
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100241
242.. code-block:: yaml
243
244 keystone:
245 server:
246 backend: ldap
247 assignment:
248 backend: sql
249 ldap:
Ales Komarekaabbda62016-03-15 08:38:35 +0100250 url: "ldaps://idm.domain.com"
251 suffix: "dc=cloud,dc=domain,dc=com"
252 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100253 uid: keystone
Ales Komarekaabbda62016-03-15 08:38:35 +0100254 password: password
255
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300256Using LDAP backend for default domain with
257``user_enabled`` field emulation:
kovchynnykov74125082018-02-05 13:17:43 +0200258
259.. code-block:: yaml
260
261 keystone:
262 server:
263 backend: ldap
264 assignment:
265 backend: sql
266 ldap:
267 url: "ldap://idm.domain.com"
268 suffix: "ou=Openstack Service Users,o=domain.com"
269 bind_user: keystone
270 password: password
271 # Define LDAP "group" object class and "membership" attribute
272 group_objectclass: groupOfUniqueNames
273 group_member_attribute: uniqueMember
274 # User will receive "enabled" attribute basing on membership in "os-user-enabled" group
275 user_enabled_emulation: True
276 user_enabled_emulation_dn: "cn=os-user-enabled,ou=Openstack,o=domain.com"
277 user_enabled_emulation_use_group_config: True
278
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300279If the members of the group ``objectclass`` are user IDs
280rather than DNs, set ``group_members_are_ids`` to ``true``.
281This is the case when using ``posixGroup` as the group
282``objectclass`` and ``OpenDirectory``:
Aleksieiev, Oleksii3f1d7a52018-06-06 15:14:29 -0700283
284.. code-block:: yaml
285
286 keystone:
287 server:
288 backend: ldap
289 assignment:
290 backend: sql
291 ldap:
292 url: "ldaps://idm.domain.com"
293 suffix: "dc=cloud,dc=domain,dc=com"
294 # Will bind as uid=keystone,cn=users,cn=accounts,dc=cloud,dc=domain,dc=com
295 uid: keystone
296 password: password
297 group_members_are_ids: True
298
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300299Simple service endpoint definition (defaults to ``RegionOne``):
Ales Komarekaabbda62016-03-15 08:38:35 +0100300
301.. code-block:: yaml
302
303 keystone:
304 server:
305 service:
306 ceilometer:
307 type: metering
308 description: OpenStack Telemetry Service
309 user:
310 name: ceilometer
311 password: password
312 bind:
313 ...
314
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300315Region-aware service endpoints definition:
Ales Komarekaabbda62016-03-15 08:38:35 +0100316
317.. code-block:: yaml
318
319 keystone:
320 server:
321 service:
322 ceilometer_region01:
323 service: ceilometer
324 type: metering
325 region: region01
326 description: OpenStack Telemetry Service
327 user:
328 name: ceilometer
329 password: password
330 bind:
331 ...
332 ceilometer_region02:
333 service: ceilometer
334 type: metering
335 region: region02
336 description: OpenStack Telemetry Service
337 bind:
338 ...
339
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300340Enable Ceilometer notifications:
Jakub Pavlik72e31d62016-04-08 16:26:57 +0200341
342.. code-block:: yaml
343
344 keystone:
345 server:
346 notification: true
347 message_queue:
348 engine: rabbitmq
349 host: 127.0.0.1
350 port: 5672
351 user: openstack
352 password: password
353 virtual_host: '/openstack'
354 ha_queues: true
Filip Pytloun1abfdd72016-01-18 11:35:17 +0100355
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300356Client-side RabbitMQ HA setup:
Jakub Pavlik205ef802016-12-14 12:48:42 +0100357
358.. code-block:: yaml
359
360 keystone:
361 server:
362 ....
363 message_queue:
364 engine: rabbitmq
365 members:
366 - host: 10.0.16.1
367 - host: 10.0.16.2
368 - host: 10.0.16.3
369 user: openstack
370 password: pwd
371 virtual_host: '/openstack'
372 ....
373
Kirill Bespalov00984452017-08-01 17:44:11 +0300374Client-side RabbitMQ TLS configuration:
375
376|
377
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300378By default system-wide CA certs are used. Nothing should be
379specified except ``ssl.enabled``.
Kirill Bespalov00984452017-08-01 17:44:11 +0300380
381.. code-block:: yaml
382
383 keystone:
384 server:
385 ....
386 message_queue:
387 ssl:
388 enabled: True
389
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300390Use ``cacert_file`` option to specify the CA-cert
391file path explicitly:
Kirill Bespalov00984452017-08-01 17:44:11 +0300392
393.. code-block:: yaml
394
395 keystone:
396 server:
397 ....
398 message_queue:
399 ssl:
400 enabled: True
401 cacert_file: /etc/ssl/rabbitmq-ca.pem
402
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300403To manage content of the ``cacert_file`` use the ``cacert``
404option:
Kirill Bespalov00984452017-08-01 17:44:11 +0300405
406.. code-block:: yaml
407
408 keystone:
409 server:
410 ....
411 message_queue:
412 ssl:
413 enabled: True
414 cacert: |
415
416 -----BEGIN CERTIFICATE-----
417 ...
418 -----END CERTIFICATE-------
419
420 cacert_file: /etc/openstack/rabbitmq-ca.pem
421
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300422.. note::
Kirill Bespalov00984452017-08-01 17:44:11 +0300423
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300424 * The ``message_queue.port`` is set to ``5671`` (AMQPS) by
425 default if ``ssl.enabled=True``.
426 * Use ``message_queue.ssl.version`` if you need to specify
427 protocol version. By default, is ``TLSv1`` for python <
428 2.7.9 and ``TLSv1_2`` for version above.
Kirill Bespalov00984452017-08-01 17:44:11 +0300429
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300430Enable CADF audit notification:
Petr Michalec98fc6d62016-12-03 11:30:35 +0100431
432.. code-block:: yaml
433
434 keystone:
435 server:
436 notification: true
437 notification_format: cadf
438
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300439Run Keystone under Apache:
Alexander Noskov78b81e02016-12-05 16:20:50 +0400440
441.. code-block:: yaml
442
443 keystone:
444 server:
445 service_name: apache2
446 apache:
447 server:
448 enabled: true
449 default_mpm: event
450 site:
451 keystone:
452 enabled: true
453 type: keystone
454 name: wsgi
455 host:
456 name: ${linux:network:fqdn}
457 modules:
458 - wsgi
459
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300460Enable SAML2 Federated keystone:
Alexander Noskov78b81e02016-12-05 16:20:50 +0400461
462.. code-block:: yaml
463
464 keystone:
465 server:
Oleksii Chupryn6fd899f2017-04-21 10:20:51 +0300466 auth_methods:
467 - password
468 - token
469 - saml2
Oleksii Chuprynebe09a52017-04-21 11:08:14 +0300470 federation:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300471 saml2:
472 protocol: saml2
473 remote_id_attribute: Shib-Identity-Provider
474 shib_url_scheme: https
475 shib_compat_valid_user: 'on'
Alexander Noskov78b81e02016-12-05 16:20:50 +0400476 federation_driver: keystone.contrib.federation.backends.sql.Federation
Oleksii Chupryn5f110b02017-03-30 09:54:27 +0300477 federated_domain_name: Federated
Alexander Noskov78b81e02016-12-05 16:20:50 +0400478 trusted_dashboard:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300479 - https://${_param:cluster_public_host}/horizon/auth/websso/
Alexander Noskov78b81e02016-12-05 16:20:50 +0400480 apache:
481 server:
482 pkgs:
483 - apache2
484 - libapache2-mod-shib2
485 modules:
486 - wsgi
487 - shib2
Ales Komarek74a3ba62016-10-05 12:16:52 +0200488
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300489Enable OIDC Federated Keystone:
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300490
491.. code-block:: yaml
492
493 keystone:
494 server:
495 auth_methods:
496 - password
497 - token
498 - oidc
499 federation:
500 oidc:
501 protocol: oidc
502 remote_id_attribute: HTTP_OIDC_ISS
503 remote_id_attribute_value: https://accounts.google.com
504 oidc_claim_prefix: "OIDC-"
505 oidc_response_type: id_token
506 oidc_scope: "openid email profile"
507 oidc_provider_metadata_url: https://accounts.google.com/.well-known/openid-configuration
508 oidc_client_id: <openid_client_id>
509 oidc_client_secret: <openid_client_secret>
510 oidc_crypto_passphrase: openstack
511 oidc_redirect_uri: https://key.example.com:5000/v3/auth/OS-FEDERATION/websso/oidc/redirect
512 oidc_oauth_introspection_endpoint: https://www.googleapis.com/oauth2/v1/tokeninfo
513 oidc_oauth_introspection_token_param_name: access_token
514 oidc_oauth_remote_user_claim: user_id
515 oidc_ssl_validate_server: 'off'
516 federated_domain_name: Federated
517 federation_driver: keystone.contrib.federation.backends.sql.Federation
518 trusted_dashboard:
519 - https://${_param:cluster_public_host}/auth/websso/
520 apache:
521 server:
522 pkgs:
523 - apache2
524 - libapache2-mod-auth-openidc
525 modules:
526 - wsgi
527 - auth_openidc
528
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300529.. note:: Ubuntu Trusty repository doesn't contain
530 ``libapache2-mod-auth-openidc`` package. Additonal
531 repository should be added to the source list.
Oleksii Chuprynfcecf192017-04-21 12:20:46 +0300532
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300533Use a custom identity driver with custom options:
mnederlof5d9ccac2017-03-02 15:47:50 +0100534
535.. code-block:: yaml
536
537 keystone:
538 server:
539 backend: k2k
540 k2k:
541 auth_url: 'https://keystone.example.com/v2.0'
542 read_user: 'example_user'
543 read_pass: 'password'
544 read_tenant_id: 'admin'
545 identity_driver: 'sql'
546 id_prefix: 'k2k:'
547 domain: 'default'
548 caching: true
549 cache_time: 600
550
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300551Enable CORS parameters:
Ondrej Smola16e1bb72017-04-18 23:37:49 +0200552
553.. code-block:: yaml
554
555 keystone:
556 server:
557 cors:
558 allowed_origin: https:localhost.local,http:localhost.local
559 expose_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
560 allow_methods: GET,PUT,POST,DELETE,PATCH
561 allow_headers: X-Auth-Token,X-Openstack-Request-Id,X-Subject-Token
562 allow_credentials: True
563 max_age: 86400
564
Ales Komarek74a3ba62016-10-05 12:16:52 +0200565Keystone client
566---------------
567
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300568Service endpoints enforcement with service token:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200569
570.. code-block:: yaml
571
572 keystone:
573 client:
574 enabled: true
575 server:
576 keystone01:
577 admin:
578 host: 10.0.0.2
579 port: 35357
580 token: 'service_token'
581 service:
582 nova:
583 type: compute
584 description: OpenStack Compute Service
585 endpoints:
586 - region: region01
587 public_address: 172.16.10.1
588 public_port: 8773
589 public_path: '/v2'
590 internal_address: 172.16.10.1
591 internal_port: 8773
592 internal_path: '/v2'
593 admin_address: 172.16.10.1
594 admin_port: 8773
595 admin_path: '/v2'
596
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300597Project, users, roles enforcement with admin user:
Ales Komarek74a3ba62016-10-05 12:16:52 +0200598
599.. code-block:: yaml
600
601 keystone:
602 client:
603 enabled: true
604 server:
605 keystone01:
606 admin:
607 host: 10.0.0.2
608 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100609 project: admin
Ales Komarek74a3ba62016-10-05 12:16:52 +0200610 user: admin
611 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100612 region_name: RegionOne
613 protocol: https
Ales Komarek74a3ba62016-10-05 12:16:52 +0200614 roles:
615 - admin
616 - member
617 project:
618 tenant01:
619 description: "test env"
Jiri Broulik59000e92017-02-06 18:14:06 +0100620 quota:
621 instances: 100
622 cores: 24
623 ram: 151200
624 floating_ips: 50
625 fixed_ips: -1
626 metadata_items: 128
627 injected_files: 5
628 injected_file_content_bytes: 10240
629 injected_file_path_bytes: 255
630 key_pairs: 100
631 security_groups: 20
632 security_group_rules: 40
633 server_groups: 20
634 server_group_members: 20
Ales Komarek74a3ba62016-10-05 12:16:52 +0200635 user:
636 user01:
637 email: jdoe@domain.com
638 is_admin: true
639 password: some
640 user02:
641 email: jdoe2@domain.com
642 password: some
643 roles:
644 - custom-roles
645
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300646Multiple servers example:
Richard Felkl5ff315e2017-02-01 23:26:23 +0100647
648.. code-block:: yaml
649
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100650 keystone:
651 client:
652 enabled: true
653 server:
654 keystone01:
655 admin:
656 host: 10.0.0.2
657 port: 5000
658 project: 'admin'
659 user: admin
660 password: 'workshop'
661 region_name: RegionOne
662 protocol: https
663 keystone02:
664 admin:
665 host: 10.0.0.3
666 port: 5000
667 project: 'admin'
668 user: admin
669 password: 'workshop'
670 region_name: RegionOne
Richard Felkl5ff315e2017-02-01 23:26:23 +0100671
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300672Tenant quotas:
Jiri Broulik59000e92017-02-06 18:14:06 +0100673
674.. code-block:: yaml
675
676 keystone:
677 client:
678 enabled: true
679 server:
680 keystone01:
681 admin:
682 host: 10.0.0.2
683 port: 5000
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100684 project: admin
Jiri Broulik59000e92017-02-06 18:14:06 +0100685 user: admin
686 password: 'passwd'
Jiri Broulik1703fcc2017-02-13 17:42:29 +0100687 region_name: RegionOne
688 protocol: https
Jiri Broulik59000e92017-02-06 18:14:06 +0100689 roles:
690 - admin
691 - member
692 project:
693 tenant01:
694 description: "test env"
695 quota:
696 instances: 100
697 cores: 24
698 ram: 151200
699 floating_ips: 50
700 fixed_ips: -1
701 metadata_items: 128
702 injected_files: 5
703 injected_file_content_bytes: 10240
704 injected_file_path_bytes: 255
705 key_pairs: 100
706 security_groups: 20
707 security_group_rules: 40
708 server_groups: 20
709 server_group_members: 20
710
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300711Extra config params in ``keystone.conf``
712(since Mitaka release):
Oleksii Chupryn4fec2132017-04-03 17:35:28 +0300713
714.. code-block:: yaml
715
716 keystone:
717 server:
718 ....
719 extra_config:
720 ini_section1:
721 param1: value
722 param2: value
723 ini_section2:
724 param1: value
725 param2: value
726 ....
727
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300728Configuration of ``policy.json`` file:
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200729
730.. code-block:: yaml
731
Dmitry Ukovf58264b2017-04-20 23:08:42 +0200732 keystone:
733 server:
734 ....
735 policy:
736 admin_or_token_subject: 'rule:admin_required or rule:token_subject'
737
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300738Manage ``os-cloud-config`` yml with ``keystone.client``:
Vasyl Saienkod1902592018-03-30 12:51:54 +0300739
740.. code-block:: yaml
741
742 keystone:
743 client:
744 os_client_config:
745 enabled: true
746 cfgs:
747 root:
748 file: /root/.config/openstack/clouds.yml
749 content:
750 clouds:
751 admin_identity:
752 region_name: RegioneOne
753 auth:
754 username: admin
755 password: secretpassword
756 user_domain_name: Default
757 project_name: admin
758 project_domain_name: Default
759 auth_url: "http://1.2.3.4:5000"
760
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300761Setting up default admin project name and domain:
Andrey4b287f02017-10-03 18:40:25 -0500762
763.. code-block:: yaml
764
Andrey4b287f02017-10-03 18:40:25 -0500765 keystone:
766 server:
767 ....
768 admin_project:
769 name: "admin"
770 domain: "default"
771
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400772Enhanced logging with logging.conf
773----------------------------------
774
775By default logging.conf is disabled.
776
777That is possible to enable per-binary logging.conf with new variables:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400778
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300779* ``openstack_log_appender``
780 Set to true to enable ``log_config_append`` for all OpenStack services
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400781
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300782* ``openstack_fluentd_handler_enabled``
783 Set to true to enable ``FluentHandler`` for all Openstack services
784
785* ``openstack_ossyslog_handler_enabled``
786 Set to true to enable ``OSSysLogHandler`` for all Openstack services
787
788Only ``WatchedFileHandler``, ``OSSysLogHandler``, and ``FluentHandler``
789are available.
790
791Also, it is possible to configure this with pillar:
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400792
793.. code-block:: yaml
794
795 keystone:
796 server:
797 logging:
798 log_appender: true
799 log_handlers:
800 watchedfile:
801 enabled: true
802 fluentd:
803 enabled: true
Oleksii Chupryn6529bb32018-02-07 11:55:38 +0200804 ossyslog:
805 enabled: true
Dmitry Kalashnik494a17d2017-12-06 16:55:55 +0400806
Jiri Broulik59000e92017-02-06 18:14:06 +0100807Usage
808=====
809
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300810#. Apply the :command:`keystone.client.service` state.
811#. Apply the :command:`keystone.client` state.
Jiri Broulik59000e92017-02-06 18:14:06 +0100812
813
Oleksii Grudev5707e5c2018-06-18 17:31:22 +0300814Fernet-keys rotation without gluster
815------------------------------------
816
817In the future fernet keys supposed to be rotated with rsync+ssh instead of using glusterfs. By default it is assumed
818that the script will run on primary control node (ctl01) and will rotate and transfer fernet keys to secondary
819controller nodes (ctl02, ctl03). Following parameter should be set on cluster level:
820
821keystone_node_role
822
823and fernet_rotation_driver should be set to 'rsync'
824
825By default this parameter is set to "secondary" on system level along with other parameters:
826.. code-block:: yaml
827
828 keystone:
829 server:
830 role: ${_param:keystone_node_role}
831 tokens:
832 fernet_sync_nodes_list:
833 control02:
834 name: ctl02
835 enabled: True
836 control03:
837 name: ctl03
838 enabled: True
839 fernet_rotation_driver: rsync
840
841Prior to running keystone salt states ssh key should be generated and its public part should be placed on secondary controllers.
842It can be accomplished by running following orchestration state before keystone states:
843
844salt-run state.orchestrate keystone.orchestrate.deploy
845
846Currently the default fernet rotation driver is a shared filesystem
847
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300848Enable x509 and ssl communication between Keystone and Galera cluster.
849---------------------
850By default communication between Keystone and Galera is unsecure.
851
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300852keystone:
853 server:
854 database:
855 x509:
856 enabled: True
857
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300858You able to set custom certificates in pillar:
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300859
860keystone:
861 server:
862 database:
863 x509:
Oleksandr Shyshkob97f0542018-09-07 14:00:18 +0300864 cacert: (certificate content)
865 cert: (certificate content)
866 key: (certificate content)
Oleksandr Shyshko9b152eb2018-08-31 10:23:34 +0300867
868You can read more about it here:
869 https://docs.openstack.org/security-guide/databases/database-access-control.html
870
Vasyl Saienko52bed882018-09-10 10:52:39 +0000871Upgrades
872========
873
874Each openstack formula provide set of phases (logical bloks) that will help to
875build flexible upgrade orchestration logic for particular components. The list
876of phases and theirs descriptions are listed in table below:
877
878+-------------------------------+------------------------------------------------------+
879| State | Description |
880+===============================+======================================================+
881| <app>.upgrade.service_running | Ensure that all services for particular application |
882| | are enabled for autostart and running |
883+-------------------------------+------------------------------------------------------+
884| <app>.upgrade.service_stopped | Ensure that all services for particular application |
885| | disabled for autostart and dead |
886+-------------------------------+------------------------------------------------------+
887| <app>.upgrade.pkgs_latest | Ensure that packages used by particular application |
888| | are installed to latest available version. |
889| | This will not upgrade data plane packages like qemu |
890| | and openvswitch as usually minimal required version |
891| | in openstack services is really old. The data plane |
892| | packages should be upgraded separately by `apt-get |
893| | upgrade` or `apt-get dist-upgrade` |
894| | Applying this state will not autostart service. |
895+-------------------------------+------------------------------------------------------+
896| <app>.upgrade.render_config | Ensure configuration is rendered actual version. +
897+-------------------------------+------------------------------------------------------+
898| <app>.upgrade.pre | We assume this state is applied on all nodes in the |
899| | cloud before running upgrade. |
900| | Only non destructive actions will be applied during |
901| | this phase. Perform service built in service check |
902| | like (keystone-manage doctor and nova-status upgrade)|
903+-------------------------------+------------------------------------------------------+
904| <app>.upgrade.upgrade.pre | Mostly applicable for data plane nodes. During this |
905| | phase resources will be gracefully removed from |
906| | current node if it is allowed. Services for upgraded |
907| | application will be set to admin disabled state to |
908| | make sure node will not participate in resources |
909| | scheduling. For example on gtw nodes this will set |
910| | all agents to admin disable state and will move all |
911| | routers to other agents. |
912+-------------------------------+------------------------------------------------------+
913| <app>.upgrade.upgrade | This state will basically upgrade application on |
914| | particular target. Stop services, render |
915| | configuration, install new packages, run offline |
916| | dbsync (for ctl), start services. Data plane should |
917| | not be affected, only OpenStack python services. |
918+-------------------------------+------------------------------------------------------+
919| <app>.upgrade.upgrade.post | Add services back to scheduling. |
920+-------------------------------+------------------------------------------------------+
921| <app>.upgrade.post | This phase should be launched only when upgrade of |
922| | the cloud is completed. Cleanup temporary files, |
923| | perform other post upgrade tasks. |
924+-------------------------------+------------------------------------------------------+
925| <app>.upgrade.verify | Here we will do basic health checks (API CRUD |
926| | operations, verify do not have dead network |
927| | agents/compute services) |
928+-------------------------------+------------------------------------------------------+
929
930
Jakub Pavlikffc280d2016-05-20 11:19:14 +0200931Documentation and Bugs
Ales Komarek74a3ba62016-10-05 12:16:52 +0200932======================
Filip Pytloun943d6882015-10-06 16:28:32 +0200933
Jakub Pavlikffc280d2016-05-20 11:19:14 +0200934To learn how to deploy OpenStack Salt, consult the documentation available
935online at:
936
937 https://wiki.openstack.org/wiki/OpenStackSalt
938
939In the unfortunate event that bugs are discovered, they should be reported to
940the appropriate bug tracker. If you obtained the software from a 3rd party
941operating system vendor, it is often wise to use their own bug tracker for
942reporting problems. In all other cases use the master OpenStack bug tracker,
943available at:
944
945 http://bugs.launchpad.net/openstack-salt
946
947Developers wishing to work on the OpenStack Salt project should always base
948their work on the latest formulas code, available from the master GIT
949repository at:
950
951 https://git.openstack.org/cgit/openstack/salt-formula-keystone
952
953Developers should also join the discussion on the IRC list, at:
954
955 https://wiki.openstack.org/wiki/Meetings/openstack-salt
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100956
957Documentation and Bugs
958======================
959
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300960* http://salt-formulas.readthedocs.io/
961 Learn how to install and update salt-formulas
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100962
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300963* https://github.com/salt-formulas/salt-formula-keystone/issues
964 In the unfortunate event that bugs are discovered, report the issue to the
965 appropriate issue tracker. Use the Github issue tracker for a specific salt
966 formula
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100967
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300968* https://launchpad.net/salt-formulas
969 For feature requests, bug reports, or blueprints affecting the entire
970 ecosystem, use the Launchpad salt-formulas project
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100971
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300972* https://launchpad.net/~salt-formulas-users
973 Join the salt-formulas-users team and subscribe to mailing list if required
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100974
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300975* https://github.com/salt-formulas/salt-formula-keystone
976 Develop the salt-formulas projects in the master branch and then submit pull
977 requests against a specific formula
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100978
OlgaGusarenkoa9fac4b2018-07-30 19:17:24 +0300979* #salt-formulas @ irc.freenode.net
980 Use this IRC channel in case of any questions or feedback which is always
981 welcome
Filip Pytloun4cc5c0f2017-02-02 13:02:03 +0100982