On the controller node :
Create the database for placement services
CREATE DATABASE placement;
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
exit
Create user account for placement service and assign admin role
. admin-openrc
openstack user create --domain default --password-prompt placement
openstack role add --project homelab --user placement admin
Create the Placement API entry in the service catalog
openstack service create --name placement --description "Placement API" placement
Create the Placement API service endpoints
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 the package
apt install -y placement-api
Edit the /etc/placement/placement.conf
In the [placement_database]
section, configure database access
[placement_database]
connection = mysql+pymysql://placement:password@controller/placement
In the [api]
and [keystone_authtoken]
sections, configure Identity service access
[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 = homelab
username = placement
password = password
Populate the placement
database and restart services
su -s /bin/sh -c "placement-manage db sync" placement service apache2 restart