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 接受云系统镜像的创建,删除,读取请 ...
随机推荐
- 使div变成半透明的css样式
.layer { opacity:0.9; filter:alpha(opacity=90); zoom:1; }
- JAVA学习笔记 -- 读写XML
XML是一种可扩展标记语言 以下是一个完整的XML文件(也是下文介绍读写XML的样本): <? xml version="1.0" encoding="UTF-8& ...
- ES2017 keys,values,entries使用
let {keys, values, entries} = Object; let obj = { a: 1, b: 2, c: 3 }; for (let key of keys(obj)) { c ...
- css zoom与scale区别
转自:http://www.zhangxinxu.com/wordpress/2015/11/zoom-transform-scale-diff/ 1.zoom的缩放是相对于左上角的:而scale默认 ...
- Android Exception 12(has leaked ServiceConnection)
09-09 15:12:31.154: E/ActivityThread(18855): Activity com..xxx.xx.act.LoadingAct has leaked ServiceC ...
- 我的第一个 RN 项目-趣闻
代码地址如下:http://www.demodashi.com/demo/13486.html 项目预览 IOS: Android: 扫描体验: 或者点我 整体功能跟之前小程序和 Android 项目 ...
- KindEditor 4.1.7的使用技巧
1.载入进这个自己写的js代码 $(function(){ if ($("textarea.editor").length) { var editor = KindEditor.c ...
- linux 批量替换内容
sed -i "s/被替换的内容/替换的内容/g" `grep "被替换的内容" -rl 目录` -r = 搜索下级目录
- MySQL索引长度限制问题
在修改表结构时出现了错误:Specified key was too long;max key length is 1000 bytes. MySQL版本为Server version: 5.1.36 ...
- 点滴积累【other】---存储过程删除所有表中的数据(sql)
USE [QG_Mis24] GO /****** Object: StoredProcedure [dbo].[p_set1] Script Date: 07/18/2013 13:25:57 ** ...