本文共 1964 字,大约阅读时间需要 6 分钟。
Glance镜像服务
1、Glance-api:接受云系统镜像的创建、删除、读取请求。2、Glance-Registry:镜像的注册3、镜像的存储9191端口注册 9292 api
安装命令yum install openstack-glance -yAPi配置vim /etc/glance/glance-api.conf [database]connection = mysql+pymysql://glance:glance@192.168.56.11/glance[keystone_authtoken]
auth_uri = auth_url = memcached_servers = 192.168.56.11:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance[paste_deploy]
flavor = keystone[glance_store]
stores = file,httpdefault_store = filefilesystem_store_datadir = /var/lib/glance/images/注册配置
vim /etc/glance/glance-registry.conf[database]connection = mysql+pymysql://glance:glance@192.168.56.11/glance[keystone_authtoken]
auth_uri = auth_url = memcached_servers = 192.168.56.11:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance[paste_deploy]
flavor = keystone初始化数据库
su -s /bin/sh -c "glance-manage db_sync" glance注册到keystone
source /etc/keystone/admin-openrc创建glance用户openstack user create --domain default --password=glance glance添加为service项目的admin角色openstack role add --project service --user glance admin启动服务
systemctl enable openstack-glance-api.service openstack-glance-registry.servicesystemctl start openstack-glance-api.service openstack-glance-registry.service在openstack上面注册
openstack service create --name glance --description "OpenStack Image" imageopenstack endpoint create --region RegionOne image public openstack endpoint create --region RegionOne image internal openstack endpoint create --region RegionOne image admin查看glance是否成功
glance image-listsource /etc/keystone/admin-openrc下载镜像wget 创建镜像openstack image create "cirros" \--file cirros-0.3.4-x86_64-disk.img \--disk-format qcow2 --container-format bare \--public查看镜像glance image-list具体镜像位置cd /var/lib/glance/images转载于:https://blog.51cto.com/13491150/2056603