Rate This Document
Findability
Accuracy
Completeness
Readability

Configuring Users and Endpoints

Perform the following operations on the controller node.

  1. Log in to the OpenStack CLI as the user admin.
    1
    source /etc/keystone/admin-openrc
    
  2. Create a user and set the password for the placement user.
    1
    openstack 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.

  3. 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
    
  4. 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
    
  5. Install and configure components.
    1. Install the Placement installation package.
      1
      yum -y install openstack-placement-api
      
    2. Modify the /etc/placement/placement.conf file.
      1. Open the file.
        vi /etc/placement/placement.conf
      2. 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.

      3. Press Esc, type :wq!, and press Enter to save the file and exit.
  6. Modify the /etc/httpd/conf.d/00-placement-api.conf configuration file.
    1. Open the file.
      1
      vi /etc/httpd/conf.d/00-placement-api.conf
      
    2. 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>
      

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