部署版本:pike
部署环境:CentOS7.6
配置文件中所有controller可修改为控制节点ip地址
配置过程中使用 echo $?
验证命令执行情况
Image Service
图像服务glance
映像服务(glance)使用户能够发现、注册和检索虚拟机映像。它提供了一个REST API,能够查询虚拟机映像元数据并检索实际映像。可以将通过映像服务提供的虚拟机映像存储在各种位置,从简单的文件系统到对象存储系统(如OpenStack对象存储)。
一、先决条件
在安装和配置映像服务之前,必须创建数据库、服务凭据和API端点。
1.创建数据库root访问数据库
[root@controller /]# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.
创建glance数据库
MariaDB [(none)]> CREATE DATABASE glance;
Query OK, 1 row affected (0.00 sec)
授予对glance数据库的正确访问权限:
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'controller' \
-> IDENTIFIED BY 'qwer1234';
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
-> IDENTIFIED BY 'qwer1234';
Query OK, 0 rows affected (0.00 sec)
2.执行 admin 凭据 获得仅限管理员的CLI命令:
[root@controller /]# source /etc/openrc/admin-openrc.sh
3.创建服务凭据
创建glance用户
[root@controller /]# openstack user create --domain default --password-prompt glance
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 3882fd00aaed4e9e8d60c34d57408223 |
| name | glance |
| options | {
} |