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. 性能测试day01_性能基本概念

    其实第一次接触性能是15年的时候,懵懵懂懂的被领导拉去做第一次做性能压测,如今有机会重新听一下云层大大讲解性能,于是打算以此博客记录下整个学习的过程,如若有不同意见者可以在下面留言指出,也欢迎大家一起 ...

  2. Java课程作业之动手动脑(六)

    1.使用Files. walkFileTree()找出指定文件夹下所有大于指定大小(比如1M)的文件. import java.io.IOException; import java.nio.file ...

  3. CMake实践--操作

    ---<Cmake 实践>--- ---Ubuntu 14.04 1.创建一个cmake文件目录 mkdir -p ~/cmake 2.在cmake文件下创建t1子目录 cd ~/cmak ...

  4. HPROF - Heap Profile

    基于动态链接库实现,可用于性能分析,锁内容.诊断memory leak问题等.获得堆开辟信息 java -agentlib:hprof=heap=sites ToBeProfiledClass 帮助文 ...

  5. http 文件传输

    http 文件传输 https://www.zhihu.com/question/58118565 转载自:http://www.voidcn.com/article/p-rpdhbjib-m.htm ...

  6. java.sql.SQLException: com.mysql.jdbc.Driver

    项目本来是 oracle 驱动 + druid 数据源配置,现在要修改为 mysql+druid数据源配置 启动项目的时候报:java.sql.SQLException: com.mysql.jdbc ...

  7. css:蓝环章鱼

    许多海洋生物色彩艳丽,这次用css仿制一下蓝环章鱼的蓝环 <script type="text/javascript" src="http://cdn.bootcs ...

  8. openx -书表添加字段

    OpenX的版本是2.8.10.在数据表加完数据库之后,还不能读取和保存字段. OpenX使用scheme来 管理数据库表和字段, 修改数据库结构同时也要修改相关schema, 一个是etc/tabl ...

  9. spring 之 lazy-init Autowired depends-on

    1 lazy-init lazy-init是延迟初始化的意思. spring中容器都是尽早的创建和配置所有的单例bean,因此当容器在启动时,就会去配置和创建单例bean.  默认情况下 beans ...

  10. hadoop的块

    http://hadoop.apache.org/docs/r1.0.4/cn/hdfs_design.html http://www.cnblogs.com/cloudma/articles/had ...