Installing, Configuring, and Verifying Placement
Placement provides an HTTP API for tracking the resource provider inventories and usage.
- Skip this section when deploying OpenStack Rocky. In the Rocky version, Placement is not an independent component but is integrated into the Nova component. For details about the configuration, see Installing, Configuring, and Verifying Nova.
- Install, configure, and verify Placement on controller nodes.
Creating a Placement Database
- Access the MySQL database.
1mysql -u root -p
- Create a database for Placement.
1CREATE DATABASE placement;
- Grant a permission for the database, and <PASSWORD> indicates the password for accessing the database.
1 2
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY '<PASSWORD>'; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY '<PASSWORD>';
- Exit the database access client.
Configuring Users and Endpoints
- Log in to the OpenStack CLI as the admin user.
1source /etc/keystone/admin-openrc
- Create the placement user and set a password.
1openstack user create --domain default --password-prompt placement
- Add a role.
1 2
openstack role add --project service --user placement admin openstack service create --name placement --description "Placement API" placement
- Create Placement API service endpoints.
1 2 3
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
- Install and configure components.
- Install the Placement installation package.
1yum -y install openstack-placement-api
- Edit the /etc/placement/placement.conf file and make the following changes:
- In the [placement_database] section, configure the database access and set PASSWORD to the password for accessing the Placement database.
1 2
[placement_database] connection = mysql+pymysql://placement:<PASSWORD>@controller/placement

- Configure Identity service access in [api] and [keystone_authtoken] sections.
1 2 3 4 5 6 7 8 9 10 11
[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 = <PASSWORD>
Set PASSWORD to the password of the keystone user.
- In the [placement_database] section, configure the database access and set PASSWORD to the password for accessing the Placement database.
- Install the Placement installation package.
- Modify the /etc/httpd/conf.d/00-placement-api.conf file.
1vim /etc/httpd/conf.d/00-placement-api.confAdd the following to the ErrorLog /var/log/placement/placement-api.log file:
1 2 3 4 5 6 7 8 9
<Directory /usr/bin> <IfVersion >= 2.4> Require all granted </IfVersion> <IfVersion < 2.4> Order allow,deny Allow from all </IfVersion> </Directory>

Starting the Placement Service
- Populate the Placement database.
1su -s /bin/sh -c "placement-manage db sync" placement
Restart the httpd service.
1systemctl restart httpd
Verifying Placement
- Log in to the OpenStack CLI as the admin user.
1source /etc/keystone/admin-openrc
- Check the status to ensure normal operation.
1placement-status upgrade check

- Install pip.
1 2 3
yum install -y epel-release yum install -y python-pip sed -i "s/enabled=1/enabled=0/g" epe*.repo
- Run the following commands for the Placement API:
- Install the osc-placement plugin.
1pip install osc-placement
- List available resource classes and features.
1 2
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

- Install the osc-placement plugin.
Parent topic: Installation and Verification