照着官网来安装openstack pike之glance安装
镜像服务image service(glance)的安装还是在控制节点上进行:
# mysql -u root -p
MariaDB [(none)]> CREATE DATABASE glance;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY 'glance';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%'IDENTIFIED BY 'glance';
2、在为glance在keystone上创建用户项目等时,需要先连接keystone,这里使用keystone的admin账号来登录
# source admin-openrc
然后在创建glance用户:
# openstack user create --domain default --password-prompt glance
输入密码:glance

# openstack role add --project service --user glance admin
为glance创建服务实体:
# openstack service create --name glance --description "OpenStack Image" image

# openstack endpoint create --region RegionOne image public http://192.168.101.10:9292
# openstack endpoint create --region RegionOne image internal http://192.168.101.10:9292
# openstack endpoint create --region RegionOne image admin http://192.168.101.10:9292
安装和配置glance:
# yum install openstack-glance
修改配置文件:/etc/glance/glance-api.conf,在[database]部分:
connection = mysql+pymysql://glance:glance@192.168.101.10/glance
在[keystone_authtoken]和[paste_deploy]分别做如下设置:
[keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance [paste_deploy]
flavor = keystone
在[glance_store]部分设置一个本地文件系统用来存储本地镜像:
[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:glance@192.168.101.10/glance
在[keystone_authtoken]和[paste_deploy]配置如下内容:
[keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance [paste_deploy]
flavor = keystone
向glance库导入填充数据:
# su -s /bin/sh -c "glance-manage db_sync" glance
Ignore any deprecation messages in this output.

# systemctl enable openstack-glance-api.service openstack-glance-registry.service
# systemctl start openstack-glance-api.service openstack-glance-registry.service
校验glance:校验image service是否安装成功?
# source admin-openrc
# wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
# openstack image create "cirros" --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public
上传镜像到镜像服务上,使用格式qcow2磁盘格式,权限为public,所有的项目都能访问它

# openstack image list 查看镜像列表

至此glance的image service组件安装成功
贴出glance两个配置文件的配置:
1、/etc/glance/glance-api.conf
[root@node1 ~]# egrep -v "^$|^#" /etc/glance/glance-api.conf
[DEFAULT]
[cors]
[database]
connection = mysql+pymysql://glance:glance@192.168.101.10/glance
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
[image_format]
[keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[matchmaker_redis]
[oslo_concurrency]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_middleware]
[oslo_policy]
[paste_deploy]
flavor = keystone
[profiler]
[store_type_location_strategy]
[task]
[taskflow_executor]
2、配置文件/etc/glance/glance-registry.conf
[root@node1 ~]# egrep -v "^$|^#" /etc/glance/glance-registry.conf
[DEFAULT]
[database]
connection = mysql+pymysql://glance:glance@192.168.101.10/glance
[keystone_authtoken]
auth_uri = http://192.168.101.10:5000
auth_url = http://192.168.101.10:35357
memcached_servers = 192.168.101.10:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[matchmaker_redis]
[oslo_messaging_amqp]
[oslo_messaging_kafka]
[oslo_messaging_notifications]
[oslo_messaging_rabbit]
[oslo_messaging_zmq]
[oslo_policy]
[paste_deploy]
flavor = keystone
[profiler]
照着官网来安装openstack pike之glance安装的更多相关文章
- 照着官网来安装openstack pike之nova安装
nova组件安装分为控制节点和计算节点,还是先从控制节点安装 1.前提条件,数据库为nova创建库和账户密码来连接数据库 # mysql -u root -p MariaDB [(none)]> ...
- 照着官网来安装openstack pike之keystone安装
openstack基础环境安装完成后,现在开启安装keystone服务(在控制节点上执行下面所有操作) 1.为keystone创建数据库 mysql -u root -p MariaDB [(none ...
- 照着官网来安装openstack pike之neutron安装
neutron组件安装分为控制节点和计算节点,还是先从控制节点安装 1.前提条件,数据库为nova创建库和账户密码来连接数据库 # mysql -u root -p MariaDB [(none)]& ...
- 照着官网来安装openstack pike之创建并启动instance
有了之前组件(keystone.glance.nova.neutron)的安装后,那么就可以在命令行创建并启动instance了 照着官网来安装openstack pike之environment设置 ...
- openstack pike 单机 一键安装 shell
#openstack pike 单机 centos 一键安装 shell #openstack pike 集群高可用 安装部署 汇总 http://www.cnblogs.com/elvi/p/7 ...
- 照着官网来安装openstack pike之environment设置
安装openstack前的准备环境: 两个centos7系统的环境:192.168.101.10 node1,192.168.101.11 node2 控制节点node1,计算节点node2 1.统一 ...
- 照着官网来安装openstack pike之安装dashboard
上文提到了利用命令行下使用openstack的命令来创建虚拟机,这里选择安装dashboard来安装基于web界面的openstack平台 利用dashboard界面来创建虚拟机 dashboard这 ...
- Devstack 安装OpenStack Pike版本(单机环境)
问题背景 最近在研究OpenStack的时候,需要对其源代码进行调试,公司服务器上部署的OpenStack环境又不能随意的进行折腾,为了研究的持续性和方便性,就决定再自己的虚拟机上面使用Devstac ...
- CentOS7安装OpenStack(Rocky版)-05.安装一个nova计算节点实例
上一篇文章分享了控制节点的nova计算服务的安装方法,在实际生产环境中,计算节点通常会安装一些单独的节点提供服务,本文分享单独的nova计算节点的安装方法 ---------------- 完美的分 ...
随机推荐
- 【BZOJ2525】[Poi2011]Dynamite 二分+树形DP
[BZOJ2525][Poi2011]Dynamite Description Byteotian Cave的结构是一棵N个节点的树,其中某些点上面已经安置了炸.药,现在需要点燃M个点上的引线引爆所有 ...
- Hibernate的时间戳缓存区域
时间戳:一个详细到秒的时间点,就是一个时分秒的字符串 时间戳缓存区域存放了对于查询结果相关的表进行插入, 更新或删除操作的时间戳. Hibernate 通过时间戳缓存区域来判断被缓存的查询结果是否过期 ...
- 从外部导入数据进MySQL
语法格式: LOAD DATA LOCAL INFILE 'E://test.txt' INTO TABLE test_table FIELDS TERMINATED BY ' ' #ENCLOSED ...
- Ubuntu 只能用guest登录的问题修复
方式1(推荐): 1.先进入guest登入 2.通过Ctrl+Alt+F1进入命令行窗口(注释:Ctrl+Alt+F1~F6进入终端命令行,Ctrl+Alt+F7是退出终端) 3.登录root,然后进 ...
- SpringBoot 配置文件 YML/Profile
1. 全局配置文件 application.properties application.yml 配置文件名是固定的; 配置文件存放在src/main/resources目录或者类路径/config下 ...
- How many---hdu2609(最小表示)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2609 给你n个01串,然后求这n个串中有几个不同的: 例如:1100 ,1001 ,0011 ,011 ...
- Apache mahout 源码阅读笔记--DataModel之FileDataModel
要做推荐,用户行为数据是基础. 用户行为数据有哪些字段呢? mahout的DataModel支持,用户ID,ItemID是必须的,偏好值(用户对当前Item的评分),时间戳 这四个字段 {@code ...
- redis哨兵集群、docker入门
redis-sentinel主从复制高可用 Redis-Sentinel Redis-Sentinel是redis官方推荐的高可用性解决方案,当用redis作master-slave的高可用时,如果m ...
- Unity3D优化技巧系列七
笔者介绍:姜雪伟,IT公司技术合伙人.IT高级讲师,CSDN社区专家,特邀编辑.畅销书作者,国家专利发明人;已出版书籍:<手把手教你架构3D游戏引擎>电子工业出版社和<Unity3D ...
- 联想yoga table2 1371f 进入bios 的巧妙方法
win8.1 的平板,无键盘,触屏失灵,接了个鼠标 我在这里向大家介绍最后一个方法<ignore_js_op>▲在metro界面下找到设置选项 <ignore_js_op> ...