OpenStack wallaby installation - Basic Service grace installation

precondition

Before installing and configuring the image service, you must create a database, service credentials, and API endpoints.
To create a database, complete the following steps:

  1. Connect to the database server as root using the database access client
mysql -u root -p
  1. Create the grace database:
CREATE DATABASE glance;
  1. Grant correct access to the grace database (replace grace_dbpass with the appropriate password):
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
  IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
  IDENTIFIED BY 'GLANCE_DBPASS';

Exit the database access client.
Obtain administrator credentials to access administrator only CLI commands:

. admin-openrc

To create service credentials, complete the following steps:

  1. Create grace user:
openstack user create --domain default --password-prompt glance
  1. To add the administrator role to grace users and services:
openstack role add --project service --user glance admin
  1. Create grace service entity:
openstack service create --name glance \
  --description "OpenStack Image" image
  1. Create image service API endpoint:
openstack endpoint create --region RegionOne \
  image public http://controller:9292
openstack endpoint create --region RegionOne \
  image internal http://controller:9292
openstack endpoint create --region RegionOne \
  image admin http://controller:9292
Installing and configuring components

The default profile varies from release to release. You may need to add these sections and options instead of modifying existing sections and options. In addition, the ellipsis (...) in the configuration code snippet indicates the potential default configuration options that you should keep.

  1. Install package:
yum install openstack-glance

Reported that the dependent packages python3-pyxattr and python3-httplib2 could not be found

dnf --enablerepo=powertools install python3-pyxattr -y
dnf --enablerepo=powertools install python3-httplib2 -y

Hahaha, it's useless. I can't find all kinds of dependence

I searched the Internet to say that powertools is not turned on

yum install dnf-plugins-core
dnf config-manager --set-enabled powertools
dnf repolist
dnf repo-pkgs powertools list
yum update

It can be installed. It's not easy!!!
3. Edit the / etc / Grace / grace api.conf file and complete the following operations:
· in the [database] section, configure database access (replace grace_dbpass with the password selected for the image service database):

[database]
# ...
connection = mysql+pymysql://glance:GLANCE_DBPASS@controller/glance

·In the [keystone_authtoken] and [paste_deploy] sections, configure the identity service access:
Replace grace with the password you selected for the grace user in the identity service_ PASS.
Comment out or delete any other options in the [keystone_authtoken] section.

[keystone_authtoken]
# ...
www_authenticate_uri  = http://controller:5000
auth_url = http://controller:5000
memcached_servers = controller:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = GLANCE_PASS

[paste_deploy]
# ...
flavor = keystone

In the [grace_store] section, configure the location of local file system storage and image files:

[glance_store]
# ...
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

Populate the image service database (ignore any deprecated messages in this output):

su -s /bin/sh -c "glance-manage db_sync" glance

Complete installation

systemctl enable openstack-glance-api.service
systemctl start openstack-glance-api.service

Tags: OpenStack Distribution Cloud Native

Posted on Mon, 20 Sep 2021 08:31:55 -0400 by haynest