Rate This Document
Findability
Accuracy
Completeness
Readability

Installing Placement

Placement provides an HTTP API for tracking the resource provider inventories and usage. Install Placement on the controller node.

  1. Create a database, a Placement service credential, and API endpoints.
    1. Log in to the database as the root user.
      mysql -u root -p 
    2. In the database, create a Placement database and grant permissions.
      CREATE DATABASE placement; 
      GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'localhost' IDENTIFIED BY 'PLACEMENT_DBPASS';
      GRANT ALL PRIVILEGES ON placement.* TO 'placement'@'%' IDENTIFIED BY 'PLACEMENT_DBPASS'; 

      Replace PLACEMENT_DBPASS with the password of the Placement database user. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

    1. Exit the database.
      exit
    2. Create a Placement service credential.
      source ~/.admin-openrc 
      openstack user create --domain default --password-prompt placement 
      openstack role add --project service --user placement admin 
      openstack service create --name placement --description "Placement API" placement

      The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

    3. Create API endpoints of the Placement service.
      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
  2. Install and configure Placement.
    1. Install Placement.
      yum install openstack-placement-api
    2. Configure Placement.
      1. Open the /etc/placement/placement.conf file.
        vi /etc/placement/placement.conf
      1. Press i to enter the insert mode and modify the configuration file as follows:
        [placement_database]  
        connection = mysql+pymysql://placement:PLACEMENT_DBPASS@controller/placement
         
        [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_PASSWORD

        Replace PLACEMENT_DBPASS and PLACEMENT_PASSWORD with the Placement database password and Placement user password respectively. The password cannot contain the characters including #@$ and can contain the special characters including &=-_.+!*()

      1. Press Esc to exit the insert mode. Type :wq! and press Enter to save the file and exit.
    1. Synchronize the database.
      su -s /bin/sh -c "placement-manage db sync" placement
    2. Start the httpd service.
      systemctl restart httpd
  3. Check whether Placement is successfully installed.
    1. Check the status.
      source ~/.admin-openrc 
      placement-status upgrade check

      An example of the successful installation:

    2. Install osc-placement and list available resource types and features.
      yum install python3-osc-placement 
      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