openstack云计算组件glance部署及操作步骤
目录
- 一 简单架构图示参考
- 二 部署glance
- step 1:glance关于数据库的操作
- step 2:glance关于keystone的操作
- step 3:安装软件包
- step 4:配置/etc/glance/glance.conf
- step 5: 初始化数据库glance
- step 6:启动glance且设置开机启动
- 三 验证
一 简单架构图示参考

二 部署glance
yum install memcached python-memcached
systemctl enable memcached.service
systemctl start memcached.service
step 1:glance关于数据库的操作
mysql -u root -p #登入数据库 CREATE DATABASE glance; #新建库keystone GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \ IDENTIFIED BY '123'; #新建本地访问glance库的账号 GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \ IDENTIFIED BY '123'; #新建远程访问glance库的账号
step 2:glance关于keystone的操作
soure admin-openrc #执行管理员脚本 #为glance的使用者创建用户 openstack user create --domain default --password-prompt glance #对glance-service添加role角色,提示:用户glance只有在一个确定的项目service内才有角色的概念,单独的用户或者单独的项目都是无法绑定角色的。 openstack role add --project service --user glance admin #创建glance服务的catalog:service+endpoint openstack service create --name glance \ --description "OpenStack Image" image openstack endpoint create --region RegionOne \ image public http://192.168.31.57:9292 openstack endpoint create --region RegionOne \ image internal http://192.168.31.57:9292 openstack endpoint create --region RegionOne \ image admin http://192.168.31.57:9292
step 3:安装软件包
yum -y install openstack-glance
step 4:配置/etc/glance/glance.conf
大前提:每一条配置都应该新增到文件中,一定不要打开注释在原有的基础上修改。
创建本地存储:
1.一定要在opesntack-glance-api.service服务启动之前部署好存储设备,因为该服务在启动时会加载存储驱动检索存储设备,如果事先不存在,就意味着该服务没有识别到任何可用的存储设备,即便是后来你又新增了存储,仍然是无效的,最终导致你上传镜像失败;
2.一定要赋予opesntack-glance-api.service服务对存储设备的可写权限。
mkdir -p /var/lib/glance/images chown -R glance.glance /var/lib/glance/images
配置/etc/glance/glance-api.conf
[database] connection = mysql+pymysql://glance:123@192.168.31.57/glance [keystone_authtoken] auth_uri = http://192.168.31.57:5000 auth_url = http://192.168.31.57:35357 memcached_servers = 192.168.31.57:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = glance password = 123 [paste_deploy] flavor = keystone [glance_store] stores = file,http default_store = file filesystem_store_datadir = /var/lib/glance/images/
配置/etc/glance/glance-registry.conf
[database] connection = mysql+pymysql://glance:123@192.168.31.57/glance [keystone_authtoken] auth_uri = http://192.168.31.57:5000 auth_url = http://192.168.31.57:35357 memcached_servers = 192.168.31.57:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = glance password = 123 [paste_deploy] flavor = keystone
step 5: 初始化数据库glance
su -s /bin/sh -c "glance-manage db_sync" glance ''' 忽略以下打印,此乃正常性行为: Option "verbose" from group "DEFAULT" is deprecated for removal. Its value may be silently ignored in the future. /usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1171:...... oslo_db.sqlalchemy.enginefacade ...... a future release.") result = self._query(query) '''
step 6:启动glance且设置开机启动
systemctl enable openstack-glance-api.service \ openstack-glance-registry.service systemctl start openstack-glance-api.service \ openstack-glance-registry.service
三 验证
source admin-openrc #如果没有wget则必须yum -y install wget wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img openstack image create "cirros" \ --file cirros-0.3.4-x86_64-disk.img \ --disk-format qcow2 --container-format bare \ --public openstack image list
For information about the openstack image create parameters, see Create or update an image (glance) in the OpenStack User Guide.
For information about disk and container formats for images, see Disk and container formats for images in the OpenStack Virtual Machine Image Guide.
以上就是openstack云计算之glance部署及操作步骤的详细内容,更多关于openstack云计算glance部署操作的资料请关注其它相关文章!
栏 目:其它服务器
下一篇:docker从安装入门到应用部署及私有仓库搭建基础命令
本文标题:openstack云计算组件glance部署及操作步骤
本文地址:https://zz.feitang.co/server/32374.html
您可能感兴趣的文章
- 12-20Kubernetes中使用临时容器进行故障排查的方法
- 12-20Nginx设置HTTPS的方法步骤
- 12-20二进制方式安装 Kubernetes1.18.3版本实现脚本
- 12-20Nginx工作模式及代理配置的使用细节
- 12-20ZooKeeper分布式协调服务设计核心概念及安装配置
- 12-20Kubernetes部署可视化地图的十个步骤
- 12-20关于docker清理Overlay2占用磁盘空间的问题(亲测有效)
- 12-20Docker compose配置文件写法及命令使用示例
- 12-20openwrt安装docker并启动的操作方法
- 12-20云原生Kubernetes初始化容器Init使用教程


阅读排行
推荐教程
- 12-07一文教你怎么选择Tomcat对应的JDK版本
- 12-07新版Eclipse集成Tomcat时找不到server选项的解决方法
- 12-06IIS7 应用程序池自动回收关闭的解决方案
- 12-05Windows Server 2019安装VMware
- 12-05Windows服务器默认IE浏览器无法下载文件的解决方法
- 12-05Docker安装Jenkins全过程
- 12-19Zabbix SAML SSO 登录绕过漏洞的操作流程
- 12-15Docker-Compose搭建Spark集群的实现方法
- 12-14Docker Desktop无法正常启动解决(failed to start...)
- 12-14k8s 与docker空间使用分析与清理方法





