penStack笔记三 Glance
2016-03-29 15:39
288 查看
1. 支持两种镜像存储机制
i. 简单文件系统
位于Glance节点,简单,无备份
ii. Swift服务存储镜像机制
有健壮的备份还原机制
2. 注册服务至Keystone
i. 注册用户
添加Glance用户,分配admin角色
ii. 注册Service和endpoint
用户通过Glance client访问Glance服务时,首先通过Keystone认证,Keystone会返回一个服务目录,包含Glance服务端点信息。
3. Glance数据库
创建Glance MySQL数据库,创建Glance用户并授权。
4.基本 配置文件
glance-api.conf 和glance-registry.conf
5.启动关闭,类似keystone
6.架构
api: 增删读查
adapter:storage vendor 相关
database:镜像位置属性成员
registry:镜像metadata
7. 镜像容器格式
8. Execise
hp@ubuntu:/workspace/devstack$ glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 792ed110-f62f-41c8-ae42-518e57ac8663 | cirros-0.3.4-x86_64-disk |
| 2f823e26-c2e6-47b2-bab4-094c802d9061 | cirros-0.3.4-x86_64-uec |
| b049e2af-a211-4bb4-9314-42d54333a02a | cirros-0.3.4-x86_64-uec-kernel |
| 6aba70e9-6db3-42de-9929-29c548a9be46 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
hp@ubuntu:/workspace/devstack$ wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
--2016-03-29 19:30:13-- http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
Resolving web-proxy.atlanta.hp.com (web-proxy.atlanta.hp.com)... 16.85.88.10
Connecting to web-proxy.atlanta.hp.com (web-proxy.atlanta.hp.com)|16.85.88.10|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 13287936 (13M) [text/plain]
Saving to: 'cirros-0.3.4-x86_64-disk.img'
100%[===================================================================================================================================================================>] 13,287,936 333KB/s in 53s
2016-03-29 19:31:06 (244 KB/s) - 'cirros-0.3.4-x86_64-disk.img' saved [13287936/13287936]
hp@ubuntu:/workspace/devstack$mv cirros-0.3.4-x86_64-disk.img
cirros-0.3.4-x86_64-disk_tx.img
hp@ubuntu:/workspace/devstack$ glance image-create --name cirros-0.3.4-x86_64-disk_tx.img --container-format bare --disk-format qcow2 --file cirros-0.3.4-x86_64-disk_tx.img
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2016-03-30T02:37:20Z |
| disk_format | qcow2 |
| id | 0772b4e1-166d-4b87-9e92-4f63cc22e472 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.4-x86_64-disk_tx.img |
| owner | 537ccf4452034c2a9cbc925c023a8c00 |
| protected | False |
| size | 13287936 |
| status | active |
| tags | [] |
| updated_at | 2016-03-30T02:37:41Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
hp@ubuntu:/workspace/devstack$ glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 792ed110-f62f-41c8-ae42-518e57ac8663 | cirros-0.3.4-x86_64-disk |
| 0772b4e1-166d-4b87-9e92-4f63cc22e472 | cirros-0.3.4-x86_64-disk_tx.img |
| 2f823e26-c2e6-47b2-bab4-094c802d9061 | cirros-0.3.4-x86_64-uec |
| b049e2af-a211-4bb4-9314-42d54333a02a | cirros-0.3.4-x86_64-uec-kernel |
| 6aba70e9-6db3-42de-9929-29c548a9be46 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
i. 简单文件系统
位于Glance节点,简单,无备份
ii. Swift服务存储镜像机制
有健壮的备份还原机制
2. 注册服务至Keystone
i. 注册用户
添加Glance用户,分配admin角色
ii. 注册Service和endpoint
用户通过Glance client访问Glance服务时,首先通过Keystone认证,Keystone会返回一个服务目录,包含Glance服务端点信息。
3. Glance数据库
创建Glance MySQL数据库,创建Glance用户并授权。
4.基本 配置文件
glance-api.conf 和glance-registry.conf
5.启动关闭,类似keystone
6.架构
api: 增删读查
adapter:storage vendor 相关
database:镜像位置属性成员
registry:镜像metadata
7. 镜像容器格式
8. Execise
hp@ubuntu:/workspace/devstack$ glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 792ed110-f62f-41c8-ae42-518e57ac8663 | cirros-0.3.4-x86_64-disk |
| 2f823e26-c2e6-47b2-bab4-094c802d9061 | cirros-0.3.4-x86_64-uec |
| b049e2af-a211-4bb4-9314-42d54333a02a | cirros-0.3.4-x86_64-uec-kernel |
| 6aba70e9-6db3-42de-9929-29c548a9be46 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
hp@ubuntu:/workspace/devstack$ wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
--2016-03-29 19:30:13-- http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
Resolving web-proxy.atlanta.hp.com (web-proxy.atlanta.hp.com)... 16.85.88.10
Connecting to web-proxy.atlanta.hp.com (web-proxy.atlanta.hp.com)|16.85.88.10|:8080... connected.
Proxy request sent, awaiting response... 200 OK
Length: 13287936 (13M) [text/plain]
Saving to: 'cirros-0.3.4-x86_64-disk.img'
100%[===================================================================================================================================================================>] 13,287,936 333KB/s in 53s
2016-03-29 19:31:06 (244 KB/s) - 'cirros-0.3.4-x86_64-disk.img' saved [13287936/13287936]
hp@ubuntu:/workspace/devstack$mv cirros-0.3.4-x86_64-disk.img
cirros-0.3.4-x86_64-disk_tx.img
hp@ubuntu:/workspace/devstack$ glance image-create --name cirros-0.3.4-x86_64-disk_tx.img --container-format bare --disk-format qcow2 --file cirros-0.3.4-x86_64-disk_tx.img
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | ee1eca47dc88f4879d8a229cc70a07c6 |
| container_format | bare |
| created_at | 2016-03-30T02:37:20Z |
| disk_format | qcow2 |
| id | 0772b4e1-166d-4b87-9e92-4f63cc22e472 |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.4-x86_64-disk_tx.img |
| owner | 537ccf4452034c2a9cbc925c023a8c00 |
| protected | False |
| size | 13287936 |
| status | active |
| tags | [] |
| updated_at | 2016-03-30T02:37:41Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
hp@ubuntu:/workspace/devstack$ glance image-list
+--------------------------------------+---------------------------------+
| ID | Name |
+--------------------------------------+---------------------------------+
| 792ed110-f62f-41c8-ae42-518e57ac8663 | cirros-0.3.4-x86_64-disk |
| 0772b4e1-166d-4b87-9e92-4f63cc22e472 | cirros-0.3.4-x86_64-disk_tx.img |
| 2f823e26-c2e6-47b2-bab4-094c802d9061 | cirros-0.3.4-x86_64-uec |
| b049e2af-a211-4bb4-9314-42d54333a02a | cirros-0.3.4-x86_64-uec-kernel |
| 6aba70e9-6db3-42de-9929-29c548a9be46 | cirros-0.3.4-x86_64-uec-ramdisk |
+--------------------------------------+---------------------------------+
相关文章推荐
- <响应式布局>1---响应式布局介绍
- 机器学习经典书籍
- (四)RxJava操作符:zip数据合并操作
- 首页样式
- 【Linux驱动】字符设备驱动
- 机器学习 深度学习 计算机视觉 开源代码总结
- android 应用重启系统 需要系统签名
- eclipse搭建python开发环境
- 首页样式
- 首页样式
- .NET使用Com组件的一点点教训笔记~
- cgi和fastcgi
- 安卓蓝牙4.0开发之主从机代码
- Python报错TypeError: 'str' object is not callable
- 查看 yum 安装软件包的路径
- swift 将闭包声明属性使用
- ubuntu15.04下Matlab R2012a的安装和GCC4.6配置
- 某远程代码执行漏洞影响超过70个不同的CCTV-DVR供应商的漏洞分析
- 在Eclipse中遇到The type XXX cannot be resolved. It is indirectly referenced from required .class files错误
- linux 块设备驱动(二)——块设备数据结构