Controller节点glance安装部分
Apt-get install glance
Rm /var/lib/glance/glance.sqlite
在mysql中添加glance
$ mysql -u root –p(密码是passwd)
mysql> CREATE DATABASEglance;
mysql> GRANT ALL ON glance.* TO 'glance'@'%'IDENTIFIED BY
'[YOUR_GLANCEDB_PASSWORD]';(密码也设置成了passwd)
mysql> quit
在/etc/glance/glance-api-paste.ini中更新[filter:authtoken]下的内容:
[filter:authtoken]
admin_tenant_name = service
admin_user = glance
admin_password = glance
Add this to the end of /etc/glance/glance-api.conf.
[paste_deploy]
flavor = keystone
重启glance-api
Service glance-api restart
Add this to the end of /etc/glance/glance-registry.conf.
[paste_deploy]
flavor = keystone
Update /etc/glance/glance-registry-paste.ini, configure the admin_* values
under [filter:authtoken]:
[filter:authtoken]
admin_tenant_name = service
admin_user = glance
admin_password = glance
Ensure that the glance-registry pipeline section includesauthtoken:
[pipeline:glance-registry]
#pipeline = contextregistryapp
# NOTE: use the followingpipeline for keystone
pipeline = authtoken auth-context context registryapp
在/etc/glance/glance-registry.conf中改sql_connection方式:
sql_connection =mysql://glance:yourpassword@192.168.3.6/glance(密码为passwd)
同步并重启glance
#service glance-registry restart
#service glance-api restart
![](https://img-my.csdn.net/uploads/201303/16/1363369256_7082.png)
Obtaina test image.
mkdir /tmp/images
cd /tmp/images/
wgethttp://smoser.brickies.net/ubuntu/ttylinux-uec/ttylinux-uec-amd64-12.
1_2.6.35-22_1.tar.gz
tar -zxvfttylinux-uec-amd64-12.1_2.6.35-22_1.tar.gz
Uploadthe kernel
![](https://img-my.csdn.net/uploads/201303/16/1363369387_9663.png)
Uploadthe initrd.
Uploadthe image.
![](https://img-my.csdn.net/uploads/201303/16/1363369431_6673.png)
这些语句中环境变量太多,重复操作比较多,在根目录下增加环境变量文件openrc
![](https://img-my.csdn.net/uploads/201303/16/1363369470_3546.png)
查看image列表