The original patch was pushed with this comment for all distros. This was incorrect. It should be noted that this change should only be required/noted by the SLES users. See the bug report for further explanation. Change-Id: I06343a4b3fb94d544a3d6332aac79760944d8779 Closes-bug: 1635546
9.2 KiB
Install and configure
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.
Prerequisites
Before you install and configure the Identity service, you must create a database.
obs
Note
Before you begin, ensure you have the most recent version of
python-pyasn1 installed.
ubuntu
Use the database access client to connect to the database server as the
rootuser:# mysql
rdo or debian or obs
Use the database access client to connect to the database server as the
rootuser:$ mysql -u root -p
Create the
keystonedatabase:MariaDB [(none)]> CREATE DATABASE keystone;Grant proper access to the
keystonedatabase: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';Replace
KEYSTONE_DBPASSwith a suitable password.Exit the database access client.
Install and configure components
obs or rdo
Note
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.
obs
Note
Starting with the Newton release, SUSE OpenStack packages are
shipping with the upstream default configuration files. For example
/etc/keystone/keystone.conf, with customizations in
/etc/keystone/keystone.conf.d/010-keystone.conf. While the
following instructions modify the default configuration file, adding a
new file in /etc/keystone/keystone.conf.d achieves the same
result.
ubuntu or debian
Note
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. The package handles all
of the Apache configuration for you (including the activation of the
mod_wsgi apache2 module and keystone configuration in
Apache).
Run the following command to install the packages:
# apt install keystone
rdo
Run the following command to install the packages:
# yum install openstack-keystone httpd mod_wsgi
obs
Run the following command to install the packages:
# zypper install openstack-keystone apache2-mod_wsgi
Edit the
/etc/keystone/keystone.conffile and complete the following actions:In the
[database]section, configure database access:[database] # ... connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystoneReplace
KEYSTONE_DBPASSwith the password you chose for the database.Note
Comment out or remove any other
connectionoptions in the[database]section.In the
[token]section, configure the Fernet token provider:[token] # ... provider = fernet
Populate the Identity service database:
# su -s /bin/sh -c "keystone-manage db_sync" keystoneInitialize Fernet key repositories:
# keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone # keystone-manage credential_setup --keystone-user keystone --keystone-group keystoneBootstrap 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 RegionOneReplace
ADMIN_PASSwith a suitable password for an administrative user.
Configure the Apache HTTP server
rdo
Edit the
/etc/httpd/conf/httpd.conffile and configure theServerNameoption to reference the controller node:ServerName controllerCreate a link to the
/usr/share/keystone/wsgi-keystone.conffile:# ln -s /usr/share/keystone/wsgi-keystone.conf /etc/httpd/conf.d/
ubuntu or debian
Edit the
/etc/apache2/apache2.conffile and configure theServerNameoption to reference the controller node:ServerName controller
debian
Note
The Debian package will perform the below operations for you:
# a2enmod wsgi
# a2ensite wsgi-keystone.conf
# invoke-rc.d apache2 restart
obs
Edit the
/etc/sysconfig/apache2file and configure theAPACHE_SERVERNAMEoption to reference the controller node:APACHE_SERVERNAME="controller"Create the
/etc/apache2/conf.d/wsgi-keystone.conffile with the following content:Listen 5000 Listen 35357 <VirtualHost *:5000> WSGIDaemonProcess keystone-public processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-public WSGIScriptAlias / /usr/bin/keystone-wsgi-public WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On ErrorLogFormat "%{cu}t %M" ErrorLog /var/log/apache2/keystone.log CustomLog /var/log/apache2/keystone_access.log combined <Directory /usr/bin> Require all granted </Directory> </VirtualHost> <VirtualHost *:35357> WSGIDaemonProcess keystone-admin processes=5 threads=1 user=keystone group=keystone display-name=%{GROUP} WSGIProcessGroup keystone-admin WSGIScriptAlias / /usr/bin/keystone-wsgi-admin WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On ErrorLogFormat "%{cu}t %M" ErrorLog /var/log/apache2/keystone.log CustomLog /var/log/apache2/keystone_access.log combined <Directory /usr/bin> Require all granted </Directory> </VirtualHost>Recursively change the ownership of the
/etc/keystonedirectory:# chown -R keystone:keystone /etc/keystone
Finalize the installation
ubuntu
Restart the Apache service and remove the default SQLite database:
# service apache2 restart # rm -f /var/lib/keystone/keystone.db
rdo
Start the Apache HTTP service and configure it to start when the system boots:
# systemctl enable httpd.service # systemctl start httpd.service
obs
Start the Apache HTTP service and configure it to start when the system boots:
# systemctl enable apache2.service # systemctl start apache2.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=3Replace
ADMIN_PASSwith the password used in thekeystone-manage bootstrapcommand in keystone-install-configure.