Glance安装以及验证

Glance安装以及验证一 Glance 搭建步骤 1 安装 Glance 包 2 初始化数据库 3 配置 Glance nbsp nbsp 数据库 nbsp nbsp keystone 认证信息 4 启动 Glance 二验证 keystone 可用 root controller0 keystonerc root controller0 keystonetoke get 如果输出正常 则 keystone 正常 三安装 Glance 包 root c

一 Glance搭建步骤
1 安装Glance包
2 初始化数据库
3 配置Glance
    数据库
    keystone认证信息
4 启动Glance

二 验证keystone可用
[root@controller0 ~]# . keystonerc [root@controller0 ~]# keystone token-get
如果输出正常,则keystone正常。

三 安装Glance包
[root@controller0 ~]# yum install openstack-glance python-glanceclient -y


四 配置Glance连接数据库
[root@controller0 ~]# openstack-config --set /etc/glance/glance-api.conf DEFAULT sql_connection mysql://glance:openstack@controller0/glance [root@controller0 ~]# openstack-config --set /etc/glance/glance-registry.conf DEFAULT sql_connection mysql://glance:openstack@controller0/glance


五 初始化Glance 数据库
[root@controller0 ~]# openstack-db --init --service glance --password openstack Please enter the password for the 'root' MySQL user: Verified connectivity to MySQL. Creating 'glance' database. Updating 'glance' database password in /etc/glance/glance-registry.conf /etc/glance/glance-api.conf Initializing the glance database, please wait... /usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) Complete!


六 创建glance用户
[root@controller0 ~]# keystone user-create --name=glance --pass=glance --email= +----------+----------------------------------+ | Property | Value | +----------+----------------------------------+ | email |  | | enabled | True | | id | e9f8d113c0c341a2b7d81099f004c122 | | name | glance | | username | glance | +----------+----------------------------------+ [root@controller0 ~]# keystone user-list +----------------------------------+--------+---------+--------------------+ | id | name | enabled | email | +----------------------------------+--------+---------+--------------------+ | 6efb8d6615b84cacb7cbdf0591a66bb7 | admin | True |  | | e9f8d113c0c341a2b7d81099f004c122 | glance | True |  | +----------------------------------+--------+---------+--------------------+


七 分配角色
[root@controller0 ~]# keystone user-role-add --user=glance --tenant=service --role=admin


八 创建glance服务
[root@controller0 ~]# keystone service-create --name=glance --type=image --description="Glance Image Service" +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | description | Glance Image Service | | enabled | True | | id | 04555caea1674cc0bc17e69fa0f9ff38 | | name | glance | | type | image | +-------------+----------------------------------+ [root@controller0 ~]# keystone service-list +----------------------------------+----------+----------+---------------------------+ | id | name | type | description | +----------------------------------+----------+----------+---------------------------+ | 04555caea1674cc0bc17e69fa0f9ff38 | glance | image | Glance Image Service | | b8860e4213ef4b828e5c81b1b9e4d0bb | keystone | identity | Keystone Identity Service | +----------------------------------+----------+----------+---------------------------+


九 创建keystone的endpoint
[root@controller0 ~]# keystone endpoint-create \ > --service-id=$(keystone service-list | awk '/ image / {print $2}') \ > --publicurl=http://controller0:9292 \ > --internalurl=http://controller0:9292 \ > --adminurl=http://controller0:9292 +-------------+----------------------------------+ | Property | Value | +-------------+----------------------------------+ | adminurl | http://controller0:9292 | | id | 6be86cd7eaf94f3a90b5664a | | internalurl | http://controller0:9292 | | publicurl | http://controller0:9292 | | region | regionOne | | service_id | 04555caea1674cc0bc17e69fa0f9ff38 | +-------------+----------------------------------+ [root@controller0 ~]# keystone endpoint-list +----------------------------------+-----------+------------------------------+------------------------------+-------------------------------+----------------------------------+ | id | region | publicurl | internalurl | adminurl | service_id | +----------------------------------+-----------+------------------------------+------------------------------+-------------------------------+----------------------------------+ | 08feefcf9185e748d14d9214 | regionOne | http://controller0:5000/v2.0 | http://controller0:5000/v2.0 | http://controller0:35357/v2.0 | b8860e4213ef4b828e5c81b1b9e4d0bb | | 6be86cd7eaf94f3a90b5664a | regionOne | http://controller0:9292 | http://controller0:9292 | http://controller0:9292 | 04555caea1674cc0bc17e69fa0f9ff38 | +----------------------------------+-----------+------------------------------+------------------------------+-------------------------------+----------------------------------+


