Get the App
SLTechnology News&Howtos  ›  Servers  › 

OpenStack Train version dual-node installation (5) installation and placement service placement

Shulou Source: shulou.com Published: 2022-06-03 07:04:45 10月01日 Update

Part V installation and placement service placement

Before the release of the OpenStack Stein version, the placement service placement was located in the computing service nova together with the computing service API (nova-api).

Install the placement placement service at the control node as follows

Create a database

Mysql-uroot-p

MariaDB [(none)] > CREATE DATABASE placement

Grant appropriate access to the database

MariaDB [(none)] > GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY' PLACEMENT_DBPASS'

MariaDB [(none)] > GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY' PLACEMENT_DBPASS'

MariaDB [(none)] > exit

Create a placement user

. Admin-openrc

Openstack user create-domain default-password PLACEMENT_PASS placement

Openstack role add-project service-user placement admin

Create a placement service entity

Openstack service create-name placement-description "Placement API" placement

Create a placement service access endpoint

Openstack endpoint create-- region RegionOne placement public http://ct:8778

Openstack endpoint create-- region RegionOne placement internal http://ct:8778

Openstack endpoint create-- region RegionOne placement admin http://ct:8778

Install the placement package

Yum install openstack-placement-api-y

Modify the configuration file

Cp / etc/placement/placement.conf / etc/placement/placement.conf.bak

Grep-Ev'^ $| #'/ etc/placement/placement.conf.bak > / etc/placement/placement.conf

Vim / etc/placement/placement.conf

Join:

[api]

Auth_strategy = keystone

[keystone_authtoken]

Auth_url = http://ct:5000/v3

Memcached_servers = ct:11211

Auth_type = password

Project_domain_name = default

User_domain_name = default

Project_name = service

Username = placement

Password = PLACEMENT_PASS

[placement_database]

Connection = mysql+pymysql://placement:PLACEMENT_DBPASS@ct/placement

Populate the placement database

Su-s / bin/sh-c "placement-manage db sync" placement

Modify the apache configuration file of placement (one of the official document pitfalls. This step is not mentioned in the official document. If you do not do it, an error will be reported later when calculating the service check)

Vim / etc/httpd/conf.d/00-placement-api.conf

Add to VirtualHost

# SSLCertificateKeyFile...

= 2.4 >

Require all granted

Order allow,deny

Allow from all

Restart the apache service

Systemctl restart httpd

Check whether the service has started successfully, and use netstat-tnlup to check the port situation. If there is a port of 8778, it means that the placement service has started successfully.

To check further, use the command: curl http://ct:8778 to directly access the API address of placement to see if you can return json.

Finally, check using the following command to see if you can return the list in the following figure

Placement-status upgrade check

Tags: Service check data database success command official file document port configuration node appropriate address entity situation permission step version user Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Apple Redmi Linux OPPO Reno