安装配置

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(六)的更多相关文章

  1. Openstack(Kilo)安装系列之Keystone(三)

    安装配置 Before you configure the OpenStack Identity service, you must create a database and an administ ...

  2. Openstack(Kilo)安装系列之环境准备(一)

    本文采用VMware虚拟环境,使用CentOS 7.1作为openstack的基础环境. 一.基础平台 1.一台装有VMware的windows系统(可联网) 2.CentOS 7.1 64bit镜像 ...

  3. Openstack(Kilo)安装系列之nova(八)

    计算节点 To install and configure the Compute hypervisor components 1.Install the packages: yum install ...

  4. Openstack(Kilo)安装系列之nova(七)

    控制节点 Before you install and configure the Compute service, you must create a database, service crede ...

  5. Openstack(Kilo)安装系列之环境准备(二)

    控制节点.网络节点.计算节点: 一.配置源 1.配置EPEL源 yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-rel ...

  6. Openstack(Kilo)安装系列之neutron(九)

    控制节点 Before you configure the OpenStack Networking (neutron) service, you must create a database, se ...

  7. Openstack(Kilo)安装系列之Keystone(五)

    Create OpenStack client environment scripts To create the scripts Create client environment scripts ...

  8. Openstack(Kilo)安装系列之Keystone(四)

    创建租间.用户.角色 一.To configure prerequisites 1.Configure the authentication token: export OS_TOKEN=ADMIN_ ...

  9. 5 云计算系列之glance镜像服务安装

    preface 在上节中我们了解了keystone服务,下面就看看glance管理镜像的服务吧. glance组成 glance有两部分组成: glance-api 接受云系统镜像的创建,删除,读取请 ...

随机推荐

  1. C-Scanf连续调用多次并且存在%c的问题

    问题现象: 当程序中存在多个scanf时,针对第一个scanf的输入,一般用户会以空白字符(空格.换行.tab.换页符)等结束.但若后面有一个scanf(“%c”,&ch),则刚才输入的空白字 ...

  2. angularJS 使用自定义指令输出模板

    <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <script sr ...

  3. centos7(vmware install) 安装EMQ注意事项 ---控制台远程访问

    若想远端访问控制台,需打开对于端口 TCP 服务端口占用 EMQ 2.0 消息服务器默认占用的 TCP 端口包括: 1883 MQTT 协议端口 8883 MQTT/SSL 端口 8083 MQTT/ ...

  4. emq(centos 7) 使用

    配置文件: EMQ 配置文件: /etc/emqttd/emq.conf 插件配置文件: /etc/emqttd/plugins/*.conf 日志文件 日志文件目录: /var/log/emqttd ...

  5. STL 容器(vector 和 list )

    1.这个容器的知识点比较杂 迭代器的理解: 1.erase()函数的返回值,它的迭代器在循环遍历中的奇特之处: #define _CRT_SECURE_NO_WARNINGS #include < ...

  6. Handler源代码解析-有关Handler那些事

    Handler被成为异步处理大师.相信大家都会用,面试中也常常会问到Handler的底层原理.今天就来看一看Handler的机制. Android的消息处理有四个核心类:Handler.Looper. ...

  7. CSDN开源夏令营 百度数据可视化实践 ECharts(8)

    (1)前言 首先谢谢林峰老师,继续接着第七篇提到的内容.CSS布局确实非常累,感觉不好看了就的调整,总的看起来的高大上嘛.好了废话不再多说.今天主要就先解说一个页面的内容,对于CSS布局后面讲会具体的 ...

  8. 纯CSS弹出层,城市切换效果

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/ ...

  9. ios 微信开发

    首先依照对应的文档获得对应的key - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NS ...

  10. .NET面试题(三)

    第1讲:面试前期准备 1.了解相关技术职务需要的技术人才                              2.准备一份出色的个人简历 第2讲:面试前期准备                   ...