This series of articles will teach you how to build an OpenStack development environment from scratch across multiple OpenStack systems. The installation version of OpenStack used in the current tutorial is version 20 Train (version T for short). Release Note Train, Originally Released: 16 October, 2019 13 May, 2020 Victoria, Originally Released: 14 October, 2020
The nuggets community
OpenStack Ussuri offline Deployment: OpenStack Train Offline Deployment: OpenStack Ussuri Offline deployment
OpenStack Train Offline deployment | 0 Local offline deployment yum OpenStack Train offline deployment | 1 Controller node – Environment Preparation OpenStack Train Offline deployment | 2 Compute node – Environment Preparation OpenStack Train offline deployment | 3 controller nodes -Keystone authentication service component OpenStack Train offline deployment | 4 controller nodes -Glance image service component OpenStack Train offline deployment | 5 Controller nodes -Placement service component OpenStack Train Offline deployment | 6.1 Controller Node -Nova Computing service component OpenStack Train Offline deployment | 6.2 Compute Node -Nova Computing service Component OpenStack Train Offline deployment | 6.3 Controller Node -Nova Computing service component OpenStack Train Offline Deployment | 7.1 Controller Node -Neutron Network service Component OpenStack Train Offline Deployment | 7.2 Compute Node -Neutron Network service Component OpenStack Train deployment | 7.3 Controller Node -Neutron Service component OpenStack Train Deployment | 8 Controller Node -Horizon Service component OpenStack Train Deployment | 9 Start an OpenStack instance Train Offline deployment | 10 Controller node -Heat service component OpenStack Train Offline deployment | 11.1 Controller Node -Cinder Storage Service Component OpenStack Train Offline deployment | 11.2 Storage node -Cinder storage service component OpenStack Train Offline Deployment | 11.3 Controller Node -Cinder Storage Service Component OpenStack Train Offline Deployment | 11.4 Compute Node -Cinder Storage Service Component OpenStack Offline Deployment of Train | 11.5 Instance Using -Cinder storage service components
Gold Mining community: Customizing OpenStack Images | Customizing OpenStack images | Environment Preparation Customizing OpenStack images | Windows7 Customizing OpenStack images | Windows10 Customizing OpenStack images | Linux Customize an OpenStack image | Windows Server2019
CSDN
CSDN: OpenStack Ussuri Offline Installation and Deployment Series (full) OpenStack Train Offline Installation and Deployment Series (full) Looking forward to making progress together with you.
Offline Deployment of OpenStack Train | 11.1 Controller Node -Cinder Storage Service Component
Install the Cinder storage service on the controller node
The official reference: docs.openstack.org/install-gui… Docs.openstack.org/train/insta… Docs.openstack.org/cinder/trai… Docs.openstack.org/cinder/trai… Blog: yinwucheng.com/?p=491 www.cnblogs.com/tssc/p/9877…
I. Create cinder related databases, service credentials, and API endpoints
1. Create a Cinder database and grant proper access permission
mysql -u root -proot
MariaDB [(none)]> CREATE DATABASE cinder;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' \
IDENTIFIED BY 'CINDER_DBPASS';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' \
IDENTIFIED BY 'CINDER_DBPASS';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> show databases;
MariaDB [(none)]> select user,host from mysql.user;
MariaDB [(none)]> exit
Copy the code
Set CINDER_DBPASS to a proper password.
2. Create cinder service credentials
(1) Create cinder users on keystone
cd
source admin-openrc.sh
openstack user create --domain default --password=CINDER_PASS cinder
openstack user list
Copy the code
Set CINDER_PASS to a proper password.
(2) Add the admin role to the Cinder user and add it to the service project
The following command has no output.
openstack role add --project service --user cinder admin
Copy the code
(3) Create Cinder entities Create CinderV2 and CINDERV3 service entities
openstack service create --name cinderv2 \
--description "OpenStack Block Storage" volumev2
openstack service create --name cinderv3 \
--description "OpenStack Block Storage" volumev3
openstack service list
Copy the code
3. Create an API endpoint for cinder.
openstack endpoint create --region RegionOne \ volumev2 public http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne \ volumev2 internal http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne \ volumev2 admin http://controller:8776/v2/%\(project_id\)s openstack endpoint create --region RegionOne \ volumev3 public http://controller:8776/v3/%\(project_id\)s openstack endpoint create --region RegionOne \ volumev3 internal http://controller:8776/v3/%\(project_id\)s openstack endpoint create --region RegionOne \ volumev3 admin http://controller:8776/v3/%\(project_id\)s openstack endpoint listCopy the code
Install and configure Cinder software
1. Install related software
yum install openstack-cinder -y
Copy the code
2. Modify cinder configurations
(1) Quick configuration
cp /etc/cinder/cinder.conf /etc/cinder/cinder.conf.bak grep -Ev '#|^$' /etc/cinder/cinder.conf.bak>/etc/cinder/cinder.conf openstack-config --set /etc/cinder/cinder.conf database connection mysql+pymysql://cinder:CINDER_DBPASS@controller/cinder openstack-config --set /etc/cinder/cinder.conf DEFAULT transport_url rabbit://openstack:RABBIT_PASS@controller openstack-config --set /etc/cinder/cinder.conf DEFAULT auth_strategy keystone openstack-config --set /etc/cinder/cinder.conf keystone_authtoken www_authenticate_uri http://controller:5000 openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_url http://controller:5000 openstack-config --set /etc/cinder/cinder.conf keystone_authtoken memcached_servers controller:11211 openstack-config --set /etc/cinder/cinder.conf keystone_authtoken auth_type password openstack-config --set /etc/cinder/cinder.conf keystone_authtoken project_domain_name default openstack-config --set /etc/cinder/cinder.conf keystone_authtoken user_domain_name default openstack-config --set /etc/cinder/cinder.conf keystone_authtoken project_name service openstack-config --set /etc/cinder/cinder.conf keystone_authtoken username cinder openstack-config --set /etc/cinder/cinder.conf keystone_authtoken password CINDER_PASS openstack-config --set /etc/cinder/cinder.conf DEFAULT My_ip 10.0.0.11 openstack-config --set /etc/cinder/ cind. conf oslo_concurrency lock_path /var/lib/nova/ TMPCopy the code
Note that my_ip is the management network IP address of the controller node.
(2) Check the effective configuration
egrep -v "^#|^$" /etc/cinder/cinder.conf
grep '^[a-z]' /etc/cinder/cinder.conf
Copy the code
3. Fill in the Cinder block storage database
The following command has no output.
[root@controller ~]# su -s /bin/sh -c "cinder-manage db sync" cinder
Deprecated: Option "logdir" from group "DEFAULT" is deprecated. Use option "log-dir" from group "DEFAULT".
#Ignore return information
Copy the code
Validation database
mysql -ucinder -pCINDER_DBPASS -e "use cinder; show tables;"Copy the code
Configure controller nodes, compute nodes, and storage nodes
If three nodes are deployed, run the openstack-config –set /etc/nova/nova.conf cinder os_region_name RegionOne command at the same time. Otherwise, the no session error is reported, and the cloud disk cannot be mounted
4. Configure Nova to invoke the Cinder service
openstack-config --set /etc/nova/nova.conf cinder os_region_name RegionOne
Copy the code
Check nova configurations that have taken effect
grep '^[a-z]' /etc/nova/nova.conf |grep os_region_name
Copy the code
5. Restart the nova-API service
systemctl restart openstack-nova-api.service
systemctl status openstack-nova-api.service
Copy the code
6. Start the block storage service and set the block storage service to automatically start upon startup
systemctl start openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl status openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl enable openstack-cinder-api.service openstack-cinder-scheduler.service
systemctl list-unit-files |grep openstack-cinder* |grep enabled
Copy the code
The Cinder service has been installed on the controller
On dashboard, you can see that there is an extra volume service in the project directory. Next, install the storage node