欢迎来到尧图网

客户服务 关于我们

您的位置:首页 > 新闻 > 国际 > 离线部署openstack 2024.1 glance

离线部署openstack 2024.1 glance

2025/12/14 9:29:13 来源:https://blog.csdn.net/hy19930118/article/details/133979034  浏览:    关键词:离线部署openstack 2024.1 glance

镜像服务

离线下载

apt install --download-only glancemkdir /controller/glance
mv /var/cache/apt/archives/*.deb /controller/glance/
dpkg -i /controller/glance/*.deb

在一个控制节点操作

CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'GLANCE_DBPASS';
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'GLANCE_DBPASS';
FLUSH PRIVILEGES;
source ~/admin-openrcopenstack user create --domain default --password GLANCE_PASS glance
openstack role add --project service --user glance adminopenstack service create --name glance --description "OpenStack Image" imageopenstack endpoint create --region RegionOne image public http://<VIP>:9292
openstack endpoint create --region RegionOne image internal http://<VIP>:9292
openstack endpoint create --region RegionOne image admin http://<VIP>:9292

在三个控制节点操作

  • 确保文件在节点可用:
  • /etc/ceph/ceph.conf
  • /etc/ceph/client.glance.keyring
chown glance:glance /etc/ceph/ceph.client.glance.keyring
chmod 640 /etc/ceph/ceph.client.glance.keyring
  • 主要配置
vim /etc/glance/glance-api.conf[database]
connection = mysql+pymysql://glance:GLANCE_DBPASS@<VIP>/glance[keystone_authtoken]
www_authenticate_uri = http://<VIP>:5000
auth_url = http://<VIP>:5000
memcached_servers = ip1:11211,ip2:11211,ip3:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = GLANCE_PASS
service_token_roles_required = true
service_token_roles = admin
region_name = RegionOne[paste_deploy]
# 启用keystone认证
flavor = keystone[glance_store]
# 指定后端类型:ceph块设备、url导入
stores = rbd,http
default_store = rbdrbd_store_chunk_size = 8
# 存放镜像的pool
rbd_store_pool = images
# ceph授权的用户名
rbd_store_user = glance
# ceph的主配置文件路径
rbd_store_ceph_conf = /etc/ceph/ceph.conf[DEFAULT]
# 本机IP,其余节点填对应IP
bind_host = ip1
bind_port = 9292
transport_url = rabbit://glance:GLANCE_PASS@ip1,ip2,ip3[oslo_concurrency]
lock_path = /var/lib/glance/tmp

在一个控制节点操作

# 数据库同步
su -s /bin/sh -c "glance-manage db_sync" glance

在三个控制节点操作

systemctl start glance-api && systemctl enable glance-api
systemctl status glance-apisource ~/admin-openrc
openstack image list

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com

热搜词