OpenStack – Placement installation tutorial (CentOS) (Part 4/9)

After we are done with glance installation we can proceed onto placement installation. This is tutorial for Train release.

Prerequisites

You can find documentation for placement here – https://docs.openstack.org/placement/train/install/install-rdo.html

Database creation is first one.

mysql -u root -p

Replace PLACEMENT_DBPASS with your password.

CREATE DATABASE placement;

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';

Source admin credentials

. admin-openrc

Or, if that doesnt work for you, since you followed my previous tutorials

. admin-openrc.sh

Create placement service user and enter pass for it

openstack user create --domain default --password-prompt placement

Add placement user to service project with admin role.

openstack role add --project service --user placement admin

Create placement API in the service catalog

openstack service create --name placement \
  --description "Placement API" placement

Create 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
sudo firewall-cmd --add-port=8778/tcp --permanent
sudo firewall-cmd --reload

Installation and configuration

Install the package

sudo yum install openstack-placement-api

Next, we need to edit /etc/placement/placement.conf file.

sudo vi /etc/placement/placement.conf

placement_database section

Replace PLACEMENT_DBPASS with your placement database password.

[placement_database]
# ...
connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement

api and keystone_authoken sections

Replace PLACEMENT_PASS with your placement service password.

[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_PASS

!!!! Change auth_uri = to auth_url =

Again as in the glance file, one part is missing in keystone_authtoken, so I added it on the bottom of keystone_authtoken section. Not sure if this will work, proceed with caution.

We will populate the database now

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

We just need to restart httpd for the end

sudo systemctl restart httpd

We are done with the placement.

Next will be Compute service – nova

Disclaimer