OpenStack安装步骤(图解)【2】

本文详细介绍了glance安装及配置过程,包括使用apt-get安装glance,通过mysql添加数据库,更新glance-api-paste.ini文件,配置glance-api.conf和glance-registry.conf,以及上传测试图像和文件。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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


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


Uploadthe initrd.


Uploadthe image.


这些语句中环境变量太多,重复操作比较多,在根目录下增加环境变量文件openrc


查看image列表








评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值