欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

openstack云計(jì)算組件glance部署及操作步驟

 更新時間:2022年04月20日 09:20:51   作者:林海峰  
這篇文章主要為大家介紹了openstack云計(jì)算之glance部署及操作步驟,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

一 簡單架構(gòu)圖示參考

二 部署glance

yum install memcached python-memcached
systemctl enable memcached.service
systemctl start memcached.service

step 1:glance關(guān)于數(shù)據(jù)庫的操作

mysql -u root -p #登入數(shù)據(jù)庫
CREATE DATABASE glance; #新建庫keystone
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' \
  IDENTIFIED BY '123'; #新建本地訪問glance庫的賬號
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' \
  IDENTIFIED BY '123'; #新建遠(yuǎn)程訪問glance庫的賬號

step 2:glance關(guān)于keystone的操作

soure admin-openrc #執(zhí)行管理員腳本
#為glance的使用者創(chuàng)建用戶
openstack user create --domain default --password-prompt glance 
#對glance-service添加role角色,提示:用戶glance只有在一個確定的項(xiàng)目service內(nèi)才有角色的概念,單獨(dú)的用戶或者單獨(dú)的項(xiàng)目都是無法綁定角色的。
openstack role add --project service --user glance admin 
#創(chuàng)建glance服務(wù)的catalog:service+endpoint
openstack service create --name glance \
--description "OpenStack Image" image
openstack endpoint create --region RegionOne \
image public http://192.168.31.57:9292
openstack endpoint create --region RegionOne \
image internal http://192.168.31.57:9292
openstack endpoint create --region RegionOne \
image admin http://192.168.31.57:9292

step 3:安裝軟件包

yum -y install openstack-glance

step 4:配置/etc/glance/glance.conf

大前提:每一條配置都應(yīng)該新增到文件中,一定不要打開注釋在原有的基礎(chǔ)上修改。

創(chuàng)建本地存儲:

1.一定要在opesntack-glance-api.service服務(wù)啟動之前部署好存儲設(shè)備,因?yàn)樵摲?wù)在啟動時會加載存儲驅(qū)動檢索存儲設(shè)備,如果事先不存在,就意味著該服務(wù)沒有識別到任何可用的存儲設(shè)備,即便是后來你又新增了存儲,仍然是無效的,最終導(dǎo)致你上傳鏡像失??;

2.一定要賦予opesntack-glance-api.service服務(wù)對存儲設(shè)備的可寫權(quán)限。

mkdir -p /var/lib/glance/images
chown -R glance.glance /var/lib/glance/images

配置/etc/glance/glance-api.conf

[database]
connection = mysql+pymysql://glance:123@192.168.31.57/glance
[keystone_authtoken]
auth_uri = http://192.168.31.57:5000
auth_url = http://192.168.31.57:35357
memcached_servers = 192.168.31.57:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = 123
[paste_deploy]
flavor = keystone
[glance_store]
stores = file,http
default_store = file
filesystem_store_datadir = /var/lib/glance/images/

配置/etc/glance/glance-registry.conf

[database]
connection = mysql+pymysql://glance:123@192.168.31.57/glance
[keystone_authtoken]
auth_uri = http://192.168.31.57:5000
auth_url = http://192.168.31.57:35357
memcached_servers = 192.168.31.57:11211
auth_type = password
project_domain_name = Default
user_domain_name = Default
project_name = service
username = glance
password = 123
[paste_deploy]
flavor = keystone

step 5: 初始化數(shù)據(jù)庫glance

su -s /bin/sh -c "glance-manage db_sync" glance
'''
忽略以下打印,此乃正常性行為:
Option "verbose" from group "DEFAULT" is deprecated for removal.  Its value may be silently ignored in the future.
/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py:1171:...... oslo_db.sqlalchemy.enginefacade
...... a future release.")
  result = self._query(query)
'''

step 6:啟動glance且設(shè)置開機(jī)啟動

systemctl enable openstack-glance-api.service \
openstack-glance-registry.service
systemctl start openstack-glance-api.service \
openstack-glance-registry.service

三 驗(yàn)證

source admin-openrc
#如果沒有wget則必須yum -y install wget
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
openstack image create "cirros" \
  --file cirros-0.3.4-x86_64-disk.img \
  --disk-format qcow2 --container-format bare \
  --public
openstack image list

For information about the openstack image create parameters, see Create or update an image (glance) in the OpenStack User Guide.

For information about disk and container formats for images, see Disk and container formats for images in the OpenStack Virtual Machine Image Guide.

以上就是openstack云計(jì)算之glance部署及操作步驟的詳細(xì)內(nèi)容,更多關(guān)于openstack云計(jì)算glance部署操作的資料請關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評論