日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

《3》CentOS7.0+OpenStack+kvm云平台部署—配置Glance

發(fā)布時間:2023/12/20 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 《3》CentOS7.0+OpenStack+kvm云平台部署—配置Glance 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

感謝朋友支持本博客,歡迎共同探討交流。因為能力和時間有限,錯誤之處在所難免,歡迎指正。
假設轉載。請保留作者信息。


博客地址:http://blog.csdn.net/qq_21398167

原博文地址:http://blog.csdn.net/qq_21398167/article/details/46385621

初始化Glance

(1).安裝Glance服務:

[root@openstack ~]# yum -y installopenstack-glance

?

(2).創(chuàng)建Glance數據庫:

[root@openstack ~]#?openstack-db--init --service glance

?

(3).改動配置文件里的數據庫鏈接:

[root@openstack ~]#?openstack-config--set /etc/glance/glance-api.conf DEFAULT sql_connectionmysql://glance:glance@localhost/glance

[root@openstack ~]#?openstack-config--set /etc/glance/glance-registry.conf DEFAULT sql_connectionmysql://glance:glance@localhost/glance

?

創(chuàng)建User,定義Services API Endpoints

(1).Glance服務創(chuàng)建一個glance用戶:

[root@openstack ~]#?keystoneuser-create--name=glance --pass=service--email=glance@zcs.com

[root@openstack ~]#?keystoneuser-role-add --user=glance --tenant=service --role=admin

(2).glance創(chuàng)建一個服務:

[root@openstack ~]#?keystoneservice-create --name=glance --type=image --description="GlanceImageService"

(3).使用服務ID創(chuàng)建一個endpoint

[root@openstack ~]#?vi/root/config/glance.sh

#!/bin/bash

my_ip=10.1.1.2

service=$(keystone service-list | awk'/glance/ {print $2}')

keystone endpoint-create --service-id=$service--publicurl=http://$my_ip:9292 --internalurl=http://$my_ip:9292--adminurl=http://$my_ip:9292

?

[root@mg ~]# sh /root/config/glance.sh

WARNING: Bypassing authentication using atoken & endpoint (authentication credentials are being ignored).

+-------------+----------------------------------+

|??Property? |????????????? Value?????????????? |

+-------------+----------------------------------+

|??adminurl? |???? http://10.1.1.2:9292????? |

|?????id???? |fe281515d406407bbcd4887cb5815de4 |

| internalurl |???? http://10.1.1.2:9292????? |

|?publicurl? |???? http://10.1.1.2:9292????? |

|???region?? |??????????? regionOne???????????? |

|?service_id | 7c0102f0e715479e9292c0581d214de2 |

+-------------+----------------------------------+

配置Glance服務

?

(1).keystone認證信息加入到glance配置文件里:

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken auth_host 127.0.0.1

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken auth_port 35357

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken auth_protocol http

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken admin_tenant_name service

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken admin_user glance

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf keystone_authtoken admin_password service

?

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken auth_host 127.0.0.1

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken auth_port 35357

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken auth_protocol http

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken admin_tenant_name service

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken admin_user glance

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf keystone_authtoken admin_password service


(2).
改動ini文件路徑。將keystone認證信息加入到ini文件里:

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf paste_deploy config_file/etc/glance/glance-api-paste.ini

[root@openstack ~]# openstack-config --set/etc/glance/glance-api.conf paste_deploy flavor keystone

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf paste_deploy config_file /etc/glance/glance-registry-paste.ini

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry.conf paste_deploy flavor keystone

?

[root@openstack ~]# cp/usr/share/glance/glance-api-dist-paste.ini /etc/glance/glance-api-paste.ini

[root@openstack ~]# cp/usr/share/glance/glance-registry-dist-paste.ini/etc/glance/glance-registry-paste.ini

[root@openstack ~]# chown -R root:glance/etc/glance/glance-api-paste.ini?

[root@openstack ~]# chown -R root:glance/etc/glance/glance-registry-paste.ini

?

[root@openstack ~]# openstack-config --set/etc/glance/glance-api-paste.ini filter:authtoken auth_host 127.0.0.1

[root@openstack ~]# openstack-config --set/etc/glance/glance-api-paste.ini filter:authtoken admin_tenant_name service

[root@openstack ~]# openstack-config --set/etc/glance/glance-api-paste.ini filter:authtoken admin_user glance

[root@openstack ~]# openstack-config --set/etc/glance/glance-api-paste.ini filter:authtoken admin_password service

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry-paste.ini filter:authtoken auth_host 127.0.0.1

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry-paste.ini filter:authtoken admin_tenant_nameservice

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry-paste.ini filter:authtoken admin_user glance

[root@openstack ~]# openstack-config --set/etc/glance/glance-registry-paste.ini filter:authtoken admin_password service


轉載于:https://www.cnblogs.com/zsychanpin/p/6791971.html

總結

以上是生活随笔為你收集整理的《3》CentOS7.0+OpenStack+kvm云平台部署—配置Glance的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。