In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Foreword:
The whole OpenStack is composed of four parts: control node, computing node, network node and storage node. The basic management service of the control node consists of five Keystone,Glance,Nova,Neutron,Horizon services. This blog will talk about the deployment of galnce components.
Glance: image management service, which provides the management of the images that can be provided when the virtual machine is deployed, including the import, format, and creation of the corresponding templates.
Experimental environment:
This component deployment operation is on the controller node server
Host system IP address roles controllerCentOS7192.168.37.128keystone, nova, glance, ntp, mariadb, rabbitmq, memcached, etcd, apache, computeCentOS7192.168.37.130nova, ntpcinderCentOS7192.168.37.131cinder, ntp Experimental process: 1. Database operation
1. Create a glance database and authorize
Mysql-u root-p
Create database glance
Grant all privileges on glance. To 'glance'@'localhost' identified by' 123456'
Grant all privileges on glance. To 'glance'@'%' identified by' 123456'
2. Get the environment variable of admin user and create service authentication.
Source ~ / admin-openrc
Export | grep OS_
3. Create glance users
Openstack user create-domain default-password-prompt glance
Password: 123456
4. Add admin users to glance users and projects
Openstack role add-project service-user glance admin
5. The user-role-project has been built. Next, access the related information of glance.
Openstack user list # user Information openstack role list # role Information openstack project list # Service Information openstack role assignment list # related Information
6. Create a glance service-OpenStack Image
Openstack service create-name glance-description "OpenStack Image" image
7. Create a mirror service API endpoint (three url paths)
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
II. Glance service installation
1. Yum installs the glance package
Yum install openstack-glance-y
2. Store mirror points (self-defined)
Mkdir / var/lib/glance/images
Cd / var/lib
Chown-hR glance:glance glance # set permissions
3. Configure the interface file
Vim / etc/glance/glance-api.conf
[database] # 1942connection = mysql+pymysql://glance:123456@controller/ glass [Keystone _ authtoken] # 3501auth_uri = http://controller:5000auth_url = http://controller:35357 (! Note that url is not uri) # 3552memcached_servers = controller:11211#3659auth_type = passwordproject_domain_name = default user_domain_name = default # Domain name project_name = service # Project name username = glance # user password = 123456 [paste_deploy] # 4508flavor = Keystone [glance _ store] # 2066stores = file Http # identify type # 2110default_store = file#2429filesystem_store_datadir = / var/lib/glance/images/
4. Configure the registration file
Vim / etc/glance/glance-registry.conf
[database] # 1188connection = mysql+pymysql://glance:123456@controller/ glass [Keystone _ authtoken] # 1314auth_uri = http://controller:5000auth_url = http://controller:35357 (! Note that url is not uri) # 1365memcached_servers = controller:11211#1472auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = 123456 [paste_deploy] # 2295flavor = keystone
Note: the configuration file contains a lot of content and needs to be checked carefully. You can filter the configuration file for inspection in the following ways
Grep "^ [a Merz]" / etc/glance/glance-registry.conf
5. Synchronize the mirror database
Su-s / bin/sh-c "glance-manage db_sync" glance # synchronization # display: Database is synced successfully.mysql-u root-pabc123-e 'use glance;show tables;' # check if there is any data after synchronization
6. Start related services and set boot self-startup
Systemctl enable openstack-glance-api.service
Systemctl start openstack-glance-api.service
Systemctl enable openstack-glance-registry.service
Systemctl start openstack-glance-registry.service
Ss-ntl | grep 9292
3. Verify glance image
Use CirrOS to verify the operation of the Image service, a small Linux image that helps you test your OpenStack deployment
For more information about how to download and build an image, see the OpenStack virtual machine image guide https://docs.openstack.org/image-guide/
For information about how to manage images, refer to the OpenStack end user Guide https://docs.openstack.org/queens/user/
1. Obtain the environment variable of the admin user and download the image
Source ~ / admin-openrc
Wget http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img
# wait time for download
2. Upload image
# upload an image to the Image service using QCOW2 disk format, naked container format and public visibility so that all projects can access it
Openstack image create "cirros"-file cirros-0.3.5-x86_64-disk.img-disk-format qcow2-container-format bare-public
3. View the uploaded image
Openstack image list
So far, the glance component has been installed, thank you for reading!
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.