Configuring Users and Endpoints
Perform the following operations on the controller node.
- Log in to the OpenStack CLI as the user admin.
1source /etc/keystone/admin-openrc
- Create a user and set the password for the placement user.
1openstack user create --domain default --password-prompt placement
The password for the placement user must be the same as the password for accessing the Placement database described in section Creating the Placement Database.
- Grant the admin permission to the placement user and create the Placement service.
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
- Modify the /etc/placement/placement.conf file.
- Open the file.
vi /etc/placement/placement.conf
- Press i to enter the insert mode and perform the following configurations.
In the [placement_database] section, configure the database access and set PASSWORD to the password of 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 12
[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


Replace PASSWORD with the access password of the database user placement described in Creating the Placement Database.
- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Install the Placement installation package.
- Modify the /etc/httpd/conf.d/00-placement-api.conf configuration file.
- Open the file.
1vi /etc/httpd/conf.d/00-placement-api.conf - Press i to enter the insert mode and add the following content under the ErrorLog /var/log/placement/placement-api.log field:
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>

- Press Esc, type :wq!, and press Enter to save the file and exit.
- Open the file.
- Populate the Placement database.
1su -s /bin/sh -c "placement-manage db sync" placement
- Restart the httpd service.
1systemctl restart httpd
Parent topic: Installing, Configuring, and Verifying Placement