十 修改glance api和register相关配置
openstack-config --set /etc/glance/glance-api.conf DEFAULT debug True openstack-config --set /etc/glance/glance-api.conf DEFAULT verbose True openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_uri http://controller0:5000 openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_host controller0 openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_port 35357 openstack-config --set /etc/glance/glance-api.conf keystone_authtoken auth_protocol http openstack-config --set /etc/glance/glance-api.conf keystone_authtoken admin_tenant_name service openstack-config --set /etc/glance/glance-api.conf keystone_authtoken admin_user glance openstack-config --set /etc/glance/glance-api.conf keystone_authtoken admin_password glance openstack-config --set /etc/glance/glance-api.conf paste_deploy flavor keystone openstack-config --set /etc/glance/glance-registry.conf DEFAULT debug True openstack-config --set /etc/glance/glance-registry.conf DEFAULT verbose True openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_uri http://controller0:5000 openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_host controller0 openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_port 35357 openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken auth_protocol http openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name service openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken admin_user glance openstack-config --set /etc/glance/glance-registry.conf keystone_authtoken admin_password glance openstack-config --set /etc/glance/glance-registry.conf paste_deploy flavor keystone


十一 启动相关服务
[root@controller0 ~]# service openstack-glance-api start Starting openstack-glance-api: [ OK ] [root@controller0 ~]# service openstack-glance-registry start Starting openstack-glance-registry: [ OK ] [root@controller0 ~]# chkconfig openstack-glance-api on [root@controller0 ~]# chkconfig openstack-glance-registry on [root@controller0 ~]# ps -ef|grep glance glance 2979 1 0 11:15 ? 00:00:00 /usr/bin/python /usr/bin/glance-api glance 2987 2979 0 11:15 ? 00:00:00 /usr/bin/python /usr/bin/glance-api glance 3009 1 1 11:16 ? 00:00:00 /usr/bin/python /usr/bin/glance-registry glance 3015 3009 0 11:16 ? 00:00:00 /usr/bin/python /usr/bin/glance-registry root 3022 2207 0 11:17 pts/0 00:00:00 grep glance [root@controller0 ~]# cat /var/log/glance/api.log [root@controller0 ~]# cat /var/log/glance/registry.log


