Openstack(Kilo)安装系列之glance(六)
安装配置
Before you install and configure the Image service, you must create a database, service credentials, and API endpoint.
一、创建glance数据库并授权
1.登陆数据库
mysql -u root -p
2.创建数据库并授权
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';
Replace GLANCE_DBPASS with a suitable password.
3.Source the admin credentials to gain access to admin-only CLI commands:
source admin-openrc.sh
4.To create the service credentials, complete these steps:
Create the glance user:
openstack user create --password-prompt glance
Add the admin role to the glance user and service project:
openstack role add --project service --user glance admin
Create the glance service entity:
openstack service create --name glance \
--description "OpenStack Image service" image
Create the Image service API endpoint:
openstack endpoint create \
--publicurl http://controller:9292 \
--internalurl http://controller:9292 \
--adminurl http://controller:9292 \
--region RegionOne \
image
二、To install and configure the Image service components
1.Install the packages:
yum install openstack-glance python-glance python-glanceclient
2.Edit the /etc/glance/glance-api.conf file and complete the following actions:
In the [database] section, configure database access:
[database]
...
connection = mysql://glance:GLANCE_DBPASS@controller/glance
Replace GLANCE_DBPASS with the password you chose for the Image service database.
In the [keystone_authtoken] and [paste_deploy] sections, configure Identity service access:
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = GLANCE_PASS [paste_deploy]
...
flavor = keystone
Replace GLANCE_PASS with the password you chose for the glance user in the Identity service.
注意:Comment out or remove any other options in the [keystone_authtoken] section.
In the [glance_store] section, configure the local file system store and location of image files:
[glance_store]
...
default_store = file
filesystem_store_datadir = /var/lib/glance/images/
In the [DEFAULT] section, configure the noop notification driver to disable notifications because they only pertain to the optional Telemetry service:
[DEFAULT]
...
notification_driver = noop
The Telemetry chapter provides an Image service configuration that enables notifications.
(Optional) To assist with troubleshooting, enable verbose logging in the [DEFAULT] section:
[DEFAULT]
...
verbose = True
3.Edit the /etc/glance/glance-registry.conf file and complete the following actions:
In the [database] section, configure database access:
[database]
...
connection = mysql://glance:GLANCE_DBPASS@controller/glance
Replace GLANCE_DBPASS with the password you chose for the Image service database.
In the [keystone_authtoken] and [paste_deploy] sections, configure Identity service access:
[keystone_authtoken]
...
auth_uri = http://controller:5000
auth_url = http://controller:35357
auth_plugin = password
project_domain_id = default
user_domain_id = default
project_name = service
username = glance
password = GLANCE_PASS [paste_deploy]
...
flavor = keystone
Replace GLANCE_PASS with the password you chose for the glance user in the Identity service.
注意:Comment out or remove any other options in the [keystone_authtoken] section.
In the [DEFAULT] section, configure the noop notification driver to disable notifications because they only pertain to the optional Telemetry service:
[DEFAULT]
...
notification_driver = noop
The Telemetry chapter provides an Image service configuration that enables notifications.
(Optional) To assist with troubleshooting, enable verbose logging in the [DEFAULT] section:
[DEFAULT]
...
verbose = True
4.Populate the Image service database:
su -s /bin/sh -c "glance-manage db_sync" glance
To finalize installation
Start the Image service services and configure them to start when the system boots:
systemctl enable openstack-glance-api.service openstack-glance-registry.service
systemctl start openstack-glance-api.service openstack-glance-registry.service
Openstack(Kilo)安装系列之glance(六)的更多相关文章
- Openstack(Kilo)安装系列之Keystone(三)
安装配置 Before you configure the OpenStack Identity service, you must create a database and an administ ...
- Openstack(Kilo)安装系列之环境准备(一)
本文采用VMware虚拟环境,使用CentOS 7.1作为openstack的基础环境. 一.基础平台 1.一台装有VMware的windows系统(可联网) 2.CentOS 7.1 64bit镜像 ...
- Openstack(Kilo)安装系列之nova(八)
计算节点 To install and configure the Compute hypervisor components 1.Install the packages: yum install ...
- Openstack(Kilo)安装系列之nova(七)
控制节点 Before you install and configure the Compute service, you must create a database, service crede ...
- Openstack(Kilo)安装系列之环境准备(二)
控制节点.网络节点.计算节点: 一.配置源 1.配置EPEL源 yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-rel ...
- Openstack(Kilo)安装系列之neutron(九)
控制节点 Before you configure the OpenStack Networking (neutron) service, you must create a database, se ...
- Openstack(Kilo)安装系列之Keystone(五)
Create OpenStack client environment scripts To create the scripts Create client environment scripts ...
- Openstack(Kilo)安装系列之Keystone(四)
创建租间.用户.角色 一.To configure prerequisites 1.Configure the authentication token: export OS_TOKEN=ADMIN_ ...
- 5 云计算系列之glance镜像服务安装
preface 在上节中我们了解了keystone服务,下面就看看glance管理镜像的服务吧. glance组成 glance有两部分组成: glance-api 接受云系统镜像的创建,删除,读取请 ...
随机推荐
- iframe中,页面转换后回到页面的顶部
看到网上有这样描述的: 现在A页面内分为上下两个部分,上部分是top,下部分分左右,左是treeview右边是iframe,iframe内嵌一个B页面,B页面的内容实质上是个月刊,可以理解为杂志,里面 ...
- vue - .gitignore
描述:npm官方屏蔽上传文件编写文件. 举例(屏蔽的文件/文件夹记得分行) 屏蔽文件:yarn.txt 屏蔽文件夹:/dist/
- vue - webpack.dev.conf.js for HtmlWebpackPlugin
描述: 这是一个webpack插件,可以简化HTML文件的创建,为您的webpack捆绑服务提供服务. 这对于webpack包含文件名中包含哈希值的bundle 来说尤其有用,它会更改每个编译. 您可 ...
- python——关于Python Profilers性能分析器
1. 介绍性能分析器 profiler是一个程序,用来描述运行时的程序性能,并且从不同方面提供统计数据加以表述.Python中含有3个模块提供这样的功能,分别是cProfile, profile和ps ...
- PyQt4的一些问题汇总
(1)PyQt4获取中文路径名字乱码问题 网址可以参见:http://permalink.gmane.org/gmane.comp.python.chinese/9916 处理方式的代码可以参考如下 ...
- 单元测试JUnit 4(二)——keeps the bar green to keeps the code clean
1.Failure和Error Failure是指测试失败 Error是指测试程序本身出错 (int a=10/0) 2.JUnit常用注解 2.1 @RunWith: 可以更改测试运行器(继承o ...
- Fragment的陷阱
以前做过的一个项目,Fragment嵌套高德地图,当再次进入Fragment的时候,会出现奇怪的现象.嵌套的地图会出现滑动不动的情况,起先还以为是高德的bug呢,经过一番研究,终确定这是一个坑. 先对 ...
- PHP中文乱码的常见解决方法总结
PHP中文乱码是PHP开发中的常见问题之一.PHP中文乱码有时发生在网页本身,有些产生在于MySQL交互的过程中,有时与操作系统有关.下面进行一番总结. 一.首先是PHP网页的编码 1. php文件本 ...
- web开发中常见的安全漏洞及避免方法
1.安全攻击 1.SQL.HTML.JS.OS命令注入 2.XSS跨站脚本攻击,利用站内信任的用户,在web页面插入恶意script代码 3.CSRF跨站请求伪造,通过伪装来自信任用户的请求来利用受信 ...
- Android Studio编译的时候提示Gradle无法下载的解决方案
首先,打开android studio项目 找到项目目录gradle\wrapper\gradle-wrapper.properties这个文件.内容如下:#Wed Apr 10 15:27:10 P ...