Glance搭建
- 根据平台安装步骤安装至镜像服务,在控制节点使用提供的脚本 iaas-install-glance.sh 安装 glance 组件。使用镜像文件 CentOS_7.2_x86_64_XD.qcow2 创建 glance 镜像名为 CentOS7.2,格式为 qcow2, 将操作命令和执行结果提交到答题框。
(glance help image-create)
[root@controller images]# glance image-create --name "CentOS7.2" --disk-format qcow2 --container-format bare --progress < /opt/iaas/images/CentOS_7.2_x86_64_XD.qcow2
2.使用 glance 相关命令查询 glance 镜像列表,并查询 CentOS7.2 镜像的详 细信息,将操作命令和返回结果提交到答题框。
[root@controller images]# glance image-list
+--------------------------------------+-----------+
| ID | Name |
+--------------------------------------+-----------+
| 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc | CentOS7.2 |
+--------------------------------------+-----------+
[root@controller images]# glance image-show 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ea197f4c679b8e1ce34c0aa70ae2a94a |
| container_format | bare |
| created_at | 2018-10-15T17:26:15Z |
| disk_format | qcow2 |
| id | 6e1e8ce1-4776-4829-86c1-56f8cf5bffcc |
| min_disk | 0 |
| min_ram | 0 |
| name | CentOS7.2 |
| owner | d1d35ea03fc04a49884980dc3ffe5083 |
| protected | False |
| size | 400752640 |
| status | active |
| tags | [] |
| updated_at | 2018-10-15T17:26:19Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
[root@controller images]#mysql –uroot –p000000
[root@controller images]#SHOW DATABASES;
[root@controller images]#USE glance
[root@controller images]#SHOW TABLES;
[root@controller images]#SELECT * FROM images;
3.使用 systemctl 相关命令,在一条命令中查询 glance 组件中所有服务的状 态信息,将操作命令和返回结果以文本形式提交到答题框.
[root@controller /]# systemctl status openstack-glance-registry.service openstack-glance-api.service
â— openstack-glance-registry.service - OpenStack Image Service (code-named Glance) Registry server
Loaded: loaded (/usr/lib/systemd/system/openstack-glance-registry.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-10-15 13:18:00 EDT; 1h 10min ago
Main PID: 5119 (glance-registry)
CGroup: /system.slice/openstack-glance-registry.service
├─5119 /usr/bin/python2 /usr/bin/glance-registr...
├─5138 /usr/bin/python2 /usr/bin/glance-registr...
└─5139 /usr/bin/python2 /usr/bin/glance-registr...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
Oct 15 13:18:01 controller glance-registry[5119]: /usr/lib...
Oct 15 13:18:01 controller glance-registry[5119]: return p...
â— openstack-glance-api.service - OpenStack Image Service (code-named Glance) API server
Loaded: loaded (/usr/lib/systemd/system/openstack-glance-api.service; enabled; vendor preset: disabled)
Active: active (running) since Mon 2018-10-15 13:18:00 EDT; 1h 10min ago
Main PID: 5118 (glance-api)
CGroup: /system.slice/openstack-glance-api.service
├─5118 /usr/bin/python2 /usr/bin/glance-api
├─5140 /usr/bin/python2 /usr/bin/glance-api
└─5141 /usr/bin/python2 /usr/bin/glance-api
Oct 15 13:18:01 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:18:01 controller glance-api[5118]: return pkg_re...
Oct 15 13:26:15 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:15 controller glance-api[5118]: expire_on_com...
Oct 15 13:26:19 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:19 controller glance-api[5118]: self._verify_...
Oct 15 13:26:19 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:26:19 controller glance-api[5118]: self.image.ex...
Oct 15 13:35:54 controller glance-api[5118]: /usr/lib/pyth...
Oct 15 13:35:54 controller glance-api[5118]: expire_on_com...
Hint: Some lines were ellipsized, use -l to show in full.
今天的文章Glance搭建分享到此就结束了,感谢您的阅读。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/9424.html