一、glance组件

提供镜像服务

两个核心服务

glance-api服务 接受上传、删除修改镜像的请求

glance-registry服务 保存镜像文件的元数据信息(名称、大小、类型)

二、在contoller节点安装glance服务

元数据信息要保存在数据库

1.创建数据库

  1. [root@controller ~]# mysql -uroot -p
  2. MariaDB [(none)]> create database glance;
  3. Query OK, 1 row affected (0.001 sec)
  4. MariaDB [(none)]> show databases;

image.png

2.创建两个授权用户

一个允许本地主机登录,一个允许远程所有主机登录

  1. MariaDB [(none)]> grant all on glance.* to 'glance'@'localhost' identified by 'redhat';
  2. Query OK, 0 rows affected (0.001 sec)
  3. MariaDB [(none)]> grant all on glance.* to 'glance'@'%' identified by 'redhat';