安装配置

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. webDriver API——第11部分Remote WebDriver

    The WebDriver implementation. class selenium.webdriver.remote.webdriver.WebDriver(command_executor=' ...

  2. 更轻便的markdown 编辑器Typora

    更轻便的markdown 编辑器 Typora 所见即所得的键入方式 https://typora.io 文章来源:刘俊涛的博客 欢迎关注,有问题一起学习欢迎留言.评论.

  3. ZK框架笔记5、事件

            事件是org.zkoss.zk.ui.event.Event类,它通知应用程序发生了什么事情.每一种类型的事件都由一个特定的类来表示.         要响应一个事件,应用程序必须为事 ...

  4. Python进阶---python strip() split()函数实战(转)

    先看一个例子: >>> ipaddr = 10.122.19.10 File "", line 1 ipaddr = 10.122.19.10 ^ SyntaxE ...

  5. Executor / Executors / ExecutorService /

    Java SE5的java.util.concurrent包中的执行器(Executor)将为你管理Thread对象,从而简化了并发编程.Executor在客户端和执行任务之间提供了一个间接层,Exe ...

  6. [LeetCode] Add Two Numbers(stored in List)

    首先,演示一个错误的reverList class Solution { public: ListNode* reverse(ListNode* root) { if(NULL == root) re ...

  7. 带 IK 分词器的 Luke 和 搜索应用服务器solr

    首先在网上查了一下: Solr Solr是一个独立的企业级搜索应用服务器,它对外提供类似于Web-service的API接口.用户可以通过http请求,向搜索引擎服务器提交一定格式的XML文件,生成索 ...

  8. Qt-优化布局结构

    在迄今为止讲到每一个例子中,我们只是简单的把窗口部件放置到某个确定的布局中.但在某些情况下,由此形成的布局看起来可能还不是我们最想要的形式.在这些情形中,可以通过改变要摆放的窗口部件的大小策略和大小提 ...

  9. tortoisesvn帮助手册

    http://tortoisesvn.net/docs/nightly/TortoiseSVN_zh_CN/index.html

  10. javascript开源大全

    javascript开源大全 Ajax框架-jQuery 可视化HTML编辑器-CKEditor 国产jQuery-UI框架-(jUI)-DWZ 网页开发FireFox插件-Firebug 服务器端的 ...