In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
In order to solve the problem of how to configure glance image service in openstack O version, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
1. Create a glance database
[root@controller] # mysql-uroot-pdevops
MariaDB [(none)] > CREATE DATABASE glance
MariaDB [(none)] > GRANT ALL PRIVILEGES ON glance. TO 'glance'@'localhost' IDENTIFIED BY' devops'
MariaDB [(none)] > GRANT ALL PRIVILEGES ON glance. TO 'glance'@'%' IDENTIFIED BY' devops'
two。 Create a keystone user about glance
[root@controller ~] # source / root/admin-openrc.sh
[root@controller] # openstack user create-- domain default glance-- password devops
Openstack role add-project service-user glance admin
[root@controller] # openstack service create-- name glance-- description "OpenStack Image service" image
Openstack endpoint create-- region RegionOne image public http://controller:9292
Openstack endpoint create-- region RegionOne image internal http://controller:9292
Openstack endpoint create-- region RegionOne image admin http://controller:9292
[root@controller ~] # yum-y install openstack-glance 35 packages
3. Modify / etc/glance/glance-api.conf configuration file
[root@controller ~] # cp / etc/glance/glance-api.conf / etc/glance/glance-api.conf.bak
[root@controller ~] # > / etc/glance/glance-api.conf
[root@controller ~] # cat / etc/glance/glance-api.conf
[DEFAULT]
Transport_url = rabbit://openstack:devops@controller
[database]
Connection = mysql+pymysql://glance:devops@controller/glance
[keystone_authtoken]
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Username = glance
Password = devops
Project_name = service
[paste_deploy]
Flavor = keystone
[glance_store]
Stores = file,http
Default_store = file
Filesystem_store_datadir = / var/lib/glance/images/
[root@controller ~] # cat / etc/glance/glance-api.conf | grep-v "^ #" | grep-v "^ $"
4. Modify / etc/glance/glance-registory.conf configuration file
[root@controller ~] # cp / etc/glance/glance-registry.conf / etc/glance/glance-registry.conf.bak
[root@controller ~] # > / etc/glance/glance-registry.conf
[root@controller ~] # cat / etc/glance/glance-registry.conf
[DEFAULT]
Transport_url = rabbit://openstack:devops@controller
[database]
Connection = mysql+pymysql://glance:devops@controller/glance
[keystone_authtoken]
Auth_uri = http://controller:5000
Auth_url = http://controller:35357
Memcached_servers = controller:11211
Auth_type = password
Project_domain_name = default
User_domain_name = default
Project_name = service
Username = glance
Password = devops
[paste_deploy]
Flavor = keystone
[root@controller ~] # cat / etc/glance/glance-registry.conf | grep-v "^ #" | grep-v "^ $"
5. Create database tables, synchronize databases
[root@controller] # su-s / bin/sh-c "glance-manage db_sync" glance
6. Start the glance service
[root@controller ~] # systemctl enable openstack-glance-api.service openstack-glance-registry.service
[root@controller ~] # systemctl start openstack-glance-api.service
[root@controller ~] # systemctl start openstack-glance-registry.service
[root@controller ~] # netstat-anpult | grep 9191 # registry
Tcp 0 0 0.0.0.0:9191 0.0.0.0: LISTEN 31349/python2
[root@controller ~] # netstat-anpult | grep 9292 # api
Tcp 0 0 0.0.0.0:9292 0.0.0.0: LISTEN 31413/python2
7. Download the image and upload it to glance
[root@controller ~] # wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
[root@controller] # openstack image create "cirros"-- file cirros-0.3.5-x86_64-disk.img-- disk-format qcow2-- container-format bare-- public
8. Test whether the upload is successful
[root@controller ~] # glance image-list
+-+ +
| | ID | Name |
+-+ +
| | cdd53a8d-3bcd-43f4-a8eb-388f1eebc6b5 | cirros |
+-+ +
9. Image storage location
[root@controller ~] # ll / var/lib/glance/images/
Total 12960
-rw-r-. 1 glance glance 13267968 May 5 08:25 cdd53a8d-3bcd-43f4-a8eb-388f1eebc6b5
This is the answer to the question about how to configure the glance image service for openstack O version. I hope the above content can be of some help to you. If you still have a lot of doubts to be solved, you can follow the industry information channel for more related knowledge.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.