This section describes how to install and configure the OpenStack Identity service, code-named keystone, on the controller node. For scalability purposes, this configuration deploys Fernet tokens and the Apache HTTP server to handle requests.
Before you install and configure the Identity service, you must create a database.
Použijte klienta pro přístup k databázi a přihlaste se na něj jako uživatel root
:
$ mysql -u root -p
Vytvořte databázi keystone
:
MariaDB [(none)]> CREATE DATABASE keystone;
Udělte přístup do databáze keystone
:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'localhost' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%' \
IDENTIFIED BY 'KEYSTONE_DBPASS';
Nahraďte KEYSTONE_DBPASS
vhodným heslem.
Ukončete klienta s přístup k databázi.
Poznámka
Default configuration files vary by distribution. You might need
to add these sections and options rather than modifying existing
sections and options. Also, an ellipsis (...
) in the configuration
snippets indicates potential default configuration options that you
should retain.
Poznámka
This guide uses the Apache HTTP server with mod_wsgi
to serve
Identity service requests on ports 5000 and 35357. By default, the
keystone service still listens on these ports. Therefore, this guide
manually disables the keystone service.
Proveďte následující příkaz pro instalaci balíčků:
# yum install openstack-keystone httpd mod_wsgi
Upravte soubor /etc/keystone/keystone.conf
a proveďte následující úkony:
V části [database]
nastavte přístup k databázi:
[database]
# ...
connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
Nahraďte Keystone_DBPASS
vámi zvoleným heslem pro databázi.
Poznámka
Comment out or remove any other connection
options in the
[database]
section.
In the [token]
section, configure the Fernet token provider:
[token]
# ...
provider = fernet
Zaplňte databázi služby identit:
# su -s /bin/sh -c "keystone-manage db_sync" keystone
Initialize Fernet key repositories:
# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
# keystone-manage credential_setup --keystone-user keystone --keystone-group keystone
Bootstrap the Identity service:
# keystone-manage bootstrap --bootstrap-password ADMIN_PASS \
--bootstrap-admin-url http://controller:35357/v3/ \
--bootstrap-internal-url http://controller:5000/v3/ \
--bootstrap-public-url http://controller:5000/v3/ \
--bootstrap-region-id RegionOne
Replace ADMIN_PASS
with a suitable password for an administrative user.
Upravte soubor /etc/httpd/conf/httpd.conf
a nastavte volbu ServerName
aby odkazovala na uzel kontroléru:
ServerName controller
Create a link to the /usr/share/keystone/wsgi-keystone.conf
file:
# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
Spusťte službu Apache HTTP a nastavte ji, aby byla spuštěna při zavedení systému:
# systemctl enable httpd.service
# systemctl start httpd.service
Configure the administrative account
$ export OS_USERNAME=admin
$ export OS_PASSWORD=ADMIN_PASS
$ export OS_PROJECT_NAME=admin
$ export OS_USER_DOMAIN_NAME=Default
$ export OS_PROJECT_DOMAIN_NAME=Default
$ export OS_AUTH_URL=http://controller:35357/v3
$ export OS_IDENTITY_API_VERSION=3
Replace ADMIN_PASS
with the password used in the
keystone-manage bootstrap
command in keystone-install-configure.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.