Create the database and grant privileges
CREATE DATABASE placement; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'commonpass'; GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'commonpass'; FLUSH PRIVILEGES; exit
Create a placement service user
. admin-openrc openstack user create --domain default --password-prompt placement
Add the Placement user to the service project with the admin role
openstack role add --project service --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 packages
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:commonpass@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 = service username = placement password = commonpass
Populate the placement
database and restart services
su -s /bin/sh -c "placement-manage db sync" placement service apache2 restart