Installing Placement
Placement provides an HTTP API for tracking the resource provider inventories and usage. Install Placement on the controller node.
- Create a database, a Placement service credential, and API endpoints.
- Log in to the database as the root user.
mysql -u root -p
- In the database, create a Placement database and grant permissions.
CREATE DATABASE placement; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'PLACEMENT_DBPASS'; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'PLACEMENT_DBPASS';
Replace PLACEMENT_DBPASS with the password of the Placement database user. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()
- Exit the database.
exit
- Create a Placement service credential.
source ~/.admin-openrc openstack user create --domain default --password-prompt placement openstack role add --project service --user placement admin openstack service create --name placement --description "Placement API" placement
The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()
- Create API endpoints of the Placement service.
openstack endpoint create --region RegionOne placement public http://controller:8778 openstack endpoint create --region RegionOne placement internal http://controller:8778 openstack endpoint create --region RegionOne placement admin http://controller:8778
- Log in to the database as the root user.
- Install and configure Placement.
- Install Placement.
yum install openstack-placement-api
- Configure Placement.
- Open the /etc/placement/placement.conf file.
vi /etc/placement/placement.conf
- Press i to enter the insert mode and modify the configuration file as follows:
[placement_database] connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement [api] auth_strategy = keystone [keystone_authtoken] auth_url = http://controller:5000/v3 memcached_servers = controller:11211 auth_type = password project_domain_name = Default user_domain_name = Default project_name = service username = placement password = PLACEMENT_PASSWORD
Replace PLACEMENT_DBPASS and PLACEMENT_PASSWORD with the Placement database password and Placement user password respectively. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()
- Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
- Open the /etc/placement/placement.conf file.
- Synchronize the database.
su -s /bin/sh -c "placement-manage db sync" placement
- Start the httpd service.
systemctl restart httpd
- Install Placement.
- Check whether Placement is successfully installed.
- Check the status.
source ~/.admin-openrc placement-status upgrade check
An example of the successful installation:

- Install osc-placement and list available resource types and features.
yum install python3-osc-placement openstack --os-placement-api-version 1.2 resource class list --sort-column name openstack --os-placement-api-version 1.6 trait list --sort-column name
- Check the status.
Parent topic: Deployment and Verification