十二 验证
1 准备Cirros
[root@controller0 ~]# ll cirros-0.3.2-x86_64-disk.img -rw-r--r-- 1 root root  Feb 25 11:31 cirros-0.3.2-x86_64-disk.img
2 安装镜像
[root@controller0 ~]# glance image-create --progress --name="CirrOS 0.3.1" --disk-format=qcow2 --container-format=ovf --is-public=true < cirros-0.3.2-x86_64-disk.img [=============================>] 100% +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | 64d7c1cd2b6f60c92ccb7913 | | container_format | ovf | | created_at | 2018-02-25T03:35:29 | | deleted | False | | deleted_at | None | | disk_format | qcow2 | | id | 2e4303e2-ac60-45ba-af59-aefb57 | | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | CirrOS 0.3.1 | | owner | 4e845b494bf74cbf89213bf552db8599 | | protected | False | | size |  | | status | active | | updated_at | 2018-02-25T03:35:30 | | virtual_size | None | +------------------+--------------------------------------+ [root@controller0 ~]# glance image-list +--------------------------------------+--------------+-------------+------------------+----------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+--------------+-------------+------------------+----------+--------+ | 2e4303e2-ac60-45ba-af59-aefb57 | CirrOS 0.3.1 | qcow2 | ovf |  | active | +--------------------------------------+--------------+-------------+------------------+----------+--------+ [root@controller0 ~]# glance image-show 2e4303e2-ac60-45ba-af59-aefb57 /usr/lib64/python2.6/site-packages/Crypto/Util/number.py:57: PowmInsecureWarning: Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability. _warn("Not using mpz_powm_sec. You should rebuild using libgmp >= 5 to avoid timing attack vulnerability.", PowmInsecureWarning) +------------------+--------------------------------------+ | Property | Value | +------------------+--------------------------------------+ | checksum | 64d7c1cd2b6f60c92ccb7913 | | container_format | ovf | | created_at | 2018-02-25T03:35:29 | | deleted | False | | disk_format | qcow2 | | id | 2e4303e2-ac60-45ba-af59-aefb57 | | is_public | True | | min_disk | 0 | | min_ram | 0 | | name | CirrOS 0.3.1 | | owner | 4e845b494bf74cbf89213bf552db8599 | | protected | False | | size |  | | status | active | | updated_at | 2018-02-25T03:35:30 | +------------------+--------------------------------------+ [root@controller0 ~]# glance member-add 2e4303e2-ac60-45ba-af59-aefb57 6efb8d6615b84cacb7cbdf0591a66bb7 [root@controller0 ~]# glance member-list --image-id 2e4303e2-ac60-45ba-af59-aefb57 +--------------------------------------+----------------------------------+-----------+ | Image ID | Member ID | Can Share | +--------------------------------------+----------------------------------+-----------+ | 2e4303e2-ac60-45ba-af59-aefb57 | 6efb8d6615b84cacb7cbdf0591a66bb7 | | +--------------------------------------+----------------------------------+-----------+



版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/232817.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 重新理解oauth2.0协议进行联合登录

    重新理解oauth2.0协议进行联合登录

    2021年7月10日
    116
  • 双向 LSTM

    双向 LSTM本文结构:为什么用双向LSTM什么是双向LSTM例子为什么用双向LSTM?单向的RNN,是根据前面的信息推出后面的,但有时候只看前面的词是不够的,例如,我今天不舒服,我打算__一天。只根据‘不舒服‘,可能推出我打算‘去医院‘,‘睡觉‘,‘请假‘等等,但如果加上后面的‘一天‘,能选择的范围就变小了,‘去医院‘这种就不能选了,而‘请假‘‘休息‘之类的被选择概率就会更大。什么是双向L

    2022年6月15日
    76
  • matlab Lasso回归

    matlab Lasso回归Lasso回归clc,clear;closeall;data=[1.541.611.621.661.711.721.731.861.9222.212.292.342.382.422.442.572.642.712.852.933.013.143.223.343.493.553.793.994.1220.120.120.320.420.420.520.620.720.921.121.321.521

    2022年5月22日
    91
  • Rectified Linear Unit (ReLU)

    Rectified Linear Unit (ReLU)TheRectifiedLinearUnit(ReLU)computesthefunctionf(x)=max(0,x)f(x)=max(0,x),whichissimplythresholdedatzero.ThereareseveralprosandconstousingtheReLUs:(Pros)Comparedtosigmoid/tan

    2025年7月27日
    2
  • 织梦php调用底部,dede底部出现织梦官方版权链接”Power by DedeCms”

    织梦php调用底部,dede底部出现织梦官方版权链接”Power by DedeCms”显示结果:自从dedecms织梦系统更新到6.7日的版本,底部版权信息调用标签{dede:global.cfg_powerby/}会自动加上织梦官方的链接[PowerbyDedeCms],想必很多新用户使用中都想去除这个官方的链接,由于这是官方的作为,本文只是提供一个技术的交流,并不鼓励大家去除底部的链接。好了,回归正题,大家知道,进入后台在后台的系统-系统参数有个网站版权信息,在这里并不能…

    2022年7月13日
    15
  • linux 查看文件系统类型「建议收藏」

    linux 查看文件系统类型「建议收藏」查看linux文件系统的方式有多种,一般通用的就mount和df。具体如下:目录mountdffileparted mount df file parted

    2022年9月17日
    2

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号