Ubuntu 14.04一步一步安装Openstack Kilo版本-8(glance)
2015-06-09 11:18
477 查看
8.1. 创建数据库
mysql -u root -pcreate database glance;
grant all privileges on glance.* to'glance'@'kilo' identified by 'glance_dbpass';
grant all privileges on glance.* to'glance'@'localhost' identified by 'glance_dbpass';
grant all privileges on glance.* to'glance'@'%' identified by 'glance_dbpass';
exit
8.2. 创建认证服务
source admin-openrc.shopenstack user create --password-promptglance
User Password:(填写密码:glance_pass)
Repeat User Password:
+----------+----------------------------------+
| Field | Value |
+----------+----------------------------------+
| email | None |
| enabled | True |
| id | d0962c616ca645ca87916abc709e3195 |
| name | glance |
| username |glance |
+----------+----------------------------------+
openstack role add --project service --userglance admin
+-------+----------------------------------+
| Field |Value |
+-------+----------------------------------+
| id | 14b826a870464c67900a963d675cc8cb |
| name | admin |
+-------+----------------------------------+
openstack service create --name glance--description "Openstack Image Service" image
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description |Openstack Image Service |
| enabled | True |
| id | ae5bda0ebc10479ca156cb975c3a2eab |
| name | glance |
| type | image |
+-------------+----------------------------------+
8.3. 创建镜像服务API endpoint
openstack endpoint create --publicurlhttp://kilo:9292 --internal http://kilo:9292 --adminurl http://kilo:9292--region RegionOne image+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| adminurl | http://kilo:9292 |
| id | 43f4c5ce46744da29a33cabad834f6fa |
|internalurl | http://kilo:9292 |
| publicurl | http://kilo:9292 |
| region | RegionOne |
| service_id | ae5bda0ebc10479ca156cb975c3a2eab |
| service_name |glance |
| service_type |image |
+--------------+----------------------------------+
8.4. 安装glance
sudo apt-get install glancepython-glanceclient -y8.5. 配置glance
sudo vim /etc/glance/glance-api.conf[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection =mysql://glance:glance_dbpass@kilo/glance
[keystone_authtoken]
auth_uri = http://kilo:5000
auth_url = http://kilo:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance_pass
revocation_cache_time = 10
[paste_deploy]
flavor=keystone
[glance_store]
default_store = file
filesystem_store_datadir =/var/lib/glance/images/
sudo vim /etc/glance/glance-registry.conf
[DEFAULT]
notification_driver = noop
verbose = True
[database]
connection =mysql://glance:glance_dbpass@kilo/glance
[keystone_authtoken]
auth_uri = http://kilo:5000
auth_url = http://kilo:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = glance_pass
[paste_deploy]
flavor=keystone
8.6. 同步数据库
sudo bash -c "glance-managedb_sync" glance8.7. 重启服务
sudo rm -f /var/lib/glance/glance.sqlitesudo service glance-api restart
sudo service glance-registry restart
8.8. glance安装验证
8.8.1. 在每一个客户端脚本,配置镜像服务客户端使用 APIversion 2.0
echo "exportOS_IMAGE_API_VERSION=2" | tee -a admin-openrc.sh demo-openrc.shsource admin-openrc.sh
8.8.2. 下载镜像
wgethttp://download.cirros-cloud.net/0.3.3/cirros-0.3.3-x86_64-disk.img8.8.3. 上传镜像
glance image-create --name"cirros-0.3.3-x86_64" --file cirros-0.3.3-x86_64-disk.img--disk-format qcow2 --container-format bare --visibility public --progress+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum |133eae9fb1c98f45894a4e60d8736619 |
|container_format | bare |
| created_at | 2015-05-25T06:46:43Z |
|disk_format | qcow2 |
| id |e056a34b-8226-4885-9b30-982dbf36a5dc |
| min_disk | 0 |
| min_ram | 0 |
| name | cirros-0.3.3-x86_64 |
| owner |9e4ff200c6994bd6bd6e589c21afa2f8 |
| protected | False |
| size | 13200896 |
| status | active |
| tags | [] |
| updated_at | 2015-05-25T06:46:44Z |
|virtual_size | None |
| visibility | public |
+------------------+--------------------------------------+
8.8.4. 确认成功
+--------------------------------------+---------------------+-------------+------------------+----------+--------+| ID | Name | Disk Format | Container Format |Size | Status |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
|e056a34b-8226-4885-9b30-982dbf36a5dc | cirros-0.3.3-x86_64 | qcow2 | bare | 13200896 | active |
+--------------------------------------+---------------------+-------------+------------------+----------+--------+
相关文章推荐
- 百度移动mobile type升级:自适应网站受捧
- linux 用户空间与内核空间——高端内存详解
- Powershell Set-ScheduledTaskCredential
- UVa 10271 Chopsticks
- 使用Docker做开发的建议团队工作流
- Ubuntu 14.04一步一步安装Openstack Kilo版本-7(keystone)
- @property 和@synthesize
- 系统管理员神器 monit 监控报警设置方法
- 04Top K算法问题
- linux awk命令详解---sql语句对等awk语句
- Bean property 'manualPaperService' is not writable or has an invalid setter method. Did you mean 'ma
- Linux 硬链接 软连接
- Ubuntu 12.04 x64 busybox
- Ubuntu 14.04一步一步安装Openstack Kilo版本-6(rabbitmq)
- 使用Topshelf创建Windows 服务
- apache rewrite与options multiviews不得不说的秘密
- linux中ps命令的用法说明
- linux awk命令详解---sql语句对等awk语句
- Unreal Open Day游记
- linux 查看程序是否运行