-
下载安装
-
git clone -b stable/icehouse https://github.com/openstack/glance.git
pip install -r requirements.txt
python setup.py install
yum install gcc libffi-devel python-devel openssl-devel
-
glance架构
-
配置glance数据库连接
glance-api.conf、glance-registry.conf,mysql://glance:openstack@controller0/glance
mysql -uroot -popenstack -e "CREATE DATABASE glance;"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'openstack';"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'controller0' IDENTIFIED BY 'openstack';"
mysql -uroot -popenstack -e "GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'openstack';"
mkdir /etc/glance
mkdir /var/log/glance
mkdir /var/lib/glance
pip install mysql-python
glance-manage db_sync
-
创建用户角色服务endpoint等
参考:
-
修改glance api 和 register 配置文件,参考:如上。
-
启动glance的两个服务,glance-api、glance-registry。
glance-control all start
监听端口分别是9191、9292。
-
安装glance-client
-
pip install -r requirements.txt
python setup.py install
-
上传查看镜像
glance image-create --progress --name="CirrOS 0.3.0" --disk-format=qcow2 --container-format=ovf --is-public=true < image/cirros-0.3.0-x86_64-disk.img
glance image-list
wget https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img
wget http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img
glance image-create --name "cirros-0.3.0-x86_64" --file IMG_DIR/cirros-0.3.0-x86_64-disk.img --disk-format qcow2 --container-format ovf --is-public=true –progress
glance image-download --file img-download-test/cirros-0.3.0-x86_64.img cirros-0.3.0-x86_64
https://raymii.org/s/tutorials/Openstack_Glance_Image_Download.html
-
-
Glance源码分析
-
对接swift
-
默认存储后端:文件系统-FileSystem
-
对接swift参考swift详解相关章节
-
【OpenStack】OpenStack系列4之Glance详解
最新推荐文章于 2022-06-05 19:48:34 发布