1. mysql 创建数据库和用户

create database glance;

grant all privileges on glance.* to 'glance'@'localhost' identified by 'mhc.123';

grant all privileges on glance.* to 'glance'@'%' identified by 'mhc.123';

2.

# source env/admin.openrc

# openstack user create --domain default --password-prompt glance

# openstack role add --project service --user glance admin

# openstack service create --name glance --description "OpenStack Image service" image

# openstack endpoint create --region RegionOne image public http://v460:9292

# openstack endpoint create --region RegionOne image internal http://v460:9292

# openstack endpoint create --region RegionOne image admin http://v460:9292

3. 安装

# git checkout -b rocky remotes/origin/stable/rocky

# pip install -r requirements.txt

# python setup.py install

# pip install python-glanceclient

# mkdir -p /var/lib/glance/images

# user add glance

# chown -R glance:glance /var/lib/glance/images

配置: https://github.com/mhcvs2/docker/tree/master/openstack/glance

# glance-manage db_sync

# yum install https://buildlogs.centos.org/centos/7/cloud/x86_64/openstack-liberty/centos-release-openstack-liberty-1-3.el7.noarch.rpm

# yum install openstack-utils

# cp -r etc /etc/glance

openstack-config --set  /etc/glance/glance-api.conf database connection  mysql+pymysql://glance:glance@controller/glance
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken www_authenticate_uri http://controller:5000
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_url http://controller:5000
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_type password
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken project_domain_name Default
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken user_domain_name Default
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken project_name service
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken username glance
openstack-config --set /etc/glance/glance-api.conf keystone_authtoken password glance
openstack-config --set /etc/glance/glance-api.conf paste_deploy flavor keystone
openstack-config --set /etc/glance/glance-api.conf glance_store stores file,http
openstack-config --set /etc/glance/glance-api.conf glance_store default_store file
openstack-config --set /etc/glance/glance-api.conf glance_store filesystem_store_datadir /var/lib/glance/images/
openstack-config --set  /etc/glance/glance-registry.conf database connection mysql+pymysql://glance:glance@controller/glance
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken www_authenticate_uri http://controller:5000
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_url http://controller:5000
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken memcached_servers controller:11211
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_type password
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken project_domain_name Default
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken user_domain_name Default
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken project_name service
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken username glance
openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken password glance
openstack-config --set /etc/glance/glance-registry.conf paste_deploy flavor keystone # glance-control registry start
# glance-control registry status
# glance-control api start
# glance-control api status
wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img

# source ~/env/admin.openrc

# openstack image create "cirros" --file cirros-0.3.5-x86_64-disk.img --disk-format qcow2 --container-format bare --public
# openstack image list

2-glance 部署的更多相关文章

  1. OpenStack 镜像服务 Glance部署(六)

    Glance介绍 创建虚拟机我们需要有glance的支持,因为glance是提供镜像的服务. Glance有两个比较重要的服务: Glance-api:接受云系统镜像的构建.删除.读取请求 Glanc ...

  2. Openstack_O版(otaka)部署_镜像服务glance部署

    安装和配置服务 1. 建库建用户 mysql -u root -p CREATE DATABASE glance; GRANT ALL PRIVILEGES ON glance.* TO '; GRA ...

  3. glance系列二:glance部署及操作

    一 简单架构图示参考 更新中... 二 部署glance yum install memcached python-memcachedsystemctl enable memcached.servic ...

  4. openstack(Pike 版)集群部署(三)--- Glance 部署

    一.介绍 参照官网部署:https://docs.openstack.org/glance/queens/install/ 继续上一博客进行部署:http://www.cnblogs.com/weij ...

  5. openstack之glance部署及操作

    由于时间关系简单的架构图就先不展示了.后续的更新会贴上... 部署glance 安装memcache服务 yum install memcached python-memcached systemct ...

  6. openstack安装newton版本Glance部署(二)

    一.部署Glance 1.Glance 安装 [root@linux-node1 ~]#yum install openstack-glance python-glance python-glance ...

  7. OpenStack kilo版(4) Glance部署

    Glance简介 Glance-api:接受云系统镜像的构建.删除.读取请求 Glance-Registry:云系统的镜像注册服务 部署在controller节点 配置数据库 MariaDB [(no ...

  8. OpenStack_I版 3.glance部署

    存储镜像path                 默认镜像不存储在本地,一般放在swift对象存储或Cinder块存储里   glance安装     拷贝配置文件到/ect下,并新建配置目录,日志目 ...

  9. OpenStack 镜像服务 Glance部署(七)

    创建虚拟机我们需要有glance的支持,因为glance是提供镜像的服务. Glance有两个比较重要的服务: Glance-api:接受云系统镜像的构建.删除.读取请求 Glance-Registr ...

  10. OpenStack实践系列③镜像服务Glance

    OpenStack实践系列③镜像服务Glance 3.5 Glance部署 修改glance-api和glance-registry的配置文件,同步数据库 [root@node1 ~]# vim /e ...

随机推荐

  1. 变量,if.elif .else判断

    一,计算机的了解 基本组成:主板+cpu+内存 cpu: 主频, 核数(16) 内存:大小(8G, 16G, 32G) 型号: DDR3, DDR4, DDR5,  主频(海盗船,玩家国度)      ...

  2. linux下部署jdk+Tomcat

    部署jdk (如果是普通用户,先切换到管理员 su root) 1.下载jdk压缩包 2.用xftp将jdk压缩包传输 /opt 目录下 3.解压(在/opt 目录下对压缩包解压) tar -xzvf ...

  3. 23.模拟登录cookies请求速询网站数据

    采集速询网站数据: 网站地址:http://www.suxun0752.com/index.html 网站是需要账号登录才给返回信息的,我这里是直接拿的登录后的cookies请求的数据,cookies ...

  4. <转载>css3 概述

    参照 https://www.ibm.com/developerworks/cn/web/1202_zhouxiang_css3/ http://www.cnblogs.com/ghost-xyx/p ...

  5. API / DOM

    浏览器特性 当控制台报错时,IE9会停止执行JS.当打开控制台时会执行后续JS ------------------------------------------------------------ ...

  6. Gson 解决时间解析问题

    异常: at org.eclipse.jdt.) at org.eclipse.jdt.) Caused by: java.text.ParseException: Failed to parse d ...

  7. 静态属性@property

    property 作用其实把类里面的逻辑给隐藏起来(封装逻辑,让用户调用的时候感知不到你的逻辑) property实例1:class Room: def __init__(self): pass @p ...

  8. delphi android 自动升级

    用IdHTTP1下载文件到手机完成. 调用自动安装不行. First chance exception at $DFC22519. Exception class EJNIException with ...

  9. ubuntu编译安装nginx

    下载nginx源码, ./configure --prefix=/usr/local/nginx/1.8 --with-http_ssl_module --with-http_dav_module - ...

  10. DirectShow设置采集帧率码率YUV<转>

    // 设置参数,p1=宽,p2=高,p3=帧率 AM_MEDIA_TYPE *p = NULL; IAMStreamConfig *pSC = NULL; pCGB2->FindInterfac ...