Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install Image Service in openstack-mitaka

2025-01-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces how to install Image Service in openstack-mitaka, has a certain reference value, interested friends can refer to, I hope you can learn a lot after reading this article, the following let the editor take you to understand it.

Overview of Image Servic

The OpenStack mirroring service is the central part of Infrastructure as a Service (IaaS), as shown in the conceptual framework. It accepts API requests from end users or OpenStack computing components for disk or server images and metadata definitions. It also supports various library types of storage for disk or server images, including OpenStack object storage.

Many periodic processes run on the OpenStack mirroring service to support caching. Replication services run throughout the cluster to ensure consistency and availability. Other cyclical services include auditors, updaters and reapers.

OpenStack mirroring service includes the following components:

Glance-api

Accept calls for image discovery, retrieval, and storage of mirror API.

Glance-registry

Store, process, and retrieve mirrored metadata. Metadata includes things such as size and type.

Warning: registry is dedicated to the internal service of the OpenStack mirroring service. Do not expose this service to users.

Database

Store mirrored metadata based on the previous database selection. Many deployments use MySQL or SQLite.

Storage repository for image files

A variety of warehouse types are supported, including normal file systems, object storage, RADOS block devices, HTTP and Amazon S3. Note that some repositories only support read-only use.

Metadata definition service

Generic API allows vendors, administrators, services, and users to customize their own metadata. This metadata can be used on different types of resources, such as images, artifacts, volumes, flavors, and aggregates. A definition includes the key of the new attributes, descriptions, constraints, and resource types that can be associated.

Installation and configuration

Next, describe how to install and configure the image service in controller. For simplicity, the storage image is configured on this file system.

precondition

Before you can start installing and configuring mirroring services, you need to create a database, service credentials, and API endpoints.

1. Complete the database creation in the following steps:

Log in to the database with root account

Mysql-u root-p

L create a glance database

CREATE DATABASE glance

L authorize the glance database

GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'localhost' IDENTIFIED BY' glance';GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY' glance'

L exit the database

two。 Load admin credential

. Admin-openrc

3. Create service credential

L create glance user

Openstack user create-domain default-password-prompt glance

L add admin roles to glance users and service projects

Openstack role add-project service-user glance admin

L create glance service entity

Openstack service create-name glance-description "OpenStack Image" image

4. Create Image service API endpoints

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

Install and configure components

1. Install the package

Yum install openstack-glance

two。 Edit the / etc/glance/glance-api.conf file to complete the following steps

L configure the database connection in [database]

[database]... connection = mysql+pymysql://glance:glance@controller/glance

Configure Identity service access in [keystone_authtoken] and [paste_deploy]

[keystone_authtoken]... auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance

[paste_deploy]... flavor = keystone

L configure the database connection in [glance_store]

[glance_store]... stores = file,httpdefault_store = filefilesystem_store_datadir = / var/lib/glance/images/

3. Edit the / etc/glance/glance-registry.conf file to complete the following steps

L configure the database connection in [database]

[database]... connection = mysql+pymysql://glance:glance@controller/glance

Configure Identity service access in [keystone_authtoken] and [paste_deploy]

[keystone_authtoken]... auth_uri = http://controller:5000auth_url = http://controller:35357memcached_servers = controller:11211auth_type = passwordproject_domain_name = defaultuser_domain_name = defaultproject_name = serviceusername = glancepassword = glance

[paste_deploy]... flavor = keystone

4. Synchronize database

Su-s / bin/sh-c "glance-manage db_sync" glance

Note: deprecation information will be entered here, but can be ignored

Complete the installation

Start the mirroring service and set up boot

Systemctl enable openstack-glance-api.service openstack-glance-registry.servicesystemctl start openstack-glance-api.service openstack-glance-registry.service authentication operation

Use CirrOS, a small linux image to verify that your OpenStack image service deployment is successful.

1. Load admin credential

. Admin-openrc

two。 Download source image

Wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img

3. Upload the image to the image service in QCOW2 hard disk format, set the window format to bare, and make it publicly accessible

Openstack image create "cirros"-file cirros-0.3.4-x86_64-disk.img-disk-format qcow2-container-format bare-public

4. Determine the uploaded image and verify the attributes

Openstack image list thank you for reading this article carefully. I hope the article "how to install Image Service in openstack-mitaka" shared by the editor will be helpful to you. At the same time, I also hope you will support us and follow the industry information channel. More related knowledge is waiting for you to learn!

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.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report