OpenStack 安装:glance 安装
接上一篇keystone, 这一篇介绍glance服务:
- 在开始操作之前,先用source环境变量,然后创建glance 用户,并设置密码为glance
[root@linux-node1 ~]#openstack user create --domain default --password-prompt glance
User Password:
Repeat User Password:
+---------------------+----------------------------------+
| Field | Value |
+---------------------+----------------------------------+
| domain_id | default |
| enabled | True |
| id | 31a0d9b7dd5f47b4b30ed4a77500a307 |
| name | glance |
| options | {} |
| password_expires_at | None |
+---------------------+----------------------------------+
- 添加admin角色到glance用户和service project
[root@linux-node1 ~]# openstack role add --project service --user glance admin
[root@linux-node1 ~]#
- 编辑/etc/glance/glance-registry.conf 如下所示
[database]
# ...
connection = mysql+pymysql://glance:glance@192.168.56.11/glance
[keystone_authtoken] auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = glance
password = glance
[paste_deploy]
flavor = keystone
- 编辑/etc/glance/glance-api.conf 如下所示:
[database]
connection = mysql+pymysql://glance:glance@192.168.56.11/glance
[keystone_authtoken]
auth_uri = http://192.168.56.11:5000
auth_url = http://192.168.56.11:35357
memcached_servers = 192.168.56.11: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]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images
- 同步glance数据库
[root@linux-node1 ~]# su -s /bin/sh -c "glance-manage db_sync" glance
- 验证数据库是否同步
[root@linux-node1 ~]# mysql -h 192.168.56.11 -uglance -pglance -e "use glance;show tables"
+----------------------------------+
| Tables_in_glance |
+----------------------------------+
| alembic_version |
| image_locations |
| image_members |
| image_properties | i
|mage_tags|
| metadef_namespaces |
| metadef_objects |
| metadef_properties |
| metadef_resource_types |
| metadef_tags |
| images |
| metadef_namespace_resource_types |
| migrate_version |
| task_info |
| tasks |
+----------------------------------+
- 启动memcached并设置开机启动
[root@linux-node1 ~]# systemctl enable memcached
[root@linux-node1 ~]# systemctl start memcached
- 启动glance服务并设置开机启动
systemctl enable openstack-glance-api.service \
openstack-glance-registry.service
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-glance-api.service
to /usr/lib/systemd/system/openstack-glance-api.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/openstack-glance-registry.service to /usr/lib/systemd/system/openstack-glance-registry.service.
systemctl start openstack-glance-api.service \
openstack-glance-registry.service
- 创建glance实例
openstack service create --name glance \
--description "OpenStack Image" image
+-------------+----------------------------------+
| Field | Value |
+-------------+----------------------------------+
| description | OpenStack Image |
| enabled | True |
| id | 4c4dd5eb35324b568cd9722f174a632b |
| name | glance |
| type | image |
+-------------+----------------------------------+
- 创建glance服务API 端点
openstack endpoint create --region RegionOne \
image public http://192.168.56.11:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 47e8d9659f70422487cf600405f518bf |
| interface | public |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4c4dd5eb35324b568cd9722f174a632b |
| service_name | glance |
| service_type | image |
| url | http://192.168.56.11:9292 |
+--------------+----------------------------------+openstack endpoint create --region RegionOne \
image internal http://192.168.56.11:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 859936e9632642d58517d9ac6a2c3176 |
| interface | internal |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4c4dd5eb35324b568cd9722f174a632b |
| service_name | glance |
| service_type | image |
| url | http://192.168.56.11:9292 |
+--------------+----------------------------------+openstack endpoint create --region RegionOne \
image admin http://192.168.56.11:9292
+--------------+----------------------------------+
| Field | Value |
+--------------+----------------------------------+
| enabled | True |
| id | 223775040aaf460da4f275ebbcd01ae1 |
| interface | admin |
| region | RegionOne |
| region_id | RegionOne |
| service_id | 4c4dd5eb35324b568cd9722f174a632b |
| service_name | glance |
| service_type | image |
| url | http://192.168.56.11:9292 |
+--------------+----------------------------------+
- 验证创建,现在是两个服务的六个端点
[root@linux-node1 ~]# openstack endpoint list
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| ID | Region | Service Name | Service Type | Enabled | Interface | URL |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
| 16964c23761c428b909e9a8617d8146e | RegionOne | keystone | identity | True | internal | http://192.168.56.11:5000/v3/ |
| 223775040aaf460da4f275ebbcd01ae1 | RegionOne | glance | image | True | admin | http://192.168.56.11:9292 |
| 36fb4b5b955d471783a982ea455cf58d | RegionOne | keystone | identity | True | public | http://192.168.56.11:5000/v3/ |
| 47e8d9659f70422487cf600405f518bf | RegionOne | glance | image | True | public | http://192.168.56.11:9292 |
| 62766176a40f43bbbb40d4b986b4400e | RegionOne | keystone | identity | True | admin | http://192.168.56.11:35357/v3/ |
| 859936e9632642d58517d9ac6a2c3176 | RegionOne | glance | image | True | internal | http://192.168.56.11:9292 |
+----------------------------------+-----------+--------------+--------------+---------+-----------+--------------------------------+
- 这个时候,输入openstack image list,如果没有报错,即证明上面的操作是对的
[root@linux-node1 ~]# openstack image list
[root@linux-node1 ~]#
- 下面我们用一个小镜像来验证一下,首先先获取这个镜像
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.-x86_64-disk.img \
--disk-format qcow2 --container-format bare \
--public
+------------------+------------------------------------------------------+
| Field | Value |
+------------------+------------------------------------------------------+
| checksum | f8ab98ff5e73ebab884d80c9dc9c7290 |
| container_format | bare |
| created_at | --12T08::52Z |
| disk_format | qcow2 |
| file | /v2/images/24a1486b-d1b5--b2cc-3397fdf295cf/file |
| id | 24a1486b-d1b5--b2cc-3397fdf295cf |
| min_disk | |
| min_ram | |
| name | cirros |
| owner | fb6761ab3d3d43569d5fdfafcdfa5e28 |
| protected | False |
| schema | /v2/schemas/image |
| size | |
| status | active |
| tags | |
| updated_at | --12T08::52Z |
| virtual_size | None |
| visibility | public |
+------------------+------------------------------------------------------+
[root@linux-node1 ~]# openstack image list
+--------------------------------------+--------+--------+
| ID | Name | Status |
+--------------------------------------+--------+--------+
| 24a1486b-d1b5--b2cc-3397fdf295cf | cirros | active |
+--------------------------------------+--------+--------+
至此,glance部分创建完毕
OpenStack 安装:glance 安装的更多相关文章
- openstack之~glance安装部署
接着部署完keystone后,接着部署glance 第一:部署安装glance glance关于数据库的操作: [root@controller /]# mysql -u root -p Enter ...
- openstack学习-glance安装(三)
glance在openstack负责镜像相关管理的,对外提供标准的api提供服务,glance有两个服务,一个是glance-api接受云系统镜像的创建.删除.读取请求.glance-registry ...
- OpenStack:安装Glance
>安装Glance1. 安装# apt-get install glance python-glanceclient删除sqlite文件rm -f /var/lib/glance/glance. ...
- CentOS7安装OpenStack(Rocky版)-03.安装Glance镜像服务组件(控制节点)
上篇文章分享了keystone的安装配置,本文接着分享openstack的镜像服务glance. --------------- 完美的分割线 ---------------- 3.0.glance概 ...
- openstack Glance安装与配置
一.实验目的: 1.理解glance镜像服务在OpenStack框架中的作用 2.掌握glance服务安装的基本方法 3.掌握glance的配置基本方法 二.实验步骤: 1.在controller节点 ...
- OpenStack Train版-3.安装glance镜像服务
安装glance镜像服务 创建数据库并授权 mysql -u root create database glance; GRANT ALL PRIVILEGES ON glance.* TO 'gla ...
- (四)OpenStack---M版---双节点搭建---Glance安装和配置
↓↓↓↓↓↓↓↓视频已上线B站↓↓↓↓↓↓↓↓ >>>>>>传送门 1.创建glance数据库 2.获得 admin 凭证来获取只有管理员能执行的命令的访问权限 3 ...
- 安装glance
在控制节点上执行 controllerHost='controller' MYSQL_PASSWD='m4r!adbOP' GLANCE_PASSWD='glance1234!' 1.创建数据库 my ...
- openstack June all-in-one 安装手册
by lt,hyc 1.安全规范 表1:openstack用户和密码值设置 用户名 含义 本文的设置值 Admin openstack管理员用户 ADMIN_PASS Keystone openst ...
随机推荐
- NIO、BIO、AIO区别
一.同步阻塞I/O(BIO): 同步阻塞I/O,服务器实现模式为一个连接一个线程,即客户端有连接请求时服务器就需要启动一个线程进行处理,如果这个连接不做任何事情会造成不必要的线程开销,可以通过线程池机 ...
- PLC 通讯
几个之前整理的高级语言与PLC通讯的资源下载链接:三菱:http://blog.sina.com.cn/s/blog_16d7d3ecb0102x6wj.html倍福:http://bbs.elecf ...
- saltstack基础知识
saltstack简介 saltstack基于python开发的C/S架构的配置管理工具,分为服务器端salt-master和客户端salt-minion.并且支持浩称最快的ZeroMQ消息队列机制, ...
- Elasticsearch -- Head插件安装
安装Head插件 由于head插件本质上还是一个nodejs的工程,因此需要安装node,使用npm来安装依赖的包. <1>安装Node.js 下载解压 wget https://node ...
- flask-appbuilder +echarts 展示数据笔记
pip install flask-appbuilder fabmanager create-app cd newapp fabmanager create-admin fabmanager run ...
- 【疑难杂症】gdb调试多线程程序报错:interrupted system call
一. cmake生成可调试版本的程序,该内容参考自https://www.linuxidc.com/Linux/2014-03/98622.htm 具体内容如下: 1, 使用CMAKE编译确实很方便. ...
- STM32_杂_01_串口代码
#include "stm32f10x.h" #include "serial.h" #include "rtthread.h" #incl ...
- Tcp三次挥手和四次挥手
三次握手: (1) 第一次握手:建立连接时,客户端A发送SYN包(SYN=j)到服务器B,并进入SYN_SEND状态,等待服务器B确认 (2) 第二次握手:服务器B收到SYN包,必须确认客户A的S ...
- java中Arrays的用法
Arrays是针对数组的工具类,可以进行 排序,查找,复制填充等功能. 大大提高了开发人员的工作效率. 一 数组复制 与使用System.arraycopy进行数组复制类似的, Arrays提供了一个 ...
- 定位JVM内存溢出问题思路总结
JVM的内存溢出问题,是个常见而有时候有非常难以定位的问题.定位内存溢出问题常见方法有很多,但是其实很多情况下可供你选择的有效手段非常有限.很多方法在一些实际场景下没有实用价值.这里总结下我的一些定位 ...