Install OpenStack services
Prerequisites
mysql -u root -p
ROOT_DBPASS
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS';
exit
. admin-openrc
openstack user create --domain default --password GLANCE_PASS glance
openstack role add --project service --user glance admin
openstack service create --name glance --description "OpenStack Image" image
openstack endpoint create --region RegionOne image public http://ctr01:9292
openstack endpoint create --region RegionOne image internal http://ctr01:9292
openstack endpoint create --region RegionOne image admin http://ctr01:9292
dnf -y install openstack-glance
cp -p /etc/glance/glance-api.conf{,_org}
ls -l /etc/glance/glance-api.conf*
cat << EOF > /etc/glance/glance-api.conf
[database]
connection = mysql+pymysql://glance:GLANCE_DBPASS@ctr01/glance
[keystone_authtoken]
www_authenticate_uri = http://ctr01:5000
auth_url = http://ctr01:5000
memcached_servers = ctr01:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = GLANCE_PASS
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
EOF
cat /etc/glance/glance-api.conf
su -s /bin/sh -c "glance-manage db_sync" glance
Finalize installation
systemctl enable --now openstack-glance-api.service
systemctl status --no-pager -l openstack-glance-api.service
systemctl is-active openstack-glance-api.service
systemctl is-enabled openstack-glance-api.service