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 ...
随机推荐
- #20175120彭宇辰 java第五周学习总结
第六章 接口与实现 教材学习内容总结 接口-接口声名interace -接口体1.只有常量声明和抽象方法2.所有常量和方法的访问权限都为public3.常量都为static常量4.可省略pulic\s ...
- matlab数学实验--第二章
控制流: 分支语句: if (条件式),语句:end if (条件式1),语句1:elseif (条件式2),语句2:……:else,语句:end iwitch(分支变量) case(值1),语句1: ...
- Java第三次作业——面向对象基础(封装)
Java第三次作业--面向对象基础(封装) (一)学习总结 1.什么是面向对象的封装性,Java中是如何实现封装性的?试举例说明. 封装性 封装性是面向对象的方法所应遵循的一个重要原则,它有两个含义: ...
- Selenium - 搭建环境
1. 在Python中安装第三方库 1)安装Selenium 通过pip安装 2). 下载geckodriverckod 从selenium3开始,webdriver/firefox/webdri ...
- 基于python的unittest测试框架集成到jenkins(Mac)
1.jenkins部分 1.1 安装jenkins jenkins下载地址:https://jenkins.io/download/ 安装步骤,疯狂点击下一步 1.2 打开jenkins服务 在浏览器 ...
- Redhat 6.5安装JDK和Tomcat小记
下面将今天在Linux 6.5环境安装JDK和Tomcat的过程记录下来,以备以后查用. Linux环境:Redhat 6.5 JDK版本:7u79 Tomcat版本:7.0.70 1.下载JDK文件 ...
- JS 格式化日期时间
方法一: // 对Date的扩展,将 Date 转化为指定格式的String // 月(M).日(d).小时(h).分(m).秒(s).季度(q) 可以用 1-2 个占位符, // 年(y)可以用 1 ...
- insert 插入
自动关联当前时间: GETDATE():返回当前时间和日期.
- Spring Cloud(Dalston.SR5)--Config 集群配置中心
Spring Cloud Config 是一个全新的项目,用来为分布式系统中的基础设施和微服务应用提供集中化的外部配置支持,他分为服务端和客户端两个部分.服务端也称为分布式配置中心,是一个独立的微服务 ...
- Sonar6.7.1配置修改备注
sonarqube-6.7.1\conf\sonar.properties的配置字段 sonar.jdbc.url=jdbc:mysql://localhost:3306/sonarqube?useU ...