Installation de la VM stockage-0
Cette VM héberge :
- glance pour les images
- cinder pour les volumes (type block)
Service Glance
Ce service sert à stocker les images “gold” et à les fournir à ceux qui les demandent (principalement les VMs).
Installation de Glance
Installer les paquets :
yum install openstack-glance python-memcached
Configuration de Glance
Pour configurer l'API glance, fichier /etc/glance/glance-api.conf :
[DEFAULT] [cors] [cors.subdomain] [database] connection = mysql+pymysql://glance:GLANCE_DBPASS@bdd/glance [glance_store] stores = file,http default_store = file filesystem_store_datadir = /var/lib/glance/images/ [image_format] [keystone_authtoken] auth_uri = http://controller.internal:5000 auth_url = http://controller.internal:35357 memcached_servers = controller.internal:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = glance password = glance [matchmaker_redis] [oslo_concurrency] [oslo_messaging_amqp] [oslo_messaging_notifications] [oslo_messaging_rabbit] [oslo_messaging_zmq] [oslo_middleware] [oslo_policy] [paste_deploy] flavor = keystone [profiler] [store_type_location_strategy] [task] [taskflow_executor]
Pour configurer le service de catalogue Glance, fichier /etc/glance/glance-registry.conf :
[DEFAULT] [database] connection = mysql+pymysql://glance:GLANCE_DBPASS@bdd/glance [keystone_authtoken] auth_uri = http://controller.internal:5000 auth_url = http://controller.internal:35357 memcached_servers = controller.internal:11211 auth_type = password project_domain_name = default user_domain_name = default project_name = service username = glance password = glance [matchmaker_redis] [oslo_messaging_amqp] [oslo_messaging_notifications] [oslo_messaging_rabbit] [oslo_messaging_zmq] [oslo_policy] [paste_deploy] flavor = keystone [profiler]
Pour initialiser la base de données :
su -s /bin/sh -c "glance-manage db_sync" glance
Activer et démarrer les services en rapport avec Glance :
systemctl enable openstack-glance-api openstack-glance-registry systemctl start openstack-glance-api openstack-glance-registry