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

Steps for Openstack Mitaka to install Image Service

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

Share

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

Today, what the editor shares with you is the introduction of the steps for Openstack Mitaka to install the image service. I believe most people have not yet learned this skill. In order to make you understand better, I have summarized the following contents for you. Without saying much, let's move on.

3. Mirror service

Create a database, service credentials, and API endpoint

3.1.1. Complete the following steps to create the database:

Use the database connection client to connect to the database server as the root user:

# mysql-u root-p

Create a glance database:

CREATE DATABASE glance

Grant appropriate permissions to the ``glance`` database:

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

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

Flush privileges

3.1.2. Obtain admin credentials to gain access to commands that only administrators can execute:

#. Admin-openrc

3.1.3. Create a service certificate

To create a glance user:

# openstack user create-domain default-password-prompt glance

Add admin roles to glance users and service projects

# openstack role add-project service-user glance admin

Create a ``glance`` service entity:

# openstack service create-name glance-description "OpenStack Image" image

3.1.4. Create an API endpoint for the mirror service

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

3.2. Secure and configure components

3.2.1. Install the software package

# yum install openstack-glance-y

3.2.2. Edit the file / etc/glance/glance-api.conf and complete the following actions:

In the [database] section, configure database access:

Connection = mysql+pymysql://glance:P@ssw0rd@controller/glance

In the [keystone_authtoken] section, configure authentication service access:

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 = P@ssw0rd

Comments: comment or delete other options in [keystone_authtoken]

In the [paste_deploy] section, configure authentication service access:

Flavor = keystone

In the [glance_store] section, configure the local file system storage and mirror file location:

Stores = file,http

Default_store = file

Filesystem_store_datadir = / var/lib/glance/images/

Note: the system image directory is set here. To confirm whether the directory exists, this deployment already exists and the permissions are clear as shown in the figure below.

If it does not exist, create a directory and empower it:

Mkdir / var/lib/glance/images/

Chown glance. / var/lib/glance/images/

3.2.3. Edit the file ``/ etc/glance/glance- registry.conf`` and complete the following actions:

In the [database] section, configure database access:

Connection = mysql+pymysql://glance:P@ssw0rd@controller/glance

In the [keystone_authtoken] section, configure authentication service access:

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 = P@ssw0rd

Note: comment or delete other options in [keystone_authtoken].

In the [paste_deploy] section, configure authentication service access:

Flavor = keystone

3.2.4. Write to the mirror service database:

# su-s / bin/sh-c "glance-manage db_sync" glance

3.3. Start the mirroring service and configure them to start at random

# systemctl enable openstack-glance-api.service openstack-glance-registry.service

# systemctl start openstack-glance-api.service openstack-glance-registry.service

3.4. Verify operation (execute these commands on the control node)

3.4.1. Obtain admin credentials to gain access to commands that only administrators can execute:

#. Admin-openrc

3.4.2. Download the source image

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

3.4.3. Use QCOW2 disk format and bare container format to upload the image to the image service and set it to be publicly visible, so that all projects can access it:

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

As shown in the above figure, the image has been uploaded successfully and has been transferred to the specified directory: / var/lib/glance/images/

Note: an error will be reported if the admin-openrc is not executed, as shown in the following figure:

3.4.4. Confirm the upload of the image and verify the attributes:

# openstack image list

After reading the content of the appeal, have you mastered the method of installing the mirror service on Openstack Mitaka? If you want to know more related content, welcome to follow the industry information channel, 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.

Share To

Servers

Wechat

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

12
